Skip to content

Commit 1381a69

Browse files
committed
Use FD_CLOEXEC instead of just 1
1 parent f6064b0 commit 1381a69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/sudoers/sudoers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ open_sudoers(const char *path, char **outfile, bool doedit, bool *keepopen)
13171317
} else {
13181318
/* Rewind fp and set close on exec flag. */
13191319
rewind(fp);
1320-
(void)fcntl(fileno(fp), F_SETFD, 1);
1320+
(void)fcntl(fileno(fp), F_SETFD, FD_CLOEXEC);
13211321
if (outfile != NULL) {
13221322
*outfile = sudo_rcstr_dup(fname);
13231323
if (*outfile == NULL) {

0 commit comments

Comments
 (0)