bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getpwnam with NIS netgroups and static binaries


From: Frank Wagner
Subject: getpwnam with NIS netgroups and static binaries
Date: Wed, 4 Sep 2002 09:40:23 +0200

Hi *!

Problem: Segmentation Fault
OS: Linux (actually Redhat 7.1, but also others)
libc: 2.2.4
function: getpwnam

When using NIS netgroups (address@hidden entries in /etc/passwd) and statically
linked binaries, then a call to getpwnam results in a segfault. When
removing the netgroup or compiling the program dynamically then everything
works well.

Here is my little test-program:

/* gcc -o getpwnamtest -static getpwnamtest.c */

#include <pwd.h>
#include <sys/types.h>

int main(int argc, char **argv)
{
  struct passwd *p;
  p = getpwnam(argv[1]);
  if (p) {
    puts(p->pw_name);
    puts(p->pw_gecos);
  }
  endpwent();
}

(Several guys on the address@hidden mailing list have this problem,
because the wu-ftpd modified by the globus project (www.globus.org) and the
Condog-G (www.cs.wisc.edu/condor) are normally installed dynamically
linked.)

Gruss,
---
Frank Wagner                                Phone:  +49 (0) 711 7816 349
University of Stuttgart, IPVR, AS           Fax:    +49 (0) 711 7816 424
Breitwiesenstr. 20 - 22
D-70565 Stuttgart        Email: address@hidden






reply via email to

[Prev in Thread] Current Thread [Next in Thread]