+++ 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):
works shadow-utils-4.1.2-9.fc10.i386, selinux-policy-targeted-3.5.13-74.fc10.noarch
fails shadow-utils-184.108.40.206-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?
Steps to Reproduce:
Any group name will do. We'll assign the password 'abcd' and try to sg into that group
--- Additional comment from email@example.com 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 firstname.lastname@example.org 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 email@example.com on 2011-01-05 10:19:50 EST ---
Created attachment 471882 [details]
this patch is fixing gshadow functions from shadow-utils
--- Additional comment from firstname.lastname@example.org 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 email@example.com on 2011-01-05 10:46:11 EST ---
Created attachment 471891 [details]
merge of both patches
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
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.
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.