add missing endusershell() call. Original version was incorrect.
PR: bin/2442 Reviewed by: Friedemann Becker <zxmxy33@mail.uni-tuebingen.de>
This commit is contained in:
parent
d2b7305939
commit
c4fe9d664a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124690
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user