[SSSD] [PATCH] subdom: Remove unused function get_flat_name_from_subdomain_name

Jakub Hrozek jhrozek at redhat.com
Wed Apr 15 19:48:12 UTC 2015


Hi,

I found an unused function while going through the subdomain code. A
simple patch is attached.
-------------- next part --------------
>From 0d5c4046856763640d0f262203a9cbfc6ca10741 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Wed, 15 Apr 2015 21:12:26 +0200
Subject: [PATCH] subdom: Remove unused function
 get_flat_name_from_subdomain_name

The function was added in 70eaade10feedd7845e39170d0b7eebf3a030af1 and
is unused since b8d703cf3aba81800cf1b8ccca64bb00ef0b30f7
---
 src/providers/ipa/ipa_subdomains.c | 21 ---------------------
 src/providers/ipa/ipa_subdomains.h |  3 ---
 2 files changed, 24 deletions(-)

diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c
index 0fe2a8dd600fee44c5ab27b664dd47b1cb045dc9..20657ebb556f75108f64faecc6ad1ccc1d7e26fd 100644
--- a/src/providers/ipa/ipa_subdomains.c
+++ b/src/providers/ipa/ipa_subdomains.c
@@ -384,27 +384,6 @@ ipa_ad_subdom_remove(struct ipa_subdomains_ctx *ctx,
     talloc_zfree(sdom);
 }
 
-const char *get_flat_name_from_subdomain_name(struct be_ctx *be_ctx,
-                                              const char *name)
-{
-    struct ipa_subdomains_ctx *ctx;
-    struct sss_domain_info *dom;
-
-    ctx = talloc_get_type(be_ctx->bet_info[BET_SUBDOMAINS].pvt_bet_data,
-                          struct ipa_subdomains_ctx);
-    if (ctx == NULL) {
-        DEBUG(SSSDBG_TRACE_ALL, "Subdomains are not configured.\n");
-        return NULL;
-    }
-
-    dom = find_domain_by_name(ctx->be_ctx->domain, name, true);
-    if (dom) {
-        return dom->flat_name;
-    }
-
-    return NULL;
-}
-
 static errno_t ipa_ranges_parse_results(TALLOC_CTX *mem_ctx,
                                         char *domain_name,
                                         size_t count,
diff --git a/src/providers/ipa/ipa_subdomains.h b/src/providers/ipa/ipa_subdomains.h
index ceb862226b504bca6c9c596554fb88e6df1d51c3..5266943f8e34f6e918022ee470f9c8fcc2199a8e 100644
--- a/src/providers/ipa/ipa_subdomains.h
+++ b/src/providers/ipa/ipa_subdomains.h
@@ -30,9 +30,6 @@
 
 struct be_ctx *ipa_get_subdomains_be_ctx(struct be_ctx *be_ctx);
 
-const char *get_flat_name_from_subdomain_name(struct be_ctx *be_ctx,
-                                              const char *name);
-
 int ipa_subdom_init(struct be_ctx *be_ctx,
                     struct ipa_id_ctx *id_ctx,
                     struct bet_ops **ops,
-- 
2.1.0



More information about the sssd-devel mailing list