FAST_MATCH is no longer an optino
This commit is contained in:
5
parse.c
5
parse.c
@@ -252,7 +252,6 @@ int command_matches(cmnd, user_args, path, sudoers_args)
|
|||||||
return(FALSE);
|
return(FALSE);
|
||||||
} else {
|
} else {
|
||||||
if (path[plen - 1] != '/') {
|
if (path[plen - 1] != '/') {
|
||||||
#ifdef FAST_MATCH
|
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
/* Only proceed if the basenames of cmnd and path are the same */
|
/* 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++;
|
p++;
|
||||||
if (strcmp(c, p))
|
if (strcmp(c, p))
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
#endif /* FAST_MATCH */
|
|
||||||
|
|
||||||
if (stat(path, &pst) < 0)
|
if (stat(path, &pst) < 0)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
@@ -297,11 +295,10 @@ int command_matches(cmnd, user_args, path, sudoers_args)
|
|||||||
continue;
|
continue;
|
||||||
strcpy(buf, path);
|
strcpy(buf, path);
|
||||||
strcat(buf, dent->d_name);
|
strcat(buf, dent->d_name);
|
||||||
#ifdef FAST_MATCH
|
|
||||||
/* only stat if basenames are not the same */
|
/* only stat if basenames are not the same */
|
||||||
if (strcmp(c, dent->d_name))
|
if (strcmp(c, dent->d_name))
|
||||||
continue;
|
continue;
|
||||||
#endif /* FAST_MATCH */
|
|
||||||
if (stat(buf, &pst) < 0)
|
if (stat(buf, &pst) < 0)
|
||||||
continue;
|
continue;
|
||||||
if (cmnd_st.st_dev == pst.st_dev && cmnd_st.st_ino == pst.st_ino)
|
if (cmnd_st.st_dev == pst.st_dev && cmnd_st.st_ino == pst.st_ino)
|
||||||
|
Reference in New Issue
Block a user