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