]> granicus.if.org Git - sudo/commitdiff
fix comment
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 10 Apr 1999 17:03:32 +0000 (17:03 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 10 Apr 1999 17:03:32 +0000 (17:03 +0000)
parse.c

diff --git a/parse.c b/parse.c
index c1b0d94ac3676279fde1944e6697e54e7018eb7a..f3b64e7bc60532bbd8e1b30c0bd5631d8e0c8bd2 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -308,10 +308,8 @@ command_matches(cmnd, user_args, path, sudoers_args)
            strcpy(buf, path);
            strcat(buf, dent->d_name);
 
-           /* only stat if basenames are not the same */
-           if (strcmp(cmnd_base, dent->d_name))
-               continue;
-           if (stat(buf, &pst) == -1)
+           /* only stat if basenames are the same */
+           if (strcmp(cmnd_base, dent->d_name) != 0 || stat(buf, &pst) == -1)
                continue;
            if (cst.st_dev == pst.st_dev && cst.st_ino == pst.st_ino) {
                if (cmnd_safe)