From 6e22da3412d218844796015d3ffc9cfa3c10de22 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 23 Apr 2018 14:42:35 -0600 Subject: [PATCH] In open_cmnd(), return true, not false, if we the /dev/fd/N pathname is not present. We don't want to fail a match because of this. --- plugins/sudoers/match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sudoers/match.c b/plugins/sudoers/match.c index a1202ea0e..a5a6a5d55 100644 --- a/plugins/sudoers/match.c +++ b/plugins/sudoers/match.c @@ -539,7 +539,7 @@ open_cmnd(const char *path, const struct sudo_digest *digest, int *fdp) snprintf(fdpath, sizeof(fdpath), "/dev/fd/%d", fd); if (stat(fdpath, &sb) != 0) { close(fd); - debug_return_bool(false); + debug_return_bool(true); } /* -- 2.40.0