This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
static binaries & netgroups
- To: libc-alpha at sources dot redhat dot com
- Subject: static binaries & netgroups
- From: Torsten Duwe <duwe at caldera dot de>
- Date: Thu, 15 Feb 2001 16:56:57 +0100
- Reply-to: Torsten dot Duwe at caldera dot de
Hi all,
I've just come across an issue which might be a serious bug in the
NSS subsystem. With any 2.2-based glibc (Linux/i386 for completeness...), my
static binaries segfault when (user) netgroups are in use. I've found that
even 2.1.96 had that problem, 2.1.2 had not. Other tools' versions seem not
to affect the result. In short:
static binary doing getpwuid() or such
+ "passwd: compat" in /etc/nsswitch.conf
+ "-@SOMEGROUP::::::" in /etc/passwd
= crash.
Reducing "compat" to "files nis" eliminates the problem, as does the removal
of netgroup entries from passwd. Linking dynamically also helps.
Debugging of this is a sheer nightmare with static and dynamic versions of
the same lib mapped and being used. The backtrace of the dynamic part
starts with innetgr(), crosses ld.so, libc and of course libnss_compat, and
ends in open_path(), where "r_search_path_struct *sps" doesn't seem to be
initialized properly and causes a NULL access.
Can anyone confirm this ?
Torsten
(freeing a few gigabytes disk space preparing to build glibc w/ "-g" ;-)