mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 22:05:46 +00:00
Eliminate use of setpwent()/endpwent() and setgrent()/endgrent().
Sudo never iterates over the passwd or group file. Rename sudo_set{pw,gr}ent() -> sudo_mk{pw,gr}cache() and use sudo_free{pw,gr}cache() instead of sudo_end{pw,gr}ent().
This commit is contained in:
@@ -623,9 +623,7 @@ send_mail(const char *fmt, ...)
|
||||
|
||||
sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, NULL);
|
||||
|
||||
/* Close password, group and other fds so we don't leak. */
|
||||
sudo_endpwent();
|
||||
sudo_endgrent();
|
||||
/* Close fds so we don't leak anything. */
|
||||
closefrom(STDERR_FILENO + 1);
|
||||
|
||||
if (pipe(pfd) == -1) {
|
||||
|
Reference in New Issue
Block a user