From 86cd50fa3dd34f53847140f6eeb7fedfcd97f386 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 1 Sep 2009 11:36:13 -0400 Subject: Honor enumerate option in ldap_id If enumerations are disabled for this domain, then do not start the enumeration task. --- server/providers/ldap/ldap_id.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'server/providers/ldap/ldap_id.c') diff --git a/server/providers/ldap/ldap_id.c b/server/providers/ldap/ldap_id.c index b5fdc63bd..5da21cd5e 100644 --- a/server/providers/ldap/ldap_id.c +++ b/server/providers/ldap/ldap_id.c @@ -1307,13 +1307,16 @@ int sssm_ldap_init(struct be_ctx *bectx, } /* set up enumeration task */ - ctx->last_run = tevent_timeval_current(); /* run the first immediately */ - enum_task = tevent_add_timer(ctx->be->ev, ctx, ctx->last_run, + if (ctx->be->domain->enumerate) { + /* run the first immediately */ + ctx->last_run = tevent_timeval_current(); + enum_task = tevent_add_timer(ctx->be->ev, ctx, ctx->last_run, ldap_id_enumerate, ctx); - if (!enum_task) { - DEBUG(0, ("FATAL: failed to setup enumeration task!\n")); - ret = EFAULT; - goto done; + if (!enum_task) { + DEBUG(0, ("FATAL: failed to setup enumeration task!\n")); + ret = EFAULT; + goto done; + } } *ops = &sdap_id_ops; -- cgit