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: "H . J . Lu" <hjl at valinux dot com>
- Date: Thu, 15 Feb 2001 09:43:56 -0800
- Cc: libc-alpha at sources dot redhat dot com
- References: <200102151556.QAA21140@ns.caldera.de>
On Thu, Feb 15, 2001 at 04:56:57PM +0100, Torsten Duwe wrote:
> 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 ?
>
Please provide a complete testcase. I will look into it when I
find time.
--
H.J. Lu (hjl@valinux.com)