summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2003-04-24 23:56:58 +0000
committernectar <nectar@FreeBSD.org>2003-04-24 23:56:58 +0000
commite7a03bb9e7ca16b4c7e517abecab46d1654a9379 (patch)
treea4a0fe2db54a8994f33d13c9e783ca668b6ee237 /lib/libc
parent066321f1e0898697c0a1b16ad811324e562c276e (diff)
downloadFreeBSD-src-e7a03bb9e7ca16b4c7e517abecab46d1654a9379.zip
FreeBSD-src-e7a03bb9e7ca16b4c7e517abecab46d1654a9379.tar.gz
In compat mode, we `redispatch' the lookup. It is probably a good
idea to re-initialize `struct passwd', because e.g. pw_class might get set by one module, but not by another. Add another call to the internal pwd_init function to accomplish this. Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/getpwent.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
index ae0b177..32abdc9 100644
--- a/lib/libc/gen/getpwent.c
+++ b/lib/libc/gen/getpwent.c
@@ -1321,6 +1321,7 @@ compat_redispatch(struct compat_state *st, enum nss_lookup_type how,
for (i = 0; i < sizeof(dtab)/sizeof(dtab[0]) - 1; i++)
dtab[i].mdata = (void *)lookup_how;
more:
+ pwd_init(pwd);
switch (lookup_how) {
case nss_lt_all:
rv = _nsdispatch(&discard, dtab, NSDB_PASSWD_COMPAT,
OpenPOWER on IntegriCloud