summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorPhilippe Charnier <charnier@FreeBSD.org>2004-01-18 21:33:25 +0000
committerPhilippe Charnier <charnier@FreeBSD.org>2004-01-18 21:33:25 +0000
commitc4fe9d664a375642c6a92739f309690ff0336781 (patch)
tree728ddc40f4ec3fac63b1867bc6eb9c5b1570b7c0 /lib/libc
parentd2b7305939fc131e9d309887d7b2e9371822c782 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/pw_scan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/gen/pw_scan.c b/lib/libc/gen/pw_scan.c
index e785511d2cae..04cc388c8210 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;