Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98779 - initgroups fails if nscd running and group caching disabled
Summary: initgroups fails if nscd running and group caching disabled
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-12 08:00 UTC by Daniel Mario Vega
Modified: 2005-10-16 20:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed fix (glibc-2.3.4-nscd-groupcache.patch,526 bytes, patch)
2005-07-14 12:17 UTC, Daniel Mario Vega
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Mario Vega 2005-07-12 08:00:04 UTC
If I login as a normal user (not-root) the groups assigned in /etc/group are
ignored if nscd is running with group caching disabled.

Reproducible: Always
Steps to Reproduce:
1. Edit /etc/nscd.conf and disable groupc cache (enable-cache group no)
2. Start Name Server Caching Daemon (/etc/init.d/nscd start)
3. Login as a normal user (su - non_root_user)
4. Check your groups (id, groups)

Actual Results:  
Only the main group is initialized on the group access list

Expected Results:  
All groups assigned to the user in /etc/groups should be initialized

Version: sys-libs/glibc-2.3.4.20041102-r1
Comment 1 SpanKY gentoo-dev 2005-07-12 15:11:17 UTC
works just fine for me with glibc-2.3.5
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-13 03:46:00 UTC
Anybody with an x86 currently, want to vouch for 2.3.5, and mark it stable ? 8)
Comment 3 SpanKY gentoo-dev 2005-07-13 17:15:50 UTC
would be nice to get off of the ugly snapshots, but i think we need to resolve
the nptl/linuxthreads issues first
Comment 4 Daniel Mario Vega 2005-07-14 12:17:00 UTC
Created attachment 63412 [details, diff]
Proposed fix
Comment 5 SpanKY gentoo-dev 2005-07-14 20:17:05 UTC
that logic is already in the code ...

if (initgr_resp->found == 1) {
...
} else {
  if (__builtin_expect (initgr_resp->found == -1, 0)) {
    /* The daemon does not cache this database.  */
    __nss_not_use_nscd_group = 1;
...
Comment 6 Daniel Mario Vega 2005-07-15 07:32:54 UTC
(In reply to comment #5)
SpanKY, the code you describe is in glibc-2.3.5 . The patch I submitted is for
glibc-2.3.4.20041102-r1
Comment 7 Jeremy Huddleston (RETIRED) gentoo-dev 2005-07-15 13:44:48 UTC
right, but we're not going to be touching 2.3.4.XXXX as they are riddled with
other problems... instead, we need to address the one showstopper remaining to
move 2.3.5 into stable x86.  However, ppc be interestead in merging it into
their 2.3.4.20050125-r2 since they have ldso problems with 2.3.5
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-16 10:55:24 UTC
Not much we can do for 2.3.5 if upstream have not fixed the linuxthreads issue
yet.  Also checked fedora at least .. nothing there.  Do we have a bug open btw
for the linuxthreads issue ?
Comment 9 Markus Rothe (RETIRED) gentoo-dev 2005-09-23 08:46:28 UTC
2.3.5-r1 is stable on ppc64 since some weeks. please readd if I missed 
something. 
Comment 10 Joe Jezak (RETIRED) gentoo-dev 2005-10-16 20:02:53 UTC
ppc has stabilized 2.3.5-r2 so we can probably close this bug now.  Feel free to
reopen if you think this is in error.