From: Todd C. Miller Date: Fri, 11 Nov 2005 22:19:53 +0000 (+0000) Subject: Close all fd's before executing editor. X-Git-Tag: SUDO_1_7_0~611 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b3b32ab9a2aa05280166f91e963d9603011c7a6;p=sudo Close all fd's before executing editor. --- diff --git a/visudo.c b/visudo.c index 7f1f014cc..216884992 100644 --- 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);