diff options
author | Sumit Bose <sbose@redhat.com> | 2013-06-12 15:47:26 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-06-28 20:20:59 +0200 |
commit | b56b06e199f15a8a840b36bc7cb8010e39ae761d (patch) | |
tree | 214e4533ce5b8def6543645279325ee84864380b /src/providers/ldap/ldap_id_enum.c | |
parent | b2c7b6fe7a6b9ef3af8d4d3037fe83d6e9bfd6a5 (diff) | |
download | sssd-b56b06e199f15a8a840b36bc7cb8010e39ae761d.tar.gz sssd-b56b06e199f15a8a840b36bc7cb8010e39ae761d.tar.bz2 sssd-b56b06e199f15a8a840b36bc7cb8010e39ae761d.zip |
Replace SDAP_ID_MAPPING checks with sdap_idmap_domain_has_algorithmic_mapping
Currently the decision if external or algorithmic mapping should be used
in the LDAP or AD provider was based on the value of the ldap_id_mapping
config option. Since now all information about ID mapping is handled by
libsss_idmap the check for this options can be replace with a call which
checks the state via libss_idmap.
https://fedorahosted.org/sssd/ticket/1961
Diffstat (limited to 'src/providers/ldap/ldap_id_enum.c')
-rw-r--r-- | src/providers/ldap/ldap_id_enum.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/providers/ldap/ldap_id_enum.c b/src/providers/ldap/ldap_id_enum.c index 719b1301..06d6e877 100644 --- a/src/providers/ldap/ldap_id_enum.c +++ b/src/providers/ldap/ldap_id_enum.c @@ -30,6 +30,7 @@ #include "db/sysdb.h" #include "providers/ldap/ldap_common.h" #include "providers/ldap/sdap_async.h" +#include "providers/ldap/sdap_idmap.h" extern struct tevent_req *ldap_id_cleanup_send(TALLOC_CTX *memctx, struct tevent_context *ev, @@ -498,7 +499,9 @@ static struct tevent_req *enum_users_send(TALLOC_CTX *memctx, state->ctx = ctx; state->op = op; - use_mapping = dp_opt_get_bool(ctx->opts->basic, SDAP_ID_MAPPING); + use_mapping = sdap_idmap_domain_has_algorithmic_mapping( + ctx->opts->idmap_ctx, + sdom->dom->domain_id); /* We always want to filter on objectclass and an available name */ state->filter = talloc_asprintf(state, @@ -663,7 +666,9 @@ static struct tevent_req *enum_groups_send(TALLOC_CTX *memctx, state->ctx = ctx; state->op = op; - use_mapping = dp_opt_get_bool(ctx->opts->basic, SDAP_ID_MAPPING); + use_mapping = sdap_idmap_domain_has_algorithmic_mapping( + ctx->opts->idmap_ctx, + sdom->dom->domain_id); /* We always want to filter on objectclass and an available name */ state->filter = talloc_asprintf(state, |