Fix exit value of "sudo -l command" in sudoers module.

This commit is contained in:
Todd C. Miller
2011-03-03 09:38:15 -05:00
parent ca86faac93
commit 8ee8a0d87a

View File

@@ -309,6 +309,7 @@ display_privs(struct sudo_nss_list *snl, struct passwd *pw)
/* /*
* Check user_cmnd against sudoers and print the matching entry if the * Check user_cmnd against sudoers and print the matching entry if the
* command is allowed. * command is allowed.
* Returns TRUE if the command is allowed, else FALSE.
*/ */
int int
display_cmnd(struct sudo_nss_list *snl, struct passwd *pw) display_cmnd(struct sudo_nss_list *snl, struct passwd *pw)
@@ -320,7 +321,7 @@ display_cmnd(struct sudo_nss_list *snl, struct passwd *pw)
tq_foreach_fwd(snl, nss) { tq_foreach_fwd(snl, nss) {
if (nss->display_cmnd(nss, pw) == 0) if (nss->display_cmnd(nss, pw) == 0)
return 0; return TRUE;
} }
return 1; return FALSE;
} }