summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorPavel Reichl <preichl@redhat.com>2014-07-21 08:06:23 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-07-22 09:40:08 +0200
commitdb18dda869bc6c52a41797b2066cf121cf10f49c (patch)
tree7bdfa5d0ee9ce1d135202e1f87d63f95aafe0c6b /src/util
parent9ca0071db0e226e4e65b2a80fdeddd5048ca8990 (diff)
downloadsssd-db18dda869bc6c52a41797b2066cf121cf10f49c.tar.gz
sssd-db18dda869bc6c52a41797b2066cf121cf10f49c.tar.xz
sssd-db18dda869bc6c52a41797b2066cf121cf10f49c.zip
UTIL: rename find_subdomain_by_name
The function was named "find_subdomain" yet it could find both main domain and subdomain. sed 's/find_subdomain_by_name/find_domain_by_name/' -i `find . -name "*.[ch]"` Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/domain_info_utils.c8
-rw-r--r--src/util/usertools.c2
-rw-r--r--src/util/util.h6
3 files changed, 8 insertions, 8 deletions
diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c
index 83f3baa62..b449591a5 100644
--- a/src/util/domain_info_utils.c
+++ b/src/util/domain_info_utils.c
@@ -87,9 +87,9 @@ bool subdomain_enumerates(struct sss_domain_info *parent,
return false;
}
-struct sss_domain_info *find_subdomain_by_name(struct sss_domain_info *domain,
- const char *name,
- bool match_any)
+struct sss_domain_info *find_domain_by_name(struct sss_domain_info *domain,
+ const char *name,
+ bool match_any)
{
struct sss_domain_info *dom = domain;
@@ -193,7 +193,7 @@ find_subdomain_by_object_name(struct sss_domain_info *domain,
if (domainname == NULL) {
dom = domain;
} else {
- dom = find_subdomain_by_name(domain, domainname, true);
+ dom = find_domain_by_name(domain, domainname, true);
}
done:
diff --git a/src/util/usertools.c b/src/util/usertools.c
index 57945c7f1..06384b849 100644
--- a/src/util/usertools.c
+++ b/src/util/usertools.c
@@ -399,7 +399,7 @@ static struct sss_domain_info * match_any_domain_or_subdomain_name(
return dom;
}
- return find_subdomain_by_name(dom, dmatch, true);
+ return find_domain_by_name(dom, dmatch, true);
}
int sss_parse_name_for_domains(TALLOC_CTX *memctx,
diff --git a/src/util/util.h b/src/util/util.h
index 3cf1bc0a0..ee84735c5 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -511,9 +511,9 @@ struct sss_domain_info *get_domains_head(struct sss_domain_info *domain);
struct sss_domain_info *get_next_domain(struct sss_domain_info *domain,
bool descend);
-struct sss_domain_info *find_subdomain_by_name(struct sss_domain_info *domain,
- const char *name,
- bool match_any);
+struct sss_domain_info *find_domain_by_name(struct sss_domain_info *domain,
+ const char *name,
+ bool match_any);
struct sss_domain_info *find_domain_by_sid(struct sss_domain_info *domain,
const char *sid);