kern/59962: libc error when using nis passwd.adjunct
Gabriel Gomez
ggomez at fing.edu.uy
Thu Dec 4 11:50:24 PST 2003
>Number: 59962
>Category: kern
>Synopsis: libc error when using nis passwd.adjunct
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Dec 04 11:50:15 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Gabriel Gomez
>Release: FreeBSD 5.2-BETA i386
>Organization:
Facultad de Ingenieria - Instituto de Ingenieria Electrica
>Environment:
System: FreeBSD prueba-iie.fing.edu.uy 5.2-BETA FreeBSD 5.2-BETA #0: Tue Nov 25 08:24:08 GMT 2003 root at wv1u.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC i386
>Description:
When using FreeBSD 5.x as a NIS Client and the server is using
passwd.adjunct any program which call getpw*, generate a core dump.
(bug in libc)
>How-To-Repeat:
This simple test can be used to generate the core dump.
#include <stdio.h>
#include <pwd.h>
int main ()
{
struct passwd *pw = getpwuid( UID );
printf( "%s\n", (pw) ? pw->pw_name : "none" );
}
where UID is any user defined in NIS passwd and passwd.adjunct map.
Also doing a "ls -l FILE" where FILE is owned by a NIS user leads to
a core dump.
>Fix:
Patch /usr/src/lib/libc/gen/getpwent.c
diff getpwent.c getpwent.c-1.83.c
1128c1128
< rv = nis_adjunct(st->domain, pwd->pw_name,
---
> rv = nis_adjunct(st->domain, name,
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list