summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2004-01-23 03:48:42 +0000
committerderaadt <deraadt@openbsd.org>2004-01-23 03:48:42 +0000
commit188b81b301363fd0ed80a91d62e6e2e65b573c69 (patch)
treeee108d88fd789bd32ed57a01646e57a5d28ae80c /lib/libc
parentDon't probe impossible luns. If lun 0 is non-existant, or if the device shows (diff)
downloadwireguard-openbsd-188b81b301363fd0ed80a91d62e6e2e65b573c69.tar.xz
wireguard-openbsd-188b81b301363fd0ed80a91d62e6e2e65b573c69.zip
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);