1 |
diff -up ./plugins/sudoers/ldap.c.ldap-sssd-notallowedcmnd ./plugins/sudoers/ldap.c |
2 |
--- ./plugins/sudoers/ldap.c.ldap-sssd-notallowedcmnd 2016-10-06 17:52:12.958313455 +0200 |
3 |
+++ ./plugins/sudoers/ldap.c 2016-10-06 17:53:10.880256349 +0200 |
4 |
@@ -1932,8 +1932,9 @@ sudo_ldap_display_cmnd(struct sudo_nss * |
5 |
lres = sudo_ldap_result_get(nss, pw); |
6 |
for (i = 0; i < lres->nentries; i++) { |
7 |
entry = lres->entries[i].entry; |
8 |
- if (sudo_ldap_check_command(ld, entry, NULL) && |
9 |
- sudo_ldap_check_runas(ld, entry)) { |
10 |
+ if (!sudo_ldap_check_runas(ld, entry)) |
11 |
+ continue; |
12 |
+ if (sudo_ldap_check_command(ld, entry, NULL) == true) { |
13 |
found = true; |
14 |
goto done; |
15 |
} |
16 |
diff -up ./plugins/sudoers/sssd.c.ldap-sssd-notallowedcmnd ./plugins/sudoers/sssd.c |
17 |
--- ./plugins/sudoers/sssd.c.ldap-sssd-notallowedcmnd 2016-10-06 17:54:17.885876637 +0200 |
18 |
+++ ./plugins/sudoers/sssd.c 2016-10-06 17:55:26.530435388 +0200 |
19 |
@@ -1173,8 +1173,9 @@ sudo_sss_display_cmnd(struct sudo_nss *n |
20 |
|
21 |
for (i = 0; i < sss_result->num_rules; i++) { |
22 |
rule = sss_result->rules + i; |
23 |
- if (sudo_sss_check_command(handle, rule, NULL) && |
24 |
- sudo_sss_check_runas(handle, rule)) { |
25 |
+ if (!sudo_sss_check_runas(handle, rule)) |
26 |
+ continue; |
27 |
+ if (sudo_sss_check_command(handle, rule, NULL) == true) { |
28 |
found = true; |
29 |
goto done; |
30 |
} |