]> granicus.if.org Git - sudo/commitdiff
Close all fd's before executing editor.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 11 Nov 2005 22:19:53 +0000 (22:19 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 11 Nov 2005 22:19:53 +0000 (22:19 +0000)
visudo.c

index 7f1f014cc4b1f58dca2cf2ac6a3f58d68afd20f6..21688499258732115efb56293b058617afcb5a25 100644 (file)
--- a/visudo.c
+++ b/visudo.c
@@ -650,6 +650,9 @@ run_command(path, argv)
            break;      /* NOTREACHED */
        case 0:
            (void) sigprocmask(SIG_SETMASK, &oset, NULL);
+           sudo_endpwent();
+           sudo_endgrent();
+           closefrom(STDERR_FILENO + 1);
            execv(path, argv);
            warning("unable to run %s", path);
            _exit(127);