]> granicus.if.org Git - sudo/commitdiff
FAST_MATCH is no longer an optino
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 15 Oct 1998 03:57:14 +0000 (03:57 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 15 Oct 1998 03:57:14 +0000 (03:57 +0000)
parse.c

diff --git a/parse.c b/parse.c
index becaffdfeea3ae6c0fd682a893007c7a03c7bb90..b9ca87cf6e6721f67d487849a300c724703cab9e 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -252,7 +252,6 @@ int command_matches(cmnd, user_args, path, sudoers_args)
            return(FALSE);
     } else {
        if (path[plen - 1] != '/') {
-#ifdef FAST_MATCH
            char *p;
 
            /* Only proceed if the basenames of cmnd and path are the same */
@@ -262,7 +261,6 @@ int command_matches(cmnd, user_args, path, sudoers_args)
                p++;
            if (strcmp(c, p))
                return(FALSE);
-#endif /* FAST_MATCH */
 
            if (stat(path, &pst) < 0)
                return(FALSE);
@@ -297,11 +295,10 @@ int command_matches(cmnd, user_args, path, sudoers_args)
                continue;
            strcpy(buf, path);
            strcat(buf, dent->d_name);
-#ifdef FAST_MATCH
+
            /* only stat if basenames are not the same */
            if (strcmp(c, dent->d_name))
                continue;
-#endif /* FAST_MATCH */
            if (stat(buf, &pst) < 0)
                continue;
            if (cmnd_st.st_dev == pst.st_dev && cmnd_st.st_ino == pst.st_ino)