mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 22:05:46 +00:00
Fix the check for whether a user is allowed to lists another user's
privileges. The "matched" variable is not boolean, it can also have the value UNSPEC so we need to check explicitly for true. Bug #738
This commit is contained in:
@@ -1137,13 +1137,13 @@ sudo_sss_lookup(struct sudo_nss *nss, int ret, int pwflag)
|
||||
/* 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) {
|
||||
|
Reference in New Issue
Block a user