From db534f6eb40f083860756afe3b2d0589f271dec0 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 18 May 2010 10:17:44 -0400 Subject: Set ldap_search_timeout default to 5 seconds The manpages had five seconds listed, but the source disagreed (it was set to 60 seconds). This resulted in long wait times when unlocking the screen after network disconnection, for example. If enumerate=True, we will set this value to a minimum of 30s --- src/providers/ldap/ldap_init.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/providers/ldap/ldap_init.c') diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c index 5c6f4b790..af98d8e52 100644 --- a/src/providers/ldap/ldap_init.c +++ b/src/providers/ldap/ldap_init.c @@ -82,6 +82,16 @@ int sssm_ldap_id_init(struct be_ctx *bectx, goto done; } + /* FIXME: This is a workaround for 1.2.0. In the future, we need to have + * separate timeouts for enumeration operations + * If enumeration is enabled and the search timeout is less + * than 30s, force it to a minimum of 30s. + */ + if(bectx->domain->enumerate && + dp_opt_get_int(ctx->opts->basic, SDAP_SEARCH_TIMEOUT) < 30) { + dp_opt_set_int(ctx->opts->basic, SDAP_SEARCH_TIMEOUT, 30); + } + dns_service_name = dp_opt_get_string(ctx->opts->basic, SDAP_DNS_SERVICE_NAME); DEBUG(7, ("Service name for discovery set to %s\n", dns_service_name)); -- cgit