summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-09-01 11:36:13 -0400
committerSimo Sorce <ssorce@redhat.com>2009-09-02 09:18:00 -0400
commit86cd50fa3dd34f53847140f6eeb7fedfcd97f386 (patch)
tree5989c396917d1f048b375e4d8ec0a22a5fe1e6b3
parent74ecf832de5bb406ecea702e9aaeec3eb4484631 (diff)
downloadsssd-86cd50fa3dd34f53847140f6eeb7fedfcd97f386.tar.gz
sssd-86cd50fa3dd34f53847140f6eeb7fedfcd97f386.tar.bz2
sssd-86cd50fa3dd34f53847140f6eeb7fedfcd97f386.zip
Honor enumerate option in ldap_id
If enumerations are disabled for this domain, then do not start the enumeration task.
-rw-r--r--server/providers/ldap/ldap_id.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/server/providers/ldap/ldap_id.c b/server/providers/ldap/ldap_id.c
index b5fdc63b..5da21cd5 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;