diff options
author | 1998-06-22 14:41:47 +0000 | |
---|---|---|
committer | 1998-06-22 14:41:47 +0000 | |
commit | 09fa58d5b4b43212ee057d98b7eaa606fb00701d (patch) | |
tree | f88b86e1070eee320602ecb84260bce69a24766a /lib/libutil | |
parent | Remove the advertising clause in my old license, it impedes free use (diff) | |
download | wireguard-openbsd-09fa58d5b4b43212ee057d98b7eaa606fb00701d.tar.xz wireguard-openbsd-09fa58d5b4b43212ee057d98b7eaa606fb00701d.zip |
add missing endusershell()
Diffstat (limited to 'lib/libutil')
-rw-r--r-- | lib/libutil/passwd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libutil/passwd.c b/lib/libutil/passwd.c index 3158e0168b4..e44d02c28d2 100644 --- a/lib/libutil/passwd.c +++ b/lib/libutil/passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: passwd.c,v 1.17 1998/03/23 22:40:52 deraadt Exp $ */ +/* $OpenBSD: passwd.c,v 1.18 1998/06/22 14:41:47 millert Exp $ */ /* * Copyright (c) 1987, 1993, 1994, 1995 @@ -34,7 +34,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: passwd.c,v 1.17 1998/03/23 22:40:52 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: passwd.c,v 1.18 1998/06/22 14:41:47 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -546,7 +546,7 @@ pw_scan(bp, pw, flags) goto fmt; p = pw->pw_shell; - if (root && *p) /* empty == /bin/sh */ + if (root && *p) { /* empty == /bin/sh */ for (setusershell();;) { if (!(sh = getusershell())) { warnx("warning, unknown root shell"); @@ -555,6 +555,8 @@ pw_scan(bp, pw, flags) if (!strcmp(p, sh)) break; } + endusershell(); + } if ((p = strsep(&bp, ":"))) { /* too many */ fmt: warnx("corrupted entry"); |