Add closefrom sudoers option to start closing at a point other than 3.
Add closefrom_override sudoers option and -C sudo flag to allow the user to specify a different closefrom starting point.
This commit is contained in:
@@ -490,9 +490,10 @@ send_mail(line)
|
||||
}
|
||||
argv[i] = NULL;
|
||||
|
||||
/* Close password and group files so we don't leak fds. */
|
||||
/* Close password, group and other fds so we don't leak. */
|
||||
sudo_endpwent();
|
||||
sudo_endgrent();
|
||||
closefrom(STDERR_FILENO + 1);
|
||||
|
||||
/*
|
||||
* Depending on the config, either run the mailer as root
|
||||
|
Reference in New Issue
Block a user