This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: static binaries & netgroups
- To: "H . J . Lu" <hjl at valinux dot com>
- Subject: Re: static binaries & netgroups
- From: Torsten Duwe <duwe at caldera dot de>
- Date: Fri, 16 Feb 2001 18:09:14 +0100 (CET)
- Cc: aj at suse dot de, libc-alpha at sources dot redhat dot com
- References: <200102151556.QAA21140@ns.caldera.de><20010215094356.A3353@valinux.com>
- Reply-to: Torsten dot Duwe at caldera dot de
>> 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.
HJL> Please provide a complete testcase. I will look into it when I find
HJL> time.
H.J, I did not submit a standard bug report because a) much of the
std. questionaire info doesn't seem to matter here, b) important bits (log in
as NIS user, have netgroups in use) aren't asked for in the std. fields and
c) I wasn't sure whether it's reproducable at other sites, hence...
>> Can anyone confirm this ?
Andreas, no 2.2.2 doesn't fix it.
All: the test case _code_ is really trivial, but anyway:
------------------------------8<------------------------------
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <pwd.h>
struct passwd * pw;
int
main()
{
pw = getpwuid(getuid());
// printf("Your username: %s\n", pw->pw_name);
return 0;
}
------------------------------8<------------------------------
compile with "gcc -static -O2 -Wall" or whatever your favorites...
Torsten