diff options
author | Björn Jacke <bj@sernet.de> | 2008-05-26 11:29:24 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-06-03 16:32:31 +0200 |
commit | d8b234648cbc18c02d2c79a32be766080c61b42a (patch) | |
tree | eaa0b057581b213dc296a5eb6387624e72030536 /source3/param | |
parent | 8c7e21679b69eab4319efb484630cddfaf973e36 (diff) | |
download | samba-d8b234648cbc18c02d2c79a32be766080c61b42a.tar.gz samba-d8b234648cbc18c02d2c79a32be766080c61b42a.tar.bz2 samba-d8b234648cbc18c02d2c79a32be766080c61b42a.zip |
Add ldap connection timeout for OpenLDAP and Netscape LDAP libs. This can be controlled via the ldap connection timeout parameter. This fixes fallbacks to secondary LDAP servers in multi LDAP server setups like in #4544
(This used to be commit 8e59a2fedc940b081222b0e8f90fe0c5a0981c06)
Diffstat (limited to 'source3/param')
-rw-r--r-- | source3/param/loadparm.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index a5623a25c0..ef6648aec1 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -263,6 +263,7 @@ struct global { int ldap_passwd_sync; int ldap_replication_sleep; int ldap_timeout; /* This is initialised in init_globals */ + int ldap_connection_timeout; int ldap_page_size; bool ldap_delete_dn; bool bMsAddPrinterWizard; @@ -3562,6 +3563,15 @@ static struct parm_struct parm_table[] = { .flags = FLAG_ADVANCED, }, { + .label = "ldap connection timeout", + .type = P_INTEGER, + .p_class = P_GLOBAL, + .ptr = &Globals.ldap_connection_timeout, + .special = NULL, + .enum_list = NULL, + .flags = FLAG_ADVANCED, + }, + { .label = "ldap page size", .type = P_INTEGER, .p_class = P_GLOBAL, @@ -4755,7 +4765,8 @@ static void init_globals(bool first_time_only) Globals.ldap_passwd_sync = LDAP_PASSWD_SYNC_OFF; Globals.ldap_delete_dn = False; Globals.ldap_replication_sleep = 1000; /* wait 1 sec for replication */ - Globals.ldap_timeout = LDAP_CONNECT_DEFAULT_TIMEOUT; + Globals.ldap_timeout = LDAP_DEFAULT_TIMEOUT; + Globals.ldap_connection_timeout = LDAP_CONNECTION_DEFAULT_TIMEOUT; Globals.ldap_page_size = LDAP_PAGE_SIZE; Globals.ldap_debug_level = 0; @@ -5074,6 +5085,7 @@ FN_GLOBAL_INTEGER(lp_ldap_passwd_sync, &Globals.ldap_passwd_sync) FN_GLOBAL_BOOL(lp_ldap_delete_dn, &Globals.ldap_delete_dn) FN_GLOBAL_INTEGER(lp_ldap_replication_sleep, &Globals.ldap_replication_sleep) FN_GLOBAL_INTEGER(lp_ldap_timeout, &Globals.ldap_timeout) +FN_GLOBAL_INTEGER(lp_ldap_connection_timeout, &Globals.ldap_connection_timeout) FN_GLOBAL_INTEGER(lp_ldap_page_size, &Globals.ldap_page_size) FN_GLOBAL_INTEGER(lp_ldap_debug_level, &Globals.ldap_debug_level) FN_GLOBAL_INTEGER(lp_ldap_debug_threshold, &Globals.ldap_debug_threshold) |