diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-14 20:30:04 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-02-10 22:08:47 +0100 |
commit | bba1a5fd62cffcae076d1351df5a83fbc4a6ec17 (patch) | |
tree | 8dbc22a528ccda8cc889a5297df2edb1919d86e6 /src/responder/pac | |
parent | 1f800ebb0f190854b8296146174f3d696a426333 (diff) | |
download | sssd-bba1a5fd62cffcae076d1351df5a83fbc4a6ec17.tar.gz sssd-bba1a5fd62cffcae076d1351df5a83fbc4a6ec17.tar.bz2 sssd-bba1a5fd62cffcae076d1351df5a83fbc4a6ec17.zip |
Change the way domains are linked.
- Use a double-linked list for domains and subdomains.
- Never remove a subdomain, simply mark it as disabled if it becomes
unused.
- Rework the way subdomains are refreshed.
Now sysdb_update_subdomains() actually updates the current subdomains
and marks as disabled the ones not found in the sysdb or add new ones
found. It never removes them.
Removal of missing domains from sysdb is deferred to the providers,
which will perform it at refresh time, for the ipa provider that is
done by ipa_subdomains_write_mappings() now.
sysdb_update_subdomains() is then used to update the memory hierarchy
of the subdomains.
- Removes sysdb_get_subdomains()
- Removes copy_subdomain()
- Add sysdb_subdomain_delete()
Diffstat (limited to 'src/responder/pac')
-rw-r--r-- | src/responder/pac/pacsrv_utils.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/responder/pac/pacsrv_utils.c b/src/responder/pac/pacsrv_utils.c index cab58264..2708e5a2 100644 --- a/src/responder/pac/pacsrv_utils.c +++ b/src/responder/pac/pacsrv_utils.c @@ -76,14 +76,13 @@ struct sss_domain_info *find_domain_by_id(struct sss_domain_info *domains, { struct sss_domain_info *dom; struct sss_domain_info *ret_dom = NULL; - size_t c; if (id_str == NULL) { DEBUG(SSSDBG_OP_FAILURE, ("Missing domain id.\n")); return NULL; } - for (dom = domains; dom; dom = get_next_domain(dom, false)) { + for (dom = domains; dom; dom = get_next_domain(dom, true)) { if (dom->domain_id == NULL) { continue; } @@ -92,14 +91,6 @@ struct sss_domain_info *find_domain_by_id(struct sss_domain_info *domains, ret_dom = dom; break; } - - for (c = 0; c < dom->subdomain_count; c++) { - if (strcasecmp(dom->subdomains[c]->domain_id, id_str) == 0) { - ret_dom = dom->subdomains[c]; - break; - } - } - } if (!ret_dom) { |