diff options
author | Alexander Hall <halex@cvs.openbsd.org> | 2010-03-11 21:32:29 +0000 |
---|---|---|
committer | Alexander Hall <halex@cvs.openbsd.org> | 2010-03-11 21:32:29 +0000 |
commit | 8fa11ae630ba0d5a18930abc98eab41028964a24 (patch) | |
tree | e394993b9fe4177b0be5e573c4e8ed8461556928 /usr.bin | |
parent | 5ab0e60b1d5517b710493f86c32e06a57507cfed (diff) |
Fix intended use of closefrom() so that we do indeed close fd 3 and up by
default and make -C work as expected.
fine by kettenis@, beck@, millert@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/sudo/sudo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/sudo/sudo.c b/usr.bin/sudo/sudo.c index 3ec16e83dc8..b9a7031e284 100644 --- a/usr.bin/sudo/sudo.c +++ b/usr.bin/sudo/sudo.c @@ -536,7 +536,7 @@ main(argc, argv, envp) sudo_endpwent(); sudo_endgrent(); - closefrom(def_closefrom + 1); + closefrom(def_closefrom); #ifndef PROFILING if (ISSET(sudo_mode, MODE_BACKGROUND) && fork() > 0) { |