summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa
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/providers/ipa
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/providers/ipa')
-rw-r--r--src/providers/ipa/ipa_access.c2
-rw-r--r--src/providers/ipa/ipa_hbac_common.c4
-rw-r--r--src/providers/ipa/ipa_idmap.c6
-rw-r--r--src/providers/ipa/ipa_selinux.c4
-rw-r--r--src/providers/ipa/ipa_subdomains.c2
-rw-r--r--src/providers/ipa/ipa_subdomains_id.c10
6 files changed, 14 insertions, 14 deletions
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
index bb8e45cf9..ed52132ad 100644
--- a/src/providers/ipa/ipa_access.c
+++ b/src/providers/ipa/ipa_access.c
@@ -89,7 +89,7 @@ void ipa_access_handler(struct be_req *be_req)
dom = be_ctx->domain;
if (strcasecmp(pd->domain, be_ctx->domain->name) != 0) {
/* Subdomain request, verify subdomain */
- dom = find_subdomain_by_name(be_ctx->domain, pd->domain, true);
+ dom = find_domain_by_name(be_ctx->domain, pd->domain, true);
}
/* First, verify that this account isn't locked.
diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c
index 317be9944..7d68aa512 100644
--- a/src/providers/ipa/ipa_hbac_common.c
+++ b/src/providers/ipa/ipa_hbac_common.c
@@ -449,9 +449,9 @@ hbac_ctx_to_eval_request(TALLOC_CTX *mem_ctx,
/* Get user the user name and groups,
* take care of subdomain users as well */
if (strcasecmp(pd->domain, domain->name) != 0) {
- user_dom = find_subdomain_by_name(domain, pd->domain, true);
+ user_dom = find_domain_by_name(domain, pd->domain, true);
if (user_dom == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, "find_subdomain_by_name failed.\n");
+ DEBUG(SSSDBG_OP_FAILURE, "find_domain_by_name failed.\n");
ret = ENOMEM;
goto done;
}
diff --git a/src/providers/ipa/ipa_idmap.c b/src/providers/ipa/ipa_idmap.c
index 7e4f985f3..4e6831082 100644
--- a/src/providers/ipa/ipa_idmap.c
+++ b/src/providers/ipa/ipa_idmap.c
@@ -84,11 +84,11 @@ static errno_t ipa_idmap_check_posix_child(struct sdap_idmap_ctx *idmap_ctx,
return EINVAL;
}
- forest_root = find_subdomain_by_name(idmap_ctx->id_ctx->be->domain,
- dom->forest, true);
+ forest_root = find_domain_by_name(idmap_ctx->id_ctx->be->domain,
+ dom->forest, true);
if (forest_root == NULL) {
DEBUG(SSSDBG_OP_FAILURE,
- "find_subdomain_by_name failed to find forest root [%s].\n",
+ "find_domain_by_name failed to find forest root [%s].\n",
dom->forest);
return ENOENT;
}
diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c
index 927e5456f..6cb014e43 100644
--- a/src/providers/ipa/ipa_selinux.c
+++ b/src/providers/ipa/ipa_selinux.c
@@ -119,8 +119,8 @@ void ipa_selinux_handler(struct be_req *be_req)
pd->domain);
goto fail;
} else {
- user_domain = find_subdomain_by_name(subdom_be_ctx->domain,
- pd->domain, true);
+ user_domain = find_domain_by_name(subdom_be_ctx->domain,
+ pd->domain, true);
if (user_domain == NULL) {
DEBUG(SSSDBG_MINOR_FAILURE, "No domain entry found " \
"for [%s].\n", pd->domain);
diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c
index 7103ba28a..524504846 100644
--- a/src/providers/ipa/ipa_subdomains.c
+++ b/src/providers/ipa/ipa_subdomains.c
@@ -342,7 +342,7 @@ const char *get_flat_name_from_subdomain_name(struct be_ctx *be_ctx,
return NULL;
}
- dom = find_subdomain_by_name(ctx->be_ctx->domain, name, true);
+ dom = find_domain_by_name(ctx->be_ctx->domain, name, true);
if (dom) {
return dom->flat_name;
}
diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c
index 1c4c315a7..113bc6c06 100644
--- a/src/providers/ipa/ipa_subdomains_id.c
+++ b/src/providers/ipa/ipa_subdomains_id.c
@@ -75,10 +75,10 @@ struct tevent_req *ipa_get_subdom_acct_send(TALLOC_CTX *memctx,
goto fail;
}
- state->domain = find_subdomain_by_name(state->ctx->be->domain,
- ar->domain, true);
+ state->domain = find_domain_by_name(state->ctx->be->domain,
+ ar->domain, true);
if (state->domain == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, "find_subdomain_by_name failed.\n");
+ DEBUG(SSSDBG_OP_FAILURE, "find_domain_by_name failed.\n");
ret = ENOMEM;
goto fail;
}
@@ -289,8 +289,8 @@ ipa_get_ad_acct_send(TALLOC_CTX *mem_ctx,
state->ar = ar;
/* This can only be a subdomain request, verify subdomain */
- state->user_dom = find_subdomain_by_name(ipa_ctx->sdap_id_ctx->be->domain,
- ar->domain, true);
+ state->user_dom = find_domain_by_name(ipa_ctx->sdap_id_ctx->be->domain,
+ ar->domain, true);
if (state->user_dom == NULL) {
ret = EINVAL;
goto fail;