summaryrefslogtreecommitdiff
path: root/lib/libutil
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-06-22 14:41:48 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-06-22 14:41:48 +0000
commitee9010d65ed0b7f4da75a3b8e9a6b042cceffb7c (patch)
tree463410a54d069cf2287b777522c7eb2336f1476f /lib/libutil
parent19b5c8dab873f419d7a934eb516b461e070d6b7c (diff)
add missing endusershell()
Diffstat (limited to 'lib/libutil')
-rw-r--r--lib/libutil/passwd.c8
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");