Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66392 - Group permissions broken, caused by glibc-2.3.4.20041002 ?
Summary: Group permissions broken, caused by glibc-2.3.4.20041002 ?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-05 02:07 UTC by Jan Jitse Venselaar
Modified: 2004-10-07 11:02 UTC (History)
2 users (show)

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


Attachments
Patches from glibc cvs archive which fix group problem (glibc-initgroups-patches.diff,5.46 KB, patch)
2004-10-06 18:16 UTC, James Roberts-Thomson
Details | Diff
Patch to ebuild to apply glibc-initgroups patch (glibc-2.3.4-20041002.ebuild.patch,534 bytes, patch)
2004-10-06 18:19 UTC, James Roberts-Thomson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Jitse Venselaar 2004-10-05 02:07:38 UTC
After upgrading to the new glibc yesterday, only primary groups seem to work.
For example:

cd /usr/games/
-bash: cd: games/: Permission denied

Permissions of /usr/games/ 
drwxr-x---    4 root games    96 Oct  1 20:28 games

groups
users

groups fca (my user)
wheel audio cdrom video games cdrw usb portage users

It worked fine before.
Also emerge seems not to like this, as I'm not in the portage group anymore.
emerge --info:Portage 2.0.51_rc7 (default-linux/x86/2004.2/gcc34/2.6, gcc-3.4.2, glibc-2.3.4.20041002-r0, 2.6.8.1-ck9 i686)
=================================================================
System uname: 2.6.8.1-ck9 i686 AMD Athlon(tm) XP 2400+
Gentoo Base System version 1.5.3
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux26-headers-2.6.8.1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe -ftracer -ffast-math -fomit-frame-pointer -momit-leaf-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -ftracer -ffast-math -fomit-frame-pointer -momit-leaf-frame-pointer -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks sandbox sfperms userpriv usersandbox"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://192.168.0.2/gentoo-portage"
USE="3dnow 3dnowex X alsa apm applypatches arts artswrappersuid audiofile avi bitmap-fonts cdparanoia cdr crypt cscope dvd dvdread encode fam final flac foomaticdb gdbm gif gphoto2 gpm gtk gtk2 guile imagemagick imlib ithreads jabber java javascript jpeg junit kde libcaca libg++ libwww live mad mikmod mmx mmx2 motif mpeg mysql ncurses network nfs nptl nptlonly oggvorbis ooo-kde opengl oss pam pdflib perl pic png python qt quicktime readline rtc sdl slang sqlite sse ssl svga tcltk tcpd tetex theora threads tiff truetype v4l2 x86 xml2 xprint xv xvid zlib"
Comment 1 Jan Jitse Venselaar 2004-10-05 02:12:51 UTC
Forgot to add:
I've remerged pam and shadow, but that doesn't help, am now  remerging glibc with FEATURES="maketest" for more information.
Comment 2 James Roberts-Thomson 2004-10-06 13:45:07 UTC
Hi,

Similar behaviour observed here, glibc-2.3.4-20041002 compiled with gcc-3.3.4, thus:

# /lib/tls/libc.so.6
GNU C Library 20041002 release version 2.3.4, by Roland McGrath et al.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6).
Compiled on a Linux 2.6.7 system on 2004-10-06.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        Native POSIX Threads Library by Ulrich Drepper et al
        The C stubs add-on version 2.1.2.
        BIND-8.2.3-T5B
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
        Glibc-2.0 compatibility add-on by Cristian Gafton
        GNU Libidn by Simon Josefsson
Thread-local storage support included.

Also, output from "id" command with both previous glibc and current:

"old" glibc (glibc 2.3.3.20040420-r1)
# id
uid=22042(n202042) gid=100(users) groups=4(adm),6(disk),10(wheel),11(floppy),14(uucp),16(cron),18(audio),19(cdrom),20(dialout),26(tape),27(video),31(squid),35(games),45(src),50(n202042),80(cdrw),81(apache),85(usb),100(users),103(mp3),130(ccache),250(portage),407(cvs)

with glibc-2.3.4-20041002
# id 
uid=22042(n202042) gid=100(users) groups=100(users)

Interestingly enough, the additional groups are available via the "newgrp" command, thus:
# newgrp src
# id
uid=22042(n202042) gid=45(src) groups=45(src),100(users)
# newgrp portage
# id
uid=22042(n202042) gid=250(portage) groups=45(src),100(users),250(portage)

I KNOW NOTHING about the glibc source-code, but could this be some form of initial array initialization glitch ?
Comment 3 Hanno Zysik (geki) 2004-10-06 14:28:43 UTC
...work/glibc-2.3.3/grp/* files seem suspicious. they differ a little to the cvs co i did right now. seems to be fixes mainly. i patched and recompile atm. lets see what it does. :) ill report here if it helped.
Comment 4 James Roberts-Thomson 2004-10-06 14:45:58 UTC
Regarding comment #3, are you refering to these fixes, perhaps?  http://sources.redhat.com/ml/glibc-cvs/2004-q4/msg00100.html

I'm going to modify the ebuild to include these fixes (well, not the atomic one, as that seems to be missing from the link), and see if it makes any difference.
Comment 5 Hanno Zysik (geki) 2004-10-06 14:56:18 UTC
nope,
the first one is fixed already
the second one doesnt fit to gentoo's 1002
the third isnt there..

i have other one 1002 diffed to cvs 45 mins ago.
Comment 6 Hanno Zysik (geki) 2004-10-06 15:17:12 UTC
hah, this patch rules:

emerge glibc (patched)
-> rebootet
-> logged in
cd /dev/snd
echo "blah" > pcmBLAHsounddevice (which didnt work before) worked now,
startx & logout
opened Eterm, did same test and it didnt work.

-> rebooted
-> logged in
-> test on console again worked
startx (only)
-> test under X succeded

anyone can interpret that?! ;)

anyone may test this on orig glibc?


well, i do not know still if this solved the group bug but fixed the bug i experienced...


i just added grp/* updates, i may add nscd/* updates... lets see then

may be its even better to grab a new (fedora) snapshot? as half-baked patched ;)
Comment 7 Travis Tilley (RETIRED) gentoo-dev 2004-10-06 15:58:09 UTC
lv@ayanami lv $ id
uid=1000(lv) gid=100(users) groups=10(wheel),11(floppy),17(console),18(audio),19(cdrom),27(video),35(games),80(cdrw),85(usb),100(users),250(portage)
lv@ayanami lv $ /lib/tls/libc.so.6
GNU C Library 20041002 release version 2.3.4, by Roland McGrath et al.

my group permissions seem to be fine
Comment 8 James Roberts-Thomson 2004-10-06 18:16:27 UTC
Created attachment 41249 [details, diff]
Patches from glibc cvs archive which fix group problem

The attached patch has solved my issue.  These patches have been already
committed to glibc cvs, and I got them from the CVS changelog mailing list at
http://sources.redhat.com/ml/glibc-cvs/2004-q3/.

NOTE that I only tested these patches against a NON-NPTL compiled glibc,
because I wanted to save myself some CPU time - I see no reason to assume they
won't work for a NPTL glibc, and will be able to verify once I finish compiling
an NPTL kernel (again!).
Comment 9 James Roberts-Thomson 2004-10-06 18:19:39 UTC
Created attachment 41252 [details, diff]
Patch to ebuild to apply glibc-initgroups patch

Here is a patch for the ebuild to apply the glic-initgroups patch from the
previous attachment.
Comment 10 James Roberts-Thomson 2004-10-06 19:33:35 UTC
I can now confirm the attached glibc-initgroups patch works correctly with NPTL-enabled glibc.
Comment 11 Hanno Zysik (geki) 2004-10-07 00:39:46 UTC
works here aswell
Comment 12 Travis Tilley (RETIRED) gentoo-dev 2004-10-07 07:57:46 UTC
alright. this patch is already merged upstream and we need a few additional upstream fixes, so i'm just going to do a new snapshot.
Comment 13 Travis Tilley (RETIRED) gentoo-dev 2004-10-07 11:02:57 UTC
fixed in cvs. give it 15-30 minutes to make it to rsync