mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-01 06:45:10 +00:00
no longer return VALIDATE_NOT_OK if there was a runas that didn't
match. Now we can have runas stuff on more than one line.
This commit is contained in:
13
parse.c
13
parse.c
@@ -159,9 +159,9 @@ int validate(check_cmnd)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
while (top) {
|
while (top) {
|
||||||
if (host_matches == TRUE)
|
if (host_matches == TRUE) {
|
||||||
if (cmnd_matches == TRUE)
|
if (cmnd_matches == TRUE) {
|
||||||
if (runas_matches == TRUE)
|
if (runas_matches == TRUE) {
|
||||||
/*
|
/*
|
||||||
* User was granted access to cmnd on host.
|
* User was granted access to cmnd on host.
|
||||||
* If no passwd required return as such.
|
* If no passwd required return as such.
|
||||||
@@ -170,11 +170,12 @@ int validate(check_cmnd)
|
|||||||
return(VALIDATE_OK_NOPASS);
|
return(VALIDATE_OK_NOPASS);
|
||||||
else
|
else
|
||||||
return(VALIDATE_OK);
|
return(VALIDATE_OK);
|
||||||
else
|
}
|
||||||
return(VALIDATE_NOT_OK);
|
} else if (cmnd_matches == FALSE) {
|
||||||
else if (cmnd_matches == FALSE)
|
|
||||||
/* User was explicitly denied acces to cmnd on host. */
|
/* User was explicitly denied acces to cmnd on host. */
|
||||||
return(VALIDATE_NOT_OK);
|
return(VALIDATE_NOT_OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
top--;
|
top--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user