made -v (validate) work

This commit is contained in:
Todd C. Miller
1995-03-28 20:26:55 +00:00
parent 839b5e7ffd
commit f0fff46a16

13
parse.c
View File

@@ -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)