This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/15304] New: nss_hesiod's initgroups_dyn incorrectly adds input group id to list


http://sourceware.org/bugzilla/show_bug.cgi?id=15304

             Bug #: 15304
           Summary: nss_hesiod's initgroups_dyn incorrectly adds input
                    group id to list
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: siddhesh@redhat.com
        ReportedBy: siddhesh@redhat.com
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


All initgroups_dyn implementations add all groups associated with a user except
the gid passed by the caller to the groups list.  Hesiod works differently
however, since it adds a group (including the one passed in the function call)
if it does not already exist.  This works fine for the vanilla initgroups
function, but not when nscd calls it, since the latter calls initgroups_dyn
with -1 as the gid.

Reproduce:

1. Set up a record in DNS that looks something like this:
   testuser.grplist IN TXT "12345:12346"
2. Set lhs and rhs in /etc/hesiod.conf so that "testuser.grplist""$lhs""$rhs"
resolves to the new record.
3. Add hesiod to the list of sources for group information in
/etc/nsswitch.conf.
4. Start nscd.
5. Use "id" or "groups" to retrieve testuser's supplemental groups list.

Actual results:
The unsigned interpretation of -1 (4294967295) will show up in the user's group
list.

Expected results:
The user's group list will look the same as it would if nscd weren't running.

Will post a patch to fix this.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]