Honor NOPASSWD tag for denied commands too.

This commit is contained in:
Todd C. Miller
2011-09-09 09:57:39 -04:00
parent b3b268c3a4
commit dacb1e47f3

View File

@@ -250,6 +250,8 @@ sudo_file_lookup(struct sudo_nss *nss, int validated, int pwflag)
} else if (match == DENY) {
SET(validated, VALIDATE_NOT_OK);
CLR(validated, VALIDATE_OK);
if (tags != NULL && tags->nopasswd != UNSPEC)
def_authenticate = !tags->nopasswd;
}
restore_perms();
return validated;