From: Todd C. Miller Date: Mon, 23 Apr 2018 20:42:35 +0000 (-0600) Subject: In open_cmnd(), return true, not false, if we the /dev/fd/N pathname X-Git-Tag: SUDO_1_8_23^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e22da3412d218844796015d3ffc9cfa3c10de22;p=sudo 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. --- 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); } /*