From 638c65fd9b16660ad92953e9e0f99338b8b27eba Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 22 Nov 2002 23:27:46 +0000 Subject: Initialize status to zero before calling waitpid(). That way, if there is nothing to be waited for (for instance if SIGCHLD is being ignored) we don't check WIFEXITED(garbage off the stack). --- lib/libc/gen/auth_subr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libc/gen/auth_subr.c') diff --git a/lib/libc/gen/auth_subr.c b/lib/libc/gen/auth_subr.c index 73a080a960f..0e28516ceb6 100644 --- a/lib/libc/gen/auth_subr.c +++ b/lib/libc/gen/auth_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth_subr.c,v 1.20 2002/11/22 19:47:03 deraadt Exp $ */ +/* $OpenBSD: auth_subr.c,v 1.21 2002/11/22 23:27:45 millert Exp $ */ /*- * Copyright (c) 1995,1996,1997 Berkeley Software Design, Inc. @@ -848,6 +848,7 @@ auth_call(auth_session_t *as, char *path, ...) as->index = 0; _auth_spool(as, pfd[0]); close(pfd[0]); + status = 0; if (waitpid(pid, &status, 0) < 0) { if (errno != ECHILD) { syslog(LOG_ERR, "%s: waitpid: %m", path); -- cgit v1.2.3