dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0095-SYSDB-Read-the-ldb_message-from-loop-s-index-counter.patch

ced1f5
From 80e4aa68587d5a70bfd41f78f17902bf06b447a1 Mon Sep 17 00:00:00 2001
ced1f5
From: Jakub Hrozek <jhrozek@redhat.com>
ced1f5
Date: Tue, 23 Jan 2018 11:11:14 +0100
ced1f5
Subject: [PATCH 95/96] SYSDB: Read the ldb_message from loop's index counter
ced1f5
 when reading subdomain UPNs
ced1f5
MIME-Version: 1.0
ced1f5
Content-Type: text/plain; charset=UTF-8
ced1f5
Content-Transfer-Encoding: 8bit
ced1f5
ced1f5
There was a typo in code that read the UPN suffixes from the subdomain
ced1f5
ldb_message. As a result, the UPN suffixes from the first domain were
ced1f5
always consulted for all domains.
ced1f5
ced1f5
Related to:
ced1f5
https://pagure.io/SSSD/sssd/issue/3431
ced1f5
ced1f5
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
ced1f5
Reviewed-by: Sumit Bose <sbose@redhat.com>
ced1f5
(cherry picked from commit a8a3fcbf6f75a7c2665e8bf503c186e07dfab333)
ced1f5
---
ced1f5
 src/db/sysdb_subdomains.c | 2 +-
ced1f5
 1 file changed, 1 insertion(+), 1 deletion(-)
ced1f5
ced1f5
diff --git a/src/db/sysdb_subdomains.c b/src/db/sysdb_subdomains.c
ced1f5
index 0dd05c24c963f12a28ef6f6b64dc40faa7fcc649..b0863b7935b060cb545197005c84f51efbc2d49c 100644
ced1f5
--- a/src/db/sysdb_subdomains.c
ced1f5
+++ b/src/db/sysdb_subdomains.c
ced1f5
@@ -386,7 +386,7 @@ errno_t sysdb_update_subdomains(struct sss_domain_info *domain,
ced1f5
                                              SYSDB_SUBDOMAIN_FOREST, NULL);
ced1f5
 
ced1f5
         upn_suffixes = NULL;
ced1f5
-        tmp_el = ldb_msg_find_element(res->msgs[0], SYSDB_UPN_SUFFIXES);
ced1f5
+        tmp_el = ldb_msg_find_element(res->msgs[i], SYSDB_UPN_SUFFIXES);
ced1f5
         if (tmp_el != NULL) {
ced1f5
             upn_suffixes = sss_ldb_el_to_string_list(tmp_ctx, tmp_el);
ced1f5
             if (upn_suffixes == NULL) {
ced1f5
-- 
ced1f5
2.14.3
ced1f5