]> granicus.if.org Git - sudo/commitdiff
In open_cmnd(), return true, not false, if we the /dev/fd/N pathname
authorTodd C. Miller <Todd.Miller@sudo.ws>
Mon, 23 Apr 2018 20:42:35 +0000 (14:42 -0600)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Mon, 23 Apr 2018 20:42:35 +0000 (14:42 -0600)
is not present.  We don't want to fail a match because of this.

plugins/sudoers/match.c

index a1202ea0e2fb9878637093e6df9454b80634daf3..a5a6a5d5540c4e5565055afc8bb680e95881e78c 100644 (file)
@@ -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);
        }
 
        /*