made -v (validate) work
This commit is contained in:
13
parse.c
13
parse.c
@@ -126,6 +126,19 @@ int validate()
|
|||||||
*/
|
*/
|
||||||
return(VALIDATE_NO_USER);
|
return(VALIDATE_NO_USER);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* if the cmnd is the pseudo-command "validate"
|
||||||
|
* return VALIDATE_OK if the host matches, else
|
||||||
|
* 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);
|
||||||
|
top--;
|
||||||
|
}
|
||||||
|
else
|
||||||
while (top) {
|
while (top) {
|
||||||
if (host_matches == TRUE)
|
if (host_matches == TRUE)
|
||||||
if (cmnd_matches == TRUE)
|
if (cmnd_matches == TRUE)
|
||||||
|
Reference in New Issue
Block a user