summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-12-25 22:45:15 +0000
committerVolker Lendecke <vlendec@samba.org>2003-12-25 22:45:15 +0000
commit3dba56747d3d34b6ccfeea24f53e38c1554f8f4a (patch)
treebf530070af1fc3f2571e338aa2d679b1d92d9725 /source3/param
parentba1d1842fe7c2e35c9a6835bbdbbe7f4616d408c (diff)
downloadsamba-3dba56747d3d34b6ccfeea24f53e38c1554f8f4a.tar.gz
samba-3dba56747d3d34b6ccfeea24f53e38c1554f8f4a.tar.bz2
samba-3dba56747d3d34b6ccfeea24f53e38c1554f8f4a.zip
This is metze's LDAP rebind sleep patch:
When smb.conf tells us to write to a read-only LDAP replica and we are redirected by the LDAP server, the replication might take some seconds, especially over slow links. This patch delays the next read after a rebind for 'ldap rebind sleep' milliseconds. Metze, thanks for your patience. Volker (This used to be commit 7293550e3642e2553684a7011084dabb0b78fd24)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 9ed9ad6f21..1fbd54419c 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -235,6 +235,7 @@ typedef struct
char *szLdapAdminDn;
char *szAclCompat;
int ldap_passwd_sync;
+ int ldap_rebind_sleep;
BOOL ldap_delete_dn;
BOOL bMsAddPrinterWizard;
BOOL bDNSproxy;
@@ -1075,6 +1076,7 @@ static struct parm_struct parm_table[] = {
{"ldap ssl", P_ENUM, P_GLOBAL, &Globals.ldap_ssl, NULL, enum_ldap_ssl, FLAG_ADVANCED},
{"ldap passwd sync", P_ENUM, P_GLOBAL, &Globals.ldap_passwd_sync, NULL, enum_ldap_passwd_sync, FLAG_ADVANCED},
{"ldap delete dn", P_BOOL, P_GLOBAL, &Globals.ldap_delete_dn, NULL, NULL, FLAG_ADVANCED},
+ {"ldap rebind sleep", P_INTEGER, P_GLOBAL, &Globals.ldap_rebind_sleep, NULL, NULL, FLAG_ADVANCED},
{N_("Miscellaneous Options"), P_SEP, P_SEPARATOR},
{"add share command", P_STRING, P_GLOBAL, &Globals.szAddShareCommand, NULL, NULL, FLAG_ADVANCED},
@@ -1470,6 +1472,7 @@ static void init_globals(void)
Globals.ldap_ssl = LDAP_SSL_ON;
Globals.ldap_passwd_sync = LDAP_PASSWD_SYNC_OFF;
Globals.ldap_delete_dn = False;
+ Globals.ldap_rebind_sleep = 1000; /* wait 1 sec for replication */
/* these parameters are set to defaults that are more appropriate
for the increasing samba install base:
@@ -1701,6 +1704,7 @@ FN_GLOBAL_STRING(lp_ldap_admin_dn, &Globals.szLdapAdminDn)
FN_GLOBAL_INTEGER(lp_ldap_ssl, &Globals.ldap_ssl)
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_rebind_sleep, &Globals.ldap_rebind_sleep)
FN_GLOBAL_STRING(lp_add_share_cmd, &Globals.szAddShareCommand)
FN_GLOBAL_STRING(lp_change_share_cmd, &Globals.szChangeShareCommand)
FN_GLOBAL_STRING(lp_delete_share_cmd, &Globals.szDeleteShareCommand)