From f261344077a71932f8c03575f2d2229c3af9b9fd Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Mon, 23 Mar 1998 22:40:52 +0000 Subject: [PATCH] do not wait if vfork() fails --- src/lib/libutil/passwd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/libutil/passwd.c b/src/lib/libutil/passwd.c index a411e70d..3158e016 100644 --- a/src/lib/libutil/passwd.c +++ b/src/lib/libutil/passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: passwd.c,v 1.16 1997/11/18 19:57:28 millert Exp $ */ +/* $OpenBSD: passwd.c,v 1.17 1998/03/23 22:40:52 deraadt 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.16 1997/11/18 19:57:28 millert Exp $"; +static char rcsid[] = "$OpenBSD: passwd.c,v 1.17 1998/03/23 22:40:52 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -279,6 +279,8 @@ pw_mkdb() } pid = vfork(); + if (pid == -1) + return (-1); if (pid == 0) { if (pw_lck) execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-d", pw_dir,