This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: static binaries & netgroups
- To: Torsten dot Duwe at caldera dot de
- Subject: Re: static binaries & netgroups
- From: Andreas Jaeger <aj at suse dot de>
- Date: 16 Feb 2001 08:24:35 +0100
- Cc: libc-alpha at sources dot redhat dot com
- References: <200102151556.QAA21140@ns.caldera.de>
Torsten Duwe <duwe@caldera.de> writes:
> 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
Also with 2.2.2? Some calls where getting the wrong number of
parameters in earlier versions.
> 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" ;-)
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj