mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-02 07:15:27 +00:00
Merge 5177a284b9ff 549f8f7c2463 88f3181692fe from 1.7 branch.
This commit is contained in:
@@ -375,7 +375,7 @@ command_matches(sudoers_cmnd, sudoers_args)
|
||||
char *sudoers_args;
|
||||
{
|
||||
/* Check for pseudo-commands */
|
||||
if (strchr(user_cmnd, '/') == NULL) {
|
||||
if (sudoers_cmnd[0] != '/') {
|
||||
/*
|
||||
* Return true if both sudoers_cmnd and user_cmnd are "sudoedit" AND
|
||||
* a) there are no args in sudoers OR
|
||||
@@ -465,7 +465,7 @@ command_matches_glob(sudoers_cmnd, sudoers_args)
|
||||
* else return false.
|
||||
*/
|
||||
#define GLOB_FLAGS (GLOB_NOSORT | GLOB_MARK | GLOB_BRACE | GLOB_TILDE)
|
||||
if (glob(sudoers_cmnd, GLOB_FLAGS, NULL, &gl) != 0) {
|
||||
if (glob(sudoers_cmnd, GLOB_FLAGS, NULL, &gl) != 0 || gl.gl_pathc == 0) {
|
||||
globfree(&gl);
|
||||
return(FALSE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user