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

Bug#32370: libc6: getpwent() returns each user twice when using "passwd: db files" in nsswitch



Package: libc6
Version: 2.0.7.19981211-2

Run the following program with "passwd: db files" in /etc/nsswitch.conf and
every user will be listed twice.  Run it with just "db" or just "files" and
every user will only appear once.

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

int main()
{
          struct passwd *ps;
          setpwent();
          for( ps = getpwent(); ps ; ) {
                   printf("name is \"%s\"\n", ps->pw_name);
               ps = getpwent();
          }
          endpwent();
	return 0;
}


-- System Information
Debian Release: 2.1
Kernel Version: Linux lyta 2.2.0-final #1 Thu Jan 21 10:15:26 GMT 1999 i586 unknown

Versions of the packages libc6 depends on:
ii  ldso            1.9.10-1       The Linux dynamic linker, library and utilit


Reply to: