mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 13:28:10 +00:00
commands can start with ./* not just /* -- fixes a serious security hole.
This commit is contained in:
parent
07e09b16f2
commit
ab9b352455
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 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user