mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 01:49:11 +00:00
Use FD_CLOEXEC instead of just 1
This commit is contained in:
parent
f6064b04c3
commit
1381a69f59
@ -1317,7 +1317,7 @@ open_sudoers(const char *path, char **outfile, bool doedit, bool *keepopen)
|
||||
} else {
|
||||
/* Rewind fp and set close on exec flag. */
|
||||
rewind(fp);
|
||||
(void)fcntl(fileno(fp), F_SETFD, 1);
|
||||
(void)fcntl(fileno(fp), F_SETFD, FD_CLOEXEC);
|
||||
if (outfile != NULL) {
|
||||
*outfile = sudo_rcstr_dup(fname);
|
||||
if (*outfile == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user