This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: static binaries & netgroups



    >> 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]