Blame SOURCES/0009-ad-add-required-cn-attribute-to-subdomain-object.patch

a3b635
From bf6059eb55c8caa3111ef718db1676c96a67c084 Mon Sep 17 00:00:00 2001
a3b635
From: Sumit Bose <sbose@redhat.com>
a3b635
Date: Thu, 16 Dec 2021 11:14:18 +0100
a3b635
Subject: [PATCH] ad: add required 'cn' attribute to subdomain object
a3b635
MIME-Version: 1.0
a3b635
Content-Type: text/plain; charset=UTF-8
a3b635
Content-Transfer-Encoding: 8bit
a3b635
a3b635
If the forest root is not part of the return trusted domain objects
a3b635
from the local domain controller we generate an object for further
a3b635
processing. During this processing it is expected that the 'cn'
a3b635
attribute is set and contains the name of the forest root. So far this
a3b635
attribute was missing and it is now added by this patch.
a3b635
a3b635
Resolves: https://github.com/SSSD/sssd/issues/5926
a3b635
a3b635
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
a3b635
---
a3b635
 src/providers/ad/ad_subdomains.c | 7 +++++++
a3b635
 1 file changed, 7 insertions(+)
a3b635
a3b635
diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
a3b635
index 0353de76f..0c3f8ac31 100644
a3b635
--- a/src/providers/ad/ad_subdomains.c
a3b635
+++ b/src/providers/ad/ad_subdomains.c
a3b635
@@ -1646,6 +1646,13 @@ static void ad_check_root_domain_done(struct tevent_req *subreq)
a3b635
         goto done;
a3b635
     }
a3b635
 
a3b635
+    ret = sysdb_attrs_add_string(state->reply[0], AD_AT_DOMAIN_NAME,
a3b635
+                                 state->forest);
a3b635
+    if (ret != EOK) {
a3b635
+        DEBUG(SSSDBG_OP_FAILURE, "sysdb_attrs_add_string() failed.\n");
a3b635
+        goto done;
a3b635
+    }
a3b635
+
a3b635
     err = sss_idmap_sid_to_bin_sid(state->idmap_ctx->map, id,
a3b635
                                    &id_val.data, &id_val.length);
a3b635
     if (err != IDMAP_SUCCESS) {
a3b635
-- 
a3b635
2.26.3
a3b635