From b5825c74b6bf7a99ae2172392dbecb51179013a6 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 18 Aug 2015 15:15:44 +0000 Subject: UTIL: Convert domain->disabled into tri-state with domain states MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Required for: https://fedorahosted.org/sssd/ticket/2637 This is a first step towards making it possible for domain to be around, but not contacted by Data Provider. Also explicitly create domains as active, previously we only relied on talloc_zero marking dom->disabled as false. Reviewed-by: Pavel Březina --- src/tests/cmocka/test_utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tests/cmocka/test_utils.c') diff --git a/src/tests/cmocka/test_utils.c b/src/tests/cmocka/test_utils.c index 2e413c87d..a22c39c47 100644 --- a/src/tests/cmocka/test_utils.c +++ b/src/tests/cmocka/test_utils.c @@ -259,7 +259,7 @@ void test_find_domain_by_name_disabled(void **state) dom = dom->next; } assert_non_null(dom); - dom->disabled = true; + sss_domain_set_state(dom, DOM_DISABLED); for (c = 0; c < test_ctx->dom_count; c++) { name = talloc_asprintf(global_talloc_context, DOMNAME_TMPL, c); @@ -426,7 +426,7 @@ void test_find_domain_by_sid_disabled(void **state) dom = dom->next; } assert_non_null(dom); - dom->disabled = true; + sss_domain_set_state(dom, DOM_DISABLED); for (c = 0; c < test_ctx->dom_count; c++) { name = talloc_asprintf(global_talloc_context, DOMNAME_TMPL, c); @@ -578,7 +578,7 @@ static void test_get_next_domain_disabled(void **state) struct sss_domain_info *dom = NULL; for (dom = test_ctx->dom_list; dom; dom = get_next_domain(dom, true)) { - dom->disabled = true; + sss_domain_set_state(dom, DOM_DISABLED); } dom = get_next_domain(test_ctx->dom_list, true); -- cgit