Fix bogus int -> bool conversion; tags can have a value of -1.

This commit is contained in:
Todd C. Miller
2012-03-12 19:34:19 -04:00
parent 19fc56462d
commit d539c606e0

View File

@@ -169,7 +169,7 @@ sudo_file_lookup(struct sudo_nss *nss, int validated, int pwflag)
* Always check the host and user.
*/
if (pwflag) {
bool nopass;
int nopass;
enum def_tuple pwcheck;
pwcheck = (pwflag == -1) ? never : sudo_defs_table[pwflag].sd_un.tuple;