From: Todd C. Miller Date: Thu, 15 Oct 1998 03:57:14 +0000 (+0000) Subject: FAST_MATCH is no longer an optino X-Git-Tag: SUDO_1_5_7~96 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=581cfa1406d95f2031f877cde18f035725578fd1;p=sudo FAST_MATCH is no longer an optino --- diff --git a/parse.c b/parse.c index becaffdfe..b9ca87cf6 100644 --- 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)