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

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