summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-01-23 03:48:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-01-23 03:48:44 +0000
commitd794eeed90bfe9c12b714ad6ae0f83f877421f89 (patch)
tree54557ad4a7a6ebc94723f541d4b624cc53f4e9e2 /lib/libc
parent2f7b61c6a3b09b222c20dc856c0ed52e8ce490a9 (diff)
Use closefrom(); ok millert tedu
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/auth_subr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libc/gen/auth_subr.c b/lib/libc/gen/auth_subr.c
index 087c524a105..92fb6706de1 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.25 2004/01/10 16:45:56 millert Exp $ */
+/* $OpenBSD: auth_subr.c,v 1.26 2004/01/23 03:48:42 deraadt Exp $ */
/*-
* Copyright (c) 1995,1996,1997 Berkeley Software Design, Inc.
@@ -827,9 +827,7 @@ auth_call(auth_session_t *as, char *path, ...)
close(pfd[1]);
}
- for (status = getdtablesize() - 1; status > COMM_FD; status--)
- close(status);
-
+ closefrom(COMM_FD + 1);
execve(path, argv, auth_environ);
syslog(LOG_ERR, "%s: %m", path);
err(1, "%s", path);