commands can start with ./* not just /* -- fixes a serious security hole.
This commit is contained in:
2
parse.c
2
parse.c
@@ -218,7 +218,7 @@ int command_matches(cmnd, user_args, path, sudoers_args)
|
|||||||
static char *c;
|
static char *c;
|
||||||
|
|
||||||
/* don't bother with pseudo commands like "validate" */
|
/* don't bother with pseudo commands like "validate" */
|
||||||
if (*cmnd != '/')
|
if (*cmnd != '/' && *cmnd != '.')
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
|
||||||
/* only need to stat cmnd once since it never changes */
|
/* only need to stat cmnd once since it never changes */
|
||||||
|
Reference in New Issue
Block a user