diff options
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/sysdb_subdomains.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/db/sysdb_subdomains.c b/src/db/sysdb_subdomains.c index 142520c18..546dc1c8d 100644 --- a/src/db/sysdb_subdomains.c +++ b/src/db/sysdb_subdomains.c @@ -111,6 +111,8 @@ struct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx, dom->enumerate = enumerate; dom->fqnames = true; dom->mpg = mpg; + dom->state = DOM_ACTIVE; + /* If the parent domain filters out group members, the subdomain should * as well if configured */ inherit_option = string_in_list(CONFDB_DOMAIN_IGNORE_GROUP_MEMBERS, @@ -268,7 +270,7 @@ errno_t sysdb_update_subdomains(struct sss_domain_info *domain) /* disable all domains, * let the search result refresh any that are still valid */ for (dom = domain->subdomains; dom; dom = get_next_domain(dom, false)) { - dom->disabled = true; + sss_domain_set_state(dom, DOM_DISABLED); } if (res->count == 0) { @@ -312,7 +314,8 @@ errno_t sysdb_update_subdomains(struct sss_domain_info *domain) /* explicitly use dom->next as we need to check 'disabled' domains */ for (dom = domain->subdomains; dom; dom = dom->next) { if (strcasecmp(dom->name, name) == 0) { - dom->disabled = false; + sss_domain_set_state(dom, DOM_ACTIVE); + /* in theory these may change, but it should never happen */ if (strcasecmp(dom->realm, realm) != 0) { DEBUG(SSSDBG_TRACE_INTERNAL, |