summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/ldap_common.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-12-10 21:49:45 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-01-29 17:27:55 +0100
commite0502a6c5bc30415c372e9e6e835b94b04d5195a (patch)
tree25dd92863492fe6f5e6924daf643cfd2ec63ccf6 /src/providers/ldap/ldap_common.c
parent02abb93af0c81da869766c8302aecf3d08aa47e0 (diff)
downloadsssd-e0502a6c5bc30415c372e9e6e835b94b04d5195a.tar.gz
sssd-e0502a6c5bc30415c372e9e6e835b94b04d5195a.tar.xz
sssd-e0502a6c5bc30415c372e9e6e835b94b04d5195a.zip
LDAP: Pass a private context to enumeration ptask instead of hardcoded connection
Previously, the sdap-domain enumeration request used a single connection context to download all the data. Now we'd like to use different connections to download different objects, so the ID context is passed in and the request itself decides which connection to use for the sdap-domain enumeration.
Diffstat (limited to 'src/providers/ldap/ldap_common.c')
-rw-r--r--src/providers/ldap/ldap_common.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index 4c94937aa..e799c783c 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -974,16 +974,18 @@ void sdap_mark_offline(struct sdap_id_ctx *ctx)
int ldap_id_setup_tasks(struct sdap_id_ctx *ctx)
{
- return sdap_id_setup_tasks(ctx, ctx->conn, ctx->opts->sdom,
+ return sdap_id_setup_tasks(ctx->be, ctx, ctx->opts->sdom,
ldap_enumeration_send,
- ldap_enumeration_recv);
+ ldap_enumeration_recv,
+ ctx);
}
-int sdap_id_setup_tasks(struct sdap_id_ctx *ctx,
- struct sdap_id_conn_ctx *conn,
+int sdap_id_setup_tasks(struct be_ctx *be_ctx,
+ struct sdap_id_ctx *ctx,
struct sdap_domain *sdom,
be_ptask_send_t send_fn,
- be_ptask_recv_t recv_fn)
+ be_ptask_recv_t recv_fn,
+ void *pvt)
{
int ret;
@@ -991,7 +993,8 @@ int sdap_id_setup_tasks(struct sdap_id_ctx *ctx,
if (sdom->dom->enumerate) {
DEBUG(SSSDBG_TRACE_FUNC, ("Setting up enumeration for %s\n",
sdom->dom->name));
- ret = ldap_setup_enumeration(ctx, conn, sdom, send_fn, recv_fn);
+ ret = ldap_setup_enumeration(be_ctx, ctx->opts, sdom,
+ send_fn, recv_fn, pvt);
} else {
/* the enumeration task, runs the cleanup process by itself,
* but if enumeration is not running we need to schedule it */