1 |
jpp |
1.1 |
diff -up sudo-1.8.6p3/plugins/sudoers/ldap.c.authlogicfix sudo-1.8.6p3/plugins/sudoers/ldap.c |
2 |
|
|
--- sudo-1.8.6p3/plugins/sudoers/ldap.c.authlogicfix 2015-04-30 12:46:48.312316555 +0200 |
3 |
|
|
+++ sudo-1.8.6p3/plugins/sudoers/ldap.c 2015-04-30 12:47:55.010622130 +0200 |
4 |
|
|
@@ -2392,9 +2392,13 @@ sudo_ldap_lookup(struct sudo_nss *nss, i |
5 |
|
|
for (i = 0; i < lres->nentries; i++) { |
6 |
|
|
entry = lres->entries[i].entry; |
7 |
|
|
if ((pwcheck == any && doauth != false) || |
8 |
|
|
- (pwcheck == all && doauth == false)) { |
9 |
|
|
- doauth = sudo_ldap_check_bool(ld, entry, "authenticate"); |
10 |
|
|
+ (pwcheck == all && doauth != true)) { |
11 |
|
|
+ doauth = !!sudo_ldap_check_bool(ld, entry, "authenticate"); |
12 |
|
|
} |
13 |
|
|
+ } |
14 |
|
|
+ |
15 |
|
|
+ for (i = 0; i < lres->nentries; i++) { |
16 |
|
|
+ entry = lres->entries[i].entry; |
17 |
|
|
/* Only check the command when listing another user. */ |
18 |
|
|
if (user_uid == 0 || list_pw == NULL || |
19 |
|
|
user_uid == list_pw->pw_uid || |
20 |
|
|
diff -up sudo-1.8.6p3/plugins/sudoers/sssd.c.authlogicfix sudo-1.8.6p3/plugins/sudoers/sssd.c |
21 |
|
|
--- sudo-1.8.6p3/plugins/sudoers/sssd.c.authlogicfix 2015-04-30 12:46:48.310316576 +0200 |
22 |
|
|
+++ sudo-1.8.6p3/plugins/sudoers/sssd.c 2015-04-30 12:49:50.893415623 +0200 |
23 |
|
|
@@ -1041,9 +1041,13 @@ sudo_sss_lookup(struct sudo_nss *nss, in |
24 |
|
|
for (i = 0; i < sss_result->num_rules; i++) { |
25 |
|
|
rule = sss_result->rules + i; |
26 |
|
|
if ((pwcheck == any && doauth != false) || |
27 |
|
|
- (pwcheck == all && doauth == false)) { |
28 |
|
|
- doauth = sudo_sss_check_bool(handle, rule, "authenticate"); |
29 |
|
|
+ (pwcheck == all && doauth != true)) { |
30 |
|
|
+ doauth = !!sudo_sss_check_bool(handle, rule, "authenticate"); |
31 |
|
|
} |
32 |
|
|
+ } |
33 |
|
|
+ |
34 |
|
|
+ for (i = 0; i < sss_result->num_rules; i++) { |
35 |
|
|
+ rule = sss_result->rules + i; |
36 |
|
|
/* Only check the command when listing another user. */ |
37 |
|
|
if (user_uid == 0 || list_pw == NULL || |
38 |
|
|
user_uid == list_pw->pw_uid || |