summaryrefslogtreecommitdiffstats
path: root/src/providers
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
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')
-rw-r--r--src/providers/ad/ad_access.c4
-rw-r--r--src/providers/ad/ad_id.c2
-rw-r--r--src/providers/ad/ad_subdomains.c4
-rw-r--r--src/providers/data_provider_be.c2
-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
-rw-r--r--src/providers/krb5/krb5_utils.c4
-rw-r--r--src/providers/ldap/ldap_access.c2
12 files changed, 23 insertions, 23 deletions
diff --git a/src/providers/ad/ad_access.c b/src/providers/ad/ad_access.c
index 06ad47417..74077ec10 100644
--- a/src/providers/ad/ad_access.c
+++ b/src/providers/ad/ad_access.c
@@ -456,9 +456,9 @@ ad_access_handler(struct be_req *breq)
/* Handle subdomains */
if (strcasecmp(pd->domain, be_ctx->domain->name) != 0) {
- domain = find_subdomain_by_name(be_ctx->domain, pd->domain, true);
+ domain = find_domain_by_name(be_ctx->domain, pd->domain, true);
if (domain == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, "find_subdomain_by_name failed.\n");
+ DEBUG(SSSDBG_OP_FAILURE, "find_domain_by_name failed.\n");
be_req_terminate(breq, DP_ERR_FATAL, PAM_SYSTEM_ERR, NULL);
return;
}
diff --git a/src/providers/ad/ad_id.c b/src/providers/ad/ad_id.c
index 2e53a685f..ddb108370 100644
--- a/src/providers/ad/ad_id.c
+++ b/src/providers/ad/ad_id.c
@@ -360,7 +360,7 @@ ad_account_info_handler(struct be_req *be_req)
dom = be_ctx->domain;
if (strcasecmp(ar->domain, be_ctx->domain->name) != 0) {
/* Subdomain request, verify subdomain */
- dom = find_subdomain_by_name(be_ctx->domain, ar->domain, true);
+ dom = find_domain_by_name(be_ctx->domain, ar->domain, true);
}
if (dom == NULL) {
diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
index efe4b3fe1..f7574d05d 100644
--- a/src/providers/ad/ad_subdomains.c
+++ b/src/providers/ad/ad_subdomains.c
@@ -799,8 +799,8 @@ static struct ad_id_ctx *ads_get_root_id_ctx(struct ad_subdomains_req_ctx *ctx)
}
/* With a subsequent run, the root should already be known */
- root = find_subdomain_by_name(ctx->sd_ctx->be_ctx->domain,
- name, false);
+ root = find_domain_by_name(ctx->sd_ctx->be_ctx->domain,
+ name, false);
if (root == NULL) {
DEBUG(SSSDBG_OP_FAILURE, "Could not find the root domain\n");
return NULL;
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
index dbd48b20d..f3432492d 100644
--- a/src/providers/data_provider_be.c
+++ b/src/providers/data_provider_be.c
@@ -161,7 +161,7 @@ static errno_t be_req_set_domain(struct be_req *be_req, const char *domain)
{
struct sss_domain_info *dom = NULL;
- dom = find_subdomain_by_name(be_req->be_ctx->domain, domain, true);
+ dom = find_domain_by_name(be_req->be_ctx->domain, domain, true);
if (dom == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE, "Unknown domain [%s]!\n", domain);
return ERR_DOMAIN_NOT_FOUND;
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;
diff --git a/src/providers/krb5/krb5_utils.c b/src/providers/krb5/krb5_utils.c
index 0734310ca..0d2e28119 100644
--- a/src/providers/krb5/krb5_utils.c
+++ b/src/providers/krb5/krb5_utils.c
@@ -1094,9 +1094,9 @@ errno_t get_domain_or_subdomain(struct be_ctx *be_ctx,
if (domain_name != NULL &&
strcasecmp(domain_name, be_ctx->domain->name) != 0) {
- *dom = find_subdomain_by_name(be_ctx->domain, domain_name, true);
+ *dom = find_domain_by_name(be_ctx->domain, domain_name, true);
if (*dom == NULL) {
- DEBUG(SSSDBG_OP_FAILURE, "find_subdomain_by_name failed.\n");
+ DEBUG(SSSDBG_OP_FAILURE, "find_domain_by_name failed.\n");
return ENOMEM;
}
} else {
diff --git a/src/providers/ldap/ldap_access.c b/src/providers/ldap/ldap_access.c
index 05354d10c..1913cd9a9 100644
--- a/src/providers/ldap/ldap_access.c
+++ b/src/providers/ldap/ldap_access.c
@@ -61,7 +61,7 @@ void sdap_pam_access_handler(struct be_req *breq)
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);
}
req = sdap_access_send(breq, be_ctx->ev, be_ctx,