Date: Thu, 4 Dec 2003 16:47:08 -0300 (UYT) From: Gabriel Gomez <ggomez@fing.edu.uy> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Eduardo Cota <cota@fing.edu.uy> Subject: kern/59962: libc error when using nis passwd.adjunct Message-ID: <200312041947.hB4Jl8p1090632@ampere.fing.edu.uy> Resent-Message-ID: <200312041950.hB4JoF9R085385@freefall.freebsd.org>
index | next in thread | raw e-mail
>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@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:
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312041947.hB4Jl8p1090632>
