summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-12-06 01:54:58 +0000
committerderaadt <deraadt@openbsd.org>1996-12-06 01:54:58 +0000
commit31375ee367ec60a2f2316627480388c8b55741a3 (patch)
treeb4ae929964c83740015fcb3a92504d968381b7c7
parentduh (diff)
downloadwireguard-openbsd-31375ee367ec60a2f2316627480388c8b55741a3.tar.xz
wireguard-openbsd-31375ee367ec60a2f2316627480388c8b55741a3.zip
vfork w/ exit botch
-rw-r--r--lib/libutil/passwd.c4
-rw-r--r--libexec/rpc.yppasswdd/yppasswdd_mkpw.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/libutil/passwd.c b/lib/libutil/passwd.c
index 8df9b382a14..a982a9449c2 100644
--- a/lib/libutil/passwd.c
+++ b/lib/libutil/passwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: passwd.c,v 1.4 1996/06/19 12:36:01 deraadt Exp $ */
+/* $OpenBSD: passwd.c,v 1.5 1996/12/06 01:55:33 deraadt Exp $ */
/*
* Copyright (c) 1987, 1993, 1994, 1995
* The Regents of the University of California. All rights reserved.
@@ -86,7 +86,7 @@ pw_mkdb()
if (pid == 0) {
execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p",
_PATH_MASTERPASSWD_LOCK, NULL);
- exit(1);
+ _exit(1);
}
pid = waitpid(pid, &pstat, 0);
if (pid == -1 || !WIFEXITED(pstat) || WEXITSTATUS(pstat) != 0)
diff --git a/libexec/rpc.yppasswdd/yppasswdd_mkpw.c b/libexec/rpc.yppasswdd/yppasswdd_mkpw.c
index 08ba14529b5..62345eb9efe 100644
--- a/libexec/rpc.yppasswdd/yppasswdd_mkpw.c
+++ b/libexec/rpc.yppasswdd/yppasswdd_mkpw.c
@@ -30,7 +30,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$Id: yppasswdd_mkpw.c,v 1.8 1996/08/31 13:54:13 deraadt Exp $";
+static char rcsid[] = "$Id: yppasswdd_mkpw.c,v 1.9 1996/12/06 01:54:58 deraadt Exp $";
#endif
#include <sys/types.h>
@@ -143,7 +143,10 @@ do_mkdb()
(void)fflush(stdout);
if (!(pid = vfork())) {
execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", tempname, NULL);
- pw_error(_PATH_PWD_MKDB, 1, 1);
+ warn(_PATH_PWD_MKDB);
+ warnx("%s: unchanged", _PATH_MASTERPASSWD);
+ pw_abort();
+ _exit(1);
}
pid = waitpid(pid, &pstat, 0);
if (pid == -1 || !WIFEXITED(pstat) || WEXITSTATUS(pstat) != 0)