path_matches -> command_matches
This commit is contained in:
2
parse.c
2
parse.c
@@ -168,7 +168,7 @@ int validate(check_cmnd)
|
||||
* If path doesn't end in /, return TRUE iff cmnd & path name the same inode;
|
||||
* otherwise, return TRUE if cmnd names one of the inodes in path
|
||||
*/
|
||||
int path_matches(cmnd, user_args, path, sudoers_args)
|
||||
int command_matches(cmnd, user_args, path, sudoers_args)
|
||||
char *cmnd;
|
||||
char **user_args;
|
||||
char *path;
|
||||
|
@@ -96,7 +96,7 @@ int top = 0;
|
||||
/*
|
||||
* Protoypes
|
||||
*/
|
||||
extern int path_matches __P((char *, char **, char *, char **));
|
||||
extern int command_matches __P((char *, char **, char *, char **));
|
||||
extern int addr_matches __P((char *));
|
||||
extern int netgr_matches __P((char *, char *, char *));
|
||||
extern int usergr_matches __P((char *, char *));
|
||||
@@ -268,8 +268,8 @@ cmnd : ALL {
|
||||
char **t;
|
||||
|
||||
/* if NewArgc > 1 pass ptr to 1st arg, else NULL */
|
||||
if (path_matches(cmnd, (NewArgc > 1) ? &NewArgv[1]
|
||||
: NULL, $1.cmnd, $1.args))
|
||||
if (command_matches(cmnd, (NewArgc > 1) ?
|
||||
&NewArgv[1] : NULL, $1.cmnd, $1.args))
|
||||
cmnd_matches = TRUE;
|
||||
|
||||
(void) free($1.cmnd);
|
||||
|
4
visudo.c
4
visudo.c
@@ -82,7 +82,7 @@ static char whatnow __P((void));
|
||||
static void whatnow_help __P((void));
|
||||
static RETSIGTYPE Exit __P((int));
|
||||
static void setup_signals __P((void));
|
||||
int path_matches __P((char *, char **, char *, char **));
|
||||
int command_matches __P((char *, char **, char *, char **));
|
||||
int addr_matches __P((char *));
|
||||
int netgr_matches __P((char *, char *, char *));
|
||||
int usergr_matches __P((char *, char *));
|
||||
@@ -365,7 +365,7 @@ int main(argc, argv)
|
||||
* These exist to allow us to use the same parser as sudo(8).
|
||||
*/
|
||||
|
||||
int path_matches(cmnd, user_args, path, sudoers_args)
|
||||
int command_matches(cmnd, user_args, path, sudoers_args)
|
||||
char *cmnd;
|
||||
char **user_args;
|
||||
char *path;
|
||||
|
Reference in New Issue
Block a user