[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Fri Jan 15 03:00:04 UTC 2016


The branch, master has been updated
       via  cf05ba5 s3-libads: Use the configured LDAP page size.
       via  8c2609f Change default LDAP page size to 1000.
      from  19fffeb ctdb-scripts: further untangle logic for success of interface monitoring

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit cf05ba5b3210e9258dd4a1126bd29a1e696ec957
Author: Justin Maggard <jmaggard10 at gmail.com>
Date:   Wed Jan 13 16:25:34 2016 -0800

    s3-libads: Use the configured LDAP page size.
    
    We already allow the user to configure LDAP page size, and use it in pdb_ldap.
    But then we hard-code the initial LDAP page size value to 1000 in ads_init, so
    it doesn't take effect there.  So let's use the configured LDAP page size value
    in ads_init also, which defaults to 1000.
    
    Signed-off-by: Justin Maggard <jmaggard at netgear.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Fri Jan 15 03:59:16 CET 2016 on sn-devel-144

commit 8c2609f3186d40afb5954737dc174ce190cd368a
Author: Justin Maggard <jmaggard10 at gmail.com>
Date:   Wed Jan 13 16:25:33 2016 -0800

    Change default LDAP page size to 1000.
    
    This matches Windows' Active Directory maximum page size.
    
    Signed-off-by: Justin Maggard <jmaggard at netgear.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/smbdotconf/ldap/ldappagesize.xml | 2 +-
 lib/param/loadparm.c                      | 2 +-
 source3/include/smb_ldap.h                | 2 +-
 source3/libads/ads_struct.c               | 4 ++--
 source3/libads/ldap_utils.c               | 4 +++-
 5 files changed, 8 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/ldap/ldappagesize.xml b/docs-xml/smbdotconf/ldap/ldappagesize.xml
index 81cd98a..577ea2a 100644
--- a/docs-xml/smbdotconf/ldap/ldappagesize.xml
+++ b/docs-xml/smbdotconf/ldap/ldappagesize.xml
@@ -12,6 +12,6 @@
 	This parameter specifies the size of these pages.
 	</para>
 </description>
-<value type="default">1024</value>
+<value type="default">1000</value>
 <value type="example">512</value>
 </samba:parameter>
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index e5e3a30..9b36c7e 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -2744,7 +2744,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
 
 	lpcfg_do_global_parameter(lp_ctx, "allocation roundup size", "1048576");
 
-	lpcfg_do_global_parameter(lp_ctx, "ldap page size", "1024");
+	lpcfg_do_global_parameter(lp_ctx, "ldap page size", "1000");
 
 	lpcfg_do_global_parameter(lp_ctx, "kernel share modes", "yes");
 
diff --git a/source3/include/smb_ldap.h b/source3/include/smb_ldap.h
index eaa1276..19e4be5 100644
--- a/source3/include/smb_ldap.h
+++ b/source3/include/smb_ldap.h
@@ -78,7 +78,7 @@ struct ldapsam_privates;
 
 #define LDAP_DEFAULT_TIMEOUT   15
 #define LDAP_CONNECTION_DEFAULT_TIMEOUT 2
-#define LDAP_PAGE_SIZE 1024
+#define LDAP_PAGE_SIZE 1000
 
 #define ADS_PAGE_CTL_OID 	"1.2.840.113556.1.4.319"
 
diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c
index 27af4d6..0dc7b11 100644
--- a/source3/libads/ads_struct.c
+++ b/source3/libads/ads_struct.c
@@ -154,9 +154,9 @@ ADS_STRUCT *ads_init(const char *realm,
 
 	ads->auth.flags = wrap_flags;
 
-	/* Start with a page size of 1000 when the connection is new,
+	/* Start with the configured page size when the connection is new,
 	 * we will drop it by half we get a timeout.   */
-	ads->config.ldap_page_size     = 1000;
+	ads->config.ldap_page_size     = lp_ldap_page_size();
 
 	return ads;
 }
diff --git a/source3/libads/ldap_utils.c b/source3/libads/ldap_utils.c
index 157f694..a4adbc0 100644
--- a/source3/libads/ldap_utils.c
+++ b/source3/libads/ldap_utils.c
@@ -85,7 +85,9 @@ static ADS_STATUS ads_do_search_retry_internal(ADS_STRUCT *ads, const char *bind
 
 	while (--count) {
 
-		if (NT_STATUS_EQUAL(ads_ntstatus(status), NT_STATUS_IO_TIMEOUT) && ads->config.ldap_page_size >= 250) {
+		if (NT_STATUS_EQUAL(ads_ntstatus(status), NT_STATUS_IO_TIMEOUT) &&
+		    ads->config.ldap_page_size >= (lp_ldap_page_size() / 4) &&
+		    lp_ldap_page_size() > 4) {
 			int new_page_size = (ads->config.ldap_page_size / 2);
 			DEBUG(1, ("Reducing LDAP page size from %d to %d due to IO_TIMEOUT\n",
 				  ads->config.ldap_page_size, new_page_size));


-- 
Samba Shared Repository



More information about the samba-cvs mailing list