Add VALIDATE_NOT_OK_NOPASS for when user is not allowed to run a command

but the NOPASSWD flag was set.
Make runasspec, runaslist, runasuser, and nopasswd typeless in parse.yacc
Add support for '!' in the runas list
Fix double printing of '%' and '+' for groups and netgroups respectively
Add *_matched macros (no need for local stack variable).  Should only be
used directly after a pop (since top must be >= 2).
This commit is contained in:
Todd C. Miller
1999-04-06 05:00:29 +00:00
parent 9284e417ca
commit 499e869237
6 changed files with 304 additions and 266 deletions

View File

@@ -178,7 +178,10 @@ int validate(check_cmnd)
return(VALIDATE_OK);
} else if (cmnd_matches == FALSE) {
/* User was explicitly denied acces to cmnd on host. */
return(VALIDATE_NOT_OK);
if (no_passwd == TRUE)
return(VALIDATE_NOT_OK_NOPASS);
else
return(VALIDATE_NOT_OK);
}
}
}