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

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