RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 667593 - /usr/bin/sg has ceased to function for groups with a password; "Invalid password"
Summary: /usr/bin/sg has ceased to function for groups with a password; "Invalid passw...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: shadow-utils
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Vrabec
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-06 07:50 UTC by Tomas Mraz
Modified: 2011-12-06 16:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 665780
Environment:
Last Closed: 2011-12-06 16:27:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1650 0 normal SHIPPED_LIVE shadow-utils bug fix and enhancement update 2011-12-06 00:50:28 UTC

Description Tomas Mraz 2011-01-06 07:50:13 UTC
+++ This bug was initially created as a clone of Bug #665780 +++

Description of problem:

'switch-group' (sg) to a group with a password used to work in Fedora 10.  This use case no longer works in Fedora 13 & Fedora 14  I'm filing this against shadow-utils since that is where /usr/bin/sg lives but the issue may be in selinux-policy or even crypt(...) which is in glibc.

Best guess here is that it seems to be an selinux issue tied to the inability of /usr/bin/newgrp (/usr/bin/sg_ too read the gshadow file).

As exhibited, the problem occurs within-system, not across releases.  That is: while on the same system (same fedora release), it is not possible to establish a password for a group and then sg into that group by giving the password


Version-Release number of selected component (if applicable):

cogently:
works shadow-utils-4.1.2-9.fc10.i386, selinux-policy-targeted-3.5.13-74.fc10.noarch
fails shadow-utils-4.1.4.2-8.fc14.i686, selinux-policy-targeted-3.5.13-74.fc10.noarch

Perhaps the relevant selinux policy is usermanage.te?
Should there be mention of newgrp, sg, gpasswd therein?
./serefpolicy-3.9.7/policy/modules/admin/usermanage.te 


How reproducible:

100% deterministic

Steps to Reproduce:

Any group name will do.  We'll assign the password 'abcd' and try to sg into that group

--- Additional comment from tmraz on 2011-01-04 11:46:40 EST ---

Actually it is not related to SELinux at all.

It is caused by completely broken getsgent code in shadow-utils lib. Also it incorrectly uses this code although glibc contains fine implementation of all the required gshadow utilities because shadow-utils code incorrectly expects them in shadow.h when they are in gshadow.h. So as a fix although the broken getsgent in the shadow utils should be eventually fixed, I propose to fix the build process of shadow-utils to use functions from glibc.

--- Additional comment from tmraz on 2011-01-04 12:14:43 EST ---

Created attachment 471715 [details]
Patch making shadow utils to use gshadow functions from glibc

--- Additional comment from pvrabec on 2011-01-05 10:19:50 EST ---

Created attachment 471882 [details]
another fix

this patch is fixing gshadow functions from shadow-utils

--- Additional comment from pvrabec on 2011-01-05 10:44:43 EST ---

(In reply to comment #4)
> Created attachment 471882 [details]
> another fix
> 
> this patch is fixing gshadow functions from shadow-utils

There is a bug in the patch.

--- Additional comment from pvrabec on 2011-01-05 10:46:11 EST ---

Created attachment 471891 [details]
merge of both patches

Comment 2 RHEL Program Management 2011-01-07 15:44:02 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 5 Suzanne Logcher 2011-02-15 21:46:37 UTC
This issue was proposed for RHEL 6.1 FasTrack but did not get resolved in time.
It has been moved to RHEL 6.2 FasTrack.

Comment 12 errata-xmlrpc 2011-12-06 16:27:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1650.html


Note You need to log in before you can comment on or make changes to this bug.