From cae6d992ea1343a8e952c86544cb57eb32a1788d Mon Sep 17 00:00:00 2001 From: Philippe Charnier Date: Sun, 18 Jan 2004 21:33:25 +0000 Subject: add missing endusershell() call. Original version was incorrect. PR: bin/2442 Reviewed by: Friedemann Becker --- libc/gen/pw_scan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libc') diff --git a/libc/gen/pw_scan.c b/libc/gen/pw_scan.c index e785511..04cc388 100644 --- a/libc/gen/pw_scan.c +++ b/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; -- cgit v1.2.3-56-ge451