Blame SOURCES/0033-ad-rename-ads_get_root_id_ctx-to-ads_get_dom_id_ctx.patch

836b22
From 9fb34f034adcd6ed27b53aae0e27c1a08d0d2deb Mon Sep 17 00:00:00 2001
836b22
From: Sumit Bose <sbose@redhat.com>
836b22
Date: Thu, 7 May 2020 21:24:42 +0200
836b22
Subject: [PATCH 33/36] ad: rename ads_get_root_id_ctx() to ads_get_dom_id_ctx
836b22
MIME-Version: 1.0
836b22
Content-Type: text/plain; charset=UTF-8
836b22
Content-Transfer-Encoding: 8bit
836b22
836b22
Since the function can be used to get the id ctx of any domain the
836b22
'root' is removed from the name.
836b22
836b22
Resolves: https://github.com/SSSD/sssd/issues/5151
836b22
836b22
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
836b22
(cherry picked from commit 2bad4d4b299440d33919a9fdb8c4d75814583e12)
836b22
836b22
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
836b22
---
836b22
 src/providers/ad/ad_subdomains.c | 32 ++++++++++++++++----------------
836b22
 1 file changed, 16 insertions(+), 16 deletions(-)
836b22
836b22
diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
836b22
index bb82014fe..c2c4a413c 100644
836b22
--- a/src/providers/ad/ad_subdomains.c
836b22
+++ b/src/providers/ad/ad_subdomains.c
836b22
@@ -1234,37 +1234,37 @@ static errno_t ad_get_slave_domain_recv(struct tevent_req *req)
836b22
 }
836b22
 
836b22
 static struct ad_id_ctx *
836b22
-ads_get_root_id_ctx(struct be_ctx *be_ctx,
836b22
-                    struct ad_id_ctx *ad_id_ctx,
836b22
-                    struct sss_domain_info *root_domain,
836b22
-                    struct sdap_options *opts)
836b22
+ads_get_dom_id_ctx(struct be_ctx *be_ctx,
836b22
+                   struct ad_id_ctx *ad_id_ctx,
836b22
+                   struct sss_domain_info *domain,
836b22
+                   struct sdap_options *opts)
836b22
 {
836b22
     errno_t ret;
836b22
     struct sdap_domain *sdom;
836b22
-    struct ad_id_ctx *root_id_ctx;
836b22
+    struct ad_id_ctx *dom_id_ctx;
836b22
 
836b22
-    sdom = sdap_domain_get(opts, root_domain);
836b22
+    sdom = sdap_domain_get(opts, domain);
836b22
     if (sdom == NULL) {
836b22
         DEBUG(SSSDBG_OP_FAILURE,
836b22
-              "Cannot get the sdom for %s!\n", root_domain->name);
836b22
+              "Cannot get the sdom for %s!\n", domain->name);
836b22
         return NULL;
836b22
     }
836b22
 
836b22
     if (sdom->pvt == NULL) {
836b22
-        ret = ad_subdom_ad_ctx_new(be_ctx, ad_id_ctx, root_domain,
836b22
-                                   &root_id_ctx);
836b22
+        ret = ad_subdom_ad_ctx_new(be_ctx, ad_id_ctx, domain,
836b22
+                                   &dom_id_ctx);
836b22
         if (ret != EOK) {
836b22
             DEBUG(SSSDBG_OP_FAILURE, "ad_subdom_ad_ctx_new failed.\n");
836b22
             return NULL;
836b22
         }
836b22
 
836b22
-        sdom->pvt = root_id_ctx;
836b22
+        sdom->pvt = dom_id_ctx;
836b22
     } else {
836b22
-        root_id_ctx = sdom->pvt;
836b22
+        dom_id_ctx = sdom->pvt;
836b22
     }
836b22
 
836b22
-    root_id_ctx->ldap_ctx->ignore_mark_offline = true;
836b22
-    return root_id_ctx;
836b22
+    dom_id_ctx->ldap_ctx->ignore_mark_offline = true;
836b22
+    return dom_id_ctx;
836b22
 }
836b22
 
836b22
 struct ad_get_root_domain_state {
836b22
@@ -1406,9 +1406,9 @@ static void ad_get_root_domain_done(struct tevent_req *subreq)
836b22
         goto done;
836b22
     }
836b22
 
836b22
-    state->root_id_ctx = ads_get_root_id_ctx(state->be_ctx,
836b22
-                                             state->sd_ctx->ad_id_ctx,
836b22
-                                             root_domain, state->opts);
836b22
+    state->root_id_ctx = ads_get_dom_id_ctx(state->be_ctx,
836b22
+                                            state->sd_ctx->ad_id_ctx,
836b22
+                                            root_domain, state->opts);
836b22
     if (state->root_id_ctx == NULL) {
836b22
         DEBUG(SSSDBG_OP_FAILURE, "Cannot create id ctx for the root domain\n");
836b22
         ret = EFAULT;
836b22
-- 
836b22
2.21.1
836b22