Bring back VALIDATE_ERROR which will be used in the case of memory

allocation errors.
This commit is contained in:
Todd C. Miller
2015-06-04 20:42:42 -06:00
parent 9884df8c9e
commit 8eff57f070
3 changed files with 9 additions and 4 deletions

View File

@@ -294,7 +294,11 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
TAILQ_FOREACH(nss, snl, entries) {
validated = nss->lookup(nss, validated, pwflag);
if (ISSET(validated, VALIDATE_SUCCESS)) {
if (ISSET(validated, VALIDATE_ERROR)) {
/* The lookup function should have printed an error. */
rval = -1;
goto done;
} else if (ISSET(validated, VALIDATE_SUCCESS)) {
/* Handle [SUCCESS=return] */
if (nss->ret_if_found)
break;