Skip to content

Commit

Permalink
Fix typo introduced on systems with O_PATH or O_EXEC
Browse files Browse the repository at this point in the history
  • Loading branch information
millert committed Mar 11, 2020
1 parent d316892 commit 277b297
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/sudoers/match_command.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ open_cmnd(const char *path, const struct command_digest_list *digests, int *fdp)

fd = open(path, O_RDONLY|O_NONBLOCK);
# ifdef O_EXEC
if (fd == -1 && errno == EACCES && TAILQ_EMPTY(digests))
if (fd == -1 && errno == EACCES && TAILQ_EMPTY(digests)) {
/* Try again with O_EXEC if no digest is specified. */
const int saved_errno = errno;
if ((fd = open(path, O_EXEC)) == -1)
Expand Down

0 comments on commit 277b297

Please sign in to comment.