privileges. The "matched" variable is not boolean, it can also
have the value UNSPEC so we need to check explicitly for true.
Bug #738
/* Only check the command when listing another user. */
if (user_uid == 0 || list_pw == NULL ||
user_uid == list_pw->pw_uid ||
- sudo_ldap_check_command(ld, entry, NULL)) {
+ sudo_ldap_check_command(ld, entry, NULL) == true) {
matched = true;
break;
}
}
- if (matched || user_uid == 0) {
+ if (matched == true || user_uid == 0) {
SET(ret, VALIDATE_SUCCESS);
CLR(ret, VALIDATE_FAILURE);
if (def_authenticate) {
/* Only check the command when listing another user. */
if (user_uid == 0 || list_pw == NULL ||
user_uid == list_pw->pw_uid ||
- sudo_sss_check_command(handle, rule, NULL)) {
+ sudo_sss_check_command(handle, rule, NULL) == true) {
matched = true;
break;
}
}
}
- if (matched || user_uid == 0) {
+ if (matched == true || user_uid == 0) {
SET(ret, VALIDATE_SUCCESS);
CLR(ret, VALIDATE_FAILURE);
if (def_authenticate) {