summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/providers/ad/ad_id.c2
-rw-r--r--src/providers/ipa/ipa_idmap.c4
-rw-r--r--src/providers/ldap/sdap_async_users.c2
-rw-r--r--src/providers/simple/simple_access_check.c2
-rw-r--r--src/tests/cmocka/test_utils.c28
-rw-r--r--src/util/domain_info_utils.c4
-rw-r--r--src/util/util.h4
7 files changed, 23 insertions, 23 deletions
diff --git a/src/providers/ad/ad_id.c b/src/providers/ad/ad_id.c
index 90d807b25..2e53a685f 100644
--- a/src/providers/ad/ad_id.c
+++ b/src/providers/ad/ad_id.c
@@ -299,7 +299,7 @@ static bool ad_account_can_shortcut(struct be_ctx *be_ctx,
case BE_FILTER_SECID:
csid = sid == NULL ? filter_value : sid;
- req_dom = find_subdomain_by_sid(domain, csid);
+ req_dom = find_domain_by_sid(domain, csid);
if (req_dom == NULL) {
DEBUG(SSSDBG_OP_FAILURE, "Invalid domain\n");
goto done;
diff --git a/src/providers/ipa/ipa_idmap.c b/src/providers/ipa/ipa_idmap.c
index ae202d616..7e4f985f3 100644
--- a/src/providers/ipa/ipa_idmap.c
+++ b/src/providers/ipa/ipa_idmap.c
@@ -71,10 +71,10 @@ static errno_t ipa_idmap_check_posix_child(struct sdap_idmap_ctx *idmap_ctx,
return EINVAL;
}
- dom = find_subdomain_by_sid(idmap_ctx->id_ctx->be->domain, dom_sid_str);
+ dom = find_domain_by_sid(idmap_ctx->id_ctx->be->domain, dom_sid_str);
if (dom == NULL) {
DEBUG(SSSDBG_OP_FAILURE,
- "find_subdomain_by_sid failed with SID [%s].\n", dom_sid_str);
+ "find_domain_by_sid failed with SID [%s].\n", dom_sid_str);
return EINVAL;
}
diff --git a/src/providers/ldap/sdap_async_users.c b/src/providers/ldap/sdap_async_users.c
index be0536ef3..2331ba9df 100644
--- a/src/providers/ldap/sdap_async_users.c
+++ b/src/providers/ldap/sdap_async_users.c
@@ -180,7 +180,7 @@ int sdap_save_user(TALLOC_CTX *memctx,
/* If this object has a SID available, we will determine the correct
* domain by its SID. */
if (sid_str != NULL) {
- subdomain = find_subdomain_by_sid(get_domains_head(dom), sid_str);
+ subdomain = find_domain_by_sid(get_domains_head(dom), sid_str);
if (subdomain) {
dom = subdomain;
} else {
diff --git a/src/providers/simple/simple_access_check.c b/src/providers/simple/simple_access_check.c
index 4b4400f6d..1fcff445f 100644
--- a/src/providers/simple/simple_access_check.c
+++ b/src/providers/simple/simple_access_check.c
@@ -611,7 +611,7 @@ simple_check_process_group(struct simple_check_groups_state *state,
/* We will look it up in main domain. */
domain = state->ctx->domain;
} else {
- domain = find_subdomain_by_sid(state->ctx->domain, group_sid);
+ domain = find_domain_by_sid(state->ctx->domain, group_sid);
if (domain == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE, "There is no domain information for "
"SID %s\n", group_sid);
diff --git a/src/tests/cmocka/test_utils.c b/src/tests/cmocka/test_utils.c
index e49e7eca5..59b6e08ba 100644
--- a/src/tests/cmocka/test_utils.c
+++ b/src/tests/cmocka/test_utils.c
@@ -306,23 +306,23 @@ void test_find_subdomain_by_name_disabled(void **state)
}
}
-void test_find_subdomain_by_sid_null(void **state)
+void test_find_domain_by_sid_null(void **state)
{
struct dom_list_test_ctx *test_ctx = talloc_get_type(*state,
struct dom_list_test_ctx);
struct sss_domain_info *dom;
- dom = find_subdomain_by_sid(NULL, NULL);
+ dom = find_domain_by_sid(NULL, NULL);
assert_null(dom);
- dom = find_subdomain_by_sid(test_ctx->dom_list, NULL);
+ dom = find_domain_by_sid(test_ctx->dom_list, NULL);
assert_null(dom);
- dom = find_subdomain_by_sid(NULL, "S-1-5-21-1-2-3");
+ dom = find_domain_by_sid(NULL, "S-1-5-21-1-2-3");
assert_null(dom);
}
-void test_find_subdomain_by_sid(void **state)
+void test_find_domain_by_sid(void **state)
{
struct dom_list_test_ctx *test_ctx = talloc_get_type(*state,
struct dom_list_test_ctx);
@@ -342,7 +342,7 @@ void test_find_subdomain_by_sid(void **state)
sid = talloc_asprintf(global_talloc_context, SID_TMPL, c);
assert_non_null(sid);
- dom = find_subdomain_by_sid(test_ctx->dom_list, sid);
+ dom = find_domain_by_sid(test_ctx->dom_list, sid);
assert_non_null(dom);
assert_string_equal(name, dom->name);
assert_string_equal(flat_name, dom->flat_name);
@@ -354,7 +354,7 @@ void test_find_subdomain_by_sid(void **state)
}
}
-void test_find_subdomain_by_sid_missing_sid(void **state)
+void test_find_domain_by_sid_missing_sid(void **state)
{
struct dom_list_test_ctx *test_ctx = talloc_get_type(*state,
struct dom_list_test_ctx);
@@ -386,7 +386,7 @@ void test_find_subdomain_by_sid_missing_sid(void **state)
sid = talloc_asprintf(global_talloc_context, SID_TMPL, c);
assert_non_null(sid);
- dom = find_subdomain_by_sid(test_ctx->dom_list, sid);
+ dom = find_domain_by_sid(test_ctx->dom_list, sid);
if (c == mis - 1) {
assert_null(dom);
} else {
@@ -402,7 +402,7 @@ void test_find_subdomain_by_sid_missing_sid(void **state)
}
}
-void test_find_subdomain_by_sid_disabled(void **state)
+void test_find_domain_by_sid_disabled(void **state)
{
struct dom_list_test_ctx *test_ctx = talloc_get_type(*state,
struct dom_list_test_ctx);
@@ -434,7 +434,7 @@ void test_find_subdomain_by_sid_disabled(void **state)
sid = talloc_asprintf(global_talloc_context, SID_TMPL, c);
assert_non_null(sid);
- dom = find_subdomain_by_sid(test_ctx->dom_list, sid);
+ dom = find_domain_by_sid(test_ctx->dom_list, sid);
if (c == mis - 1) {
assert_null(dom);
} else {
@@ -887,13 +887,13 @@ int main(int argc, const char *argv[])
};
const UnitTest tests[] = {
- unit_test_setup_teardown(test_find_subdomain_by_sid_null,
+ unit_test_setup_teardown(test_find_domain_by_sid_null,
setup_dom_list, teardown_dom_list),
- unit_test_setup_teardown(test_find_subdomain_by_sid,
+ unit_test_setup_teardown(test_find_domain_by_sid,
setup_dom_list, teardown_dom_list),
- unit_test_setup_teardown(test_find_subdomain_by_sid_missing_sid,
+ unit_test_setup_teardown(test_find_domain_by_sid_missing_sid,
setup_dom_list, teardown_dom_list),
- unit_test_setup_teardown(test_find_subdomain_by_sid_disabled,
+ unit_test_setup_teardown(test_find_domain_by_sid_disabled,
setup_dom_list, teardown_dom_list),
unit_test_setup_teardown(test_find_subdomain_by_name_null,
setup_dom_list, teardown_dom_list),
diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c
index 2a8768439..83f3baa62 100644
--- a/src/util/domain_info_utils.c
+++ b/src/util/domain_info_utils.c
@@ -112,7 +112,7 @@ struct sss_domain_info *find_subdomain_by_name(struct sss_domain_info *domain,
return NULL;
}
-struct sss_domain_info *find_subdomain_by_sid(struct sss_domain_info *domain,
+struct sss_domain_info *find_domain_by_sid(struct sss_domain_info *domain,
const char *sid)
{
struct sss_domain_info *dom = domain;
@@ -163,7 +163,7 @@ sss_get_domain_by_sid_ldap_fallback(struct sss_domain_info *domain,
if (strcmp(domain->provider, "ldap") == 0) {
return domain;
} else {
- return find_subdomain_by_sid(get_domains_head(domain), sid);
+ return find_domain_by_sid(get_domains_head(domain), sid);
}
}
diff --git a/src/util/util.h b/src/util/util.h
index 52135e6b0..3cf1bc0a0 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -514,8 +514,8 @@ struct sss_domain_info *get_next_domain(struct sss_domain_info *domain,
struct sss_domain_info *find_subdomain_by_name(struct sss_domain_info *domain,
const char *name,
bool match_any);
-struct sss_domain_info *find_subdomain_by_sid(struct sss_domain_info *domain,
- const char *sid);
+struct sss_domain_info *find_domain_by_sid(struct sss_domain_info *domain,
+ const char *sid);
struct sss_domain_info*
sss_get_domain_by_sid_ldap_fallback(struct sss_domain_info *domain,