made -v (validate) work
This commit is contained in:
31
parse.c
31
parse.c
@@ -126,16 +126,29 @@ int validate()
|
|||||||
*/
|
*/
|
||||||
return(VALIDATE_NO_USER);
|
return(VALIDATE_NO_USER);
|
||||||
|
|
||||||
while (top) {
|
/*
|
||||||
if (host_matches == TRUE)
|
* if the cmnd is the pseudo-command "validate"
|
||||||
if (cmnd_matches == TRUE)
|
* return VALIDATE_OK if the host matches, else
|
||||||
/* user was granted access to cmnd on host */
|
* check host and command.
|
||||||
|
*/
|
||||||
|
if (!strcmp(cmnd, "validate"))
|
||||||
|
while (top) {
|
||||||
|
if (host_matches == TRUE)
|
||||||
|
/* user may always do validate on allowed hosts */
|
||||||
return(VALIDATE_OK);
|
return(VALIDATE_OK);
|
||||||
else if (cmnd_matches == FALSE)
|
top--;
|
||||||
/* user was explicitly denied acces to cmnd on host */
|
}
|
||||||
return(VALIDATE_NOT_OK);
|
else
|
||||||
top--;
|
while (top) {
|
||||||
}
|
if (host_matches == TRUE)
|
||||||
|
if (cmnd_matches == TRUE)
|
||||||
|
/* user was granted access to cmnd on host */
|
||||||
|
return(VALIDATE_OK);
|
||||||
|
else if (cmnd_matches == FALSE)
|
||||||
|
/* user was explicitly denied acces to cmnd on host */
|
||||||
|
return(VALIDATE_NOT_OK);
|
||||||
|
top--;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* we popped everything off the stack =>
|
* we popped everything off the stack =>
|
||||||
|
Reference in New Issue
Block a user