summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/providers/ad/ad_init.c2
-rw-r--r--src/providers/ipa/ipa_init.c2
-rw-r--r--src/providers/ldap/ldap_common.c17
-rw-r--r--src/providers/ldap/ldap_common.h7
-rw-r--r--src/providers/ldap/ldap_init.c2
5 files changed, 21 insertions, 9 deletions
diff --git a/src/providers/ad/ad_init.c b/src/providers/ad/ad_init.c
index 816d12f0..f181afe6 100644
--- a/src/providers/ad/ad_init.c
+++ b/src/providers/ad/ad_init.c
@@ -204,7 +204,7 @@ sssm_ad_id_init(struct be_ctx *bectx,
goto done;
}
- ret = sdap_id_setup_tasks(ad_ctx->sdap_id_ctx);
+ ret = ldap_id_setup_tasks(ad_ctx->sdap_id_ctx);
if (ret != EOK) {
goto done;
}
diff --git a/src/providers/ipa/ipa_init.c b/src/providers/ipa/ipa_init.c
index cdcae5e6..a5ab8818 100644
--- a/src/providers/ipa/ipa_init.c
+++ b/src/providers/ipa/ipa_init.c
@@ -226,7 +226,7 @@ int sssm_ipa_id_init(struct be_ctx *bectx,
ret = ipa_idmap_init(sdap_ctx, sdap_ctx, &sdap_ctx->opts->idmap_ctx);
if (ret != EOK) goto done;
- ret = sdap_id_setup_tasks(sdap_ctx);
+ ret = ldap_id_setup_tasks(sdap_ctx);
if (ret != EOK) {
goto done;
}
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index ffa8aae5..f7ad7118 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -936,16 +936,23 @@ void sdap_mark_offline(struct sdap_id_ctx *ctx)
be_mark_offline(ctx->be);
}
-int sdap_id_setup_tasks(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);
+}
+
+int sdap_id_setup_tasks(struct sdap_id_ctx *ctx,
+ struct sdap_id_conn_ctx *conn,
+ struct sdap_domain *sdom)
{
struct timeval tv;
int ret = EOK;
int delay;
/* set up enumeration task */
- if (ctx->be->domain->enumerate) {
- DEBUG(SSSDBG_TRACE_FUNC, ("Setting up enumeration for %s\n", ctx->be->domain->name));
- ret = ldap_setup_enumeration(ctx, ctx->conn, ctx->opts->sdom);
+ if (sdom->dom->enumerate) {
+ DEBUG(SSSDBG_TRACE_FUNC, ("Setting up enumeration for %s\n", sdom->dom->name));
+ ret = ldap_setup_enumeration(ctx, conn, sdom);
} else {
/* the enumeration task, runs the cleanup process by itself,
* but if enumeration is not running we need to schedule it */
@@ -960,7 +967,7 @@ int sdap_id_setup_tasks(struct sdap_id_ctx *ctx)
/* run the first one in a couple of seconds so that we have time to
* finish initializations first*/
tv = tevent_timeval_current_ofs(10, 0);
- ret = ldap_id_cleanup_create_timer(ctx, ctx->opts->sdom, tv);
+ ret = ldap_id_cleanup_create_timer(ctx, sdom, tv);
}
return ret;
diff --git a/src/providers/ldap/ldap_common.h b/src/providers/ldap/ldap_common.h
index fb45845e..e5b7f115 100644
--- a/src/providers/ldap/ldap_common.h
+++ b/src/providers/ldap/ldap_common.h
@@ -90,7 +90,12 @@ errno_t sdap_reinit_cleanup_recv(struct tevent_req *req);
void sdap_account_info_handler(struct be_req *breq);
void sdap_handle_account_info(struct be_req *breq, struct sdap_id_ctx *ctx,
struct sdap_id_conn_ctx *conn);
-int sdap_id_setup_tasks(struct sdap_id_ctx *ctx);
+
+/* Set up enumeration and/or cleanup */
+int ldap_id_setup_tasks(struct sdap_id_ctx *ctx);
+int sdap_id_setup_tasks(struct sdap_id_ctx *ctx,
+ struct sdap_id_conn_ctx *conn,
+ struct sdap_domain *sdom);
struct tevent_req *
sdap_handle_acct_req_send(TALLOC_CTX *mem_ctx,
diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c
index 38d4fa71..341338ca 100644
--- a/src/providers/ldap/ldap_init.c
+++ b/src/providers/ldap/ldap_init.c
@@ -160,7 +160,7 @@ int sssm_ldap_id_init(struct be_ctx *bectx,
ret = sdap_idmap_init(ctx, ctx, &ctx->opts->idmap_ctx);
if (ret != EOK) goto done;
- ret = sdap_id_setup_tasks(ctx);
+ ret = ldap_id_setup_tasks(ctx);
if (ret != EOK) {
goto done;
}