diff options
author | charnier <charnier@FreeBSD.org> | 2004-01-18 21:33:25 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 2004-01-18 21:33:25 +0000 |
commit | 30e88bfa384531fd381c11b2ca92b4b13bb7e8fa (patch) | |
tree | 728ddc40f4ec3fac63b1867bc6eb9c5b1570b7c0 /lib/libc/gen/pw_scan.c | |
parent | 967828a92a5d736d1332a8716ca5c4ef5b3734cc (diff) | |
download | FreeBSD-src-30e88bfa384531fd381c11b2ca92b4b13bb7e8fa.zip FreeBSD-src-30e88bfa384531fd381c11b2ca92b4b13bb7e8fa.tar.gz |
add missing endusershell() call. Original version was incorrect.
PR: bin/2442
Reviewed by: Friedemann Becker <zxmxy33@mail.uni-tuebingen.de>
Diffstat (limited to 'lib/libc/gen/pw_scan.c')
-rw-r--r-- | lib/libc/gen/pw_scan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/gen/pw_scan.c b/lib/libc/gen/pw_scan.c index e785511..04cc388 100644 --- a/lib/libc/gen/pw_scan.c +++ b/lib/libc/gen/pw_scan.c @@ -180,7 +180,7 @@ __pw_scan(char *bp, struct passwd *pw, int flags) goto fmt; p = pw->pw_shell; - if (root && *p) /* empty == /bin/sh */ + if (root && *p) { /* empty == /bin/sh */ for (setusershell();;) { if (!(sh = getusershell())) { if (flags & _PWSCAN_WARN) @@ -190,6 +190,8 @@ __pw_scan(char *bp, struct passwd *pw, int flags) if (!strcmp(p, sh)) break; } + endusershell(); + } if (p[0]) pw->pw_fields |= _PWF_SHELL; |