summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2015-09-19 02:47:47 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2015-09-19 02:47:47 +0000
commitc9d092ae2ea91f9e4835850570601efad99c667d (patch)
tree0baca324e1d6cbff47a08cdf0e4ed4c08c85b260 /usr.bin
parent7b19b93698461b7fb667b34af70802c42c320d40 (diff)
doas doesn't need any files to be passed in. closefrom STDERR+1. ok benno
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/doas/doas.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/doas/doas.c b/usr.bin/doas/doas.c
index f5726d0aaf5..4c678438e75 100644
--- a/usr.bin/doas/doas.c
+++ b/usr.bin/doas/doas.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: doas.c,v 1.41 2015/09/03 20:05:58 tedu Exp $ */
+/* $OpenBSD: doas.c,v 1.42 2015/09/19 02:47:46 tedu Exp $ */
/*
* Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
*
@@ -323,6 +323,8 @@ main(int argc, char **argv, char **envp)
char cwdpath[PATH_MAX];
const char *cwd;
+ closefrom(STDERR_FILENO + 1);
+
uid = getuid();
while ((ch = getopt(argc, argv, "C:nsu:")) != -1) {