[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Fri Jul 25 06:19:03 MDT 2014


The branch, master has been updated
       via  b51809c s3:idmap: fix talloc hierarchy in idmap_passdb_domain()
       via  b78d44f s3:idmap: only check the range values if a range setting has been found.
       via  f354917 s3:idmap: move loading of idmap options together before range checking in idmap_init_domain()
       via  3ac00c9 s3:idmap: in idmap_init_domain() load methods before loading further config
       via  3c6ec89 s3:idmap: don't log missing range config if range checking not requested
      from  dfc98d7 messaging3: Remove an unnecessary variable

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


- Log -----------------------------------------------------------------
commit b51809c13e9b5991e0abafdb3c49ce1f919878c2
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jul 23 11:42:57 2014 +0200

    s3:idmap: fix talloc hierarchy in idmap_passdb_domain()
    
    (don't init to NULL context - we got one handed in...)
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Fri Jul 25 14:18:20 CEST 2014 on sn-devel-104

commit b78d44fe89f3a2f6635b46cbcfae28069c9cff55
Author: Michael Adam <obnox at samba.org>
Date:   Sun Jul 20 12:12:16 2014 +0200

    s3:idmap: only check the range values if a range setting has been found.
    
    Otherwise, the check is superfluous since high and low values are
    initialized to 0.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit f3549172083641d0e275a6312edf4adc6b740b98
Author: Michael Adam <obnox at samba.org>
Date:   Sun Jul 20 12:11:16 2014 +0200

    s3:idmap: move loading of idmap options together before range checking in idmap_init_domain()
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 3ac00c9dc348733f0bb999a91a8faa6443ac99eb
Author: Michael Adam <obnox at samba.org>
Date:   Sun Jul 20 11:53:32 2014 +0200

    s3:idmap: in idmap_init_domain() load methods before loading further config
    
    Check whether the requested backend exists at all, before going
    further into the config parsing.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

commit 3c6ec8908a697ac95536b35d242ccd64e524a0a5
Author: Michael Adam <obnox at samba.org>
Date:   Sun Jul 20 11:49:37 2014 +0200

    s3:idmap: don't log missing range config if range checking not requested
    
    idmap_init_domain() is called with check_range == false from
    idmap_passdb_domain(). In this case, we usually don't have an
    idmap range at all, and we don't want to level 1 debug
    messages complaining about the fact are irritating at least.
    
    This patch removes the debug in the case of check_range == false.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10737
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

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

Summary of changes:
 source3/winbindd/idmap.c |   59 ++++++++++++++++++++++++---------------------
 1 files changed, 31 insertions(+), 28 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c
index 674f54c..a8beab7 100644
--- a/source3/winbindd/idmap.c
+++ b/source3/winbindd/idmap.c
@@ -186,6 +186,29 @@ static struct idmap_domain *idmap_init_domain(TALLOC_CTX *mem_ctx,
 	}
 
 	/*
+	 * Check whether the requested backend module exists and
+	 * load the methods.
+	 */
+
+	result->methods = get_methods(modulename);
+	if (result->methods == NULL) {
+		DEBUG(3, ("idmap backend %s not found\n", modulename));
+
+		status = smb_probe_module("idmap", modulename);
+		if (!NT_STATUS_IS_OK(status)) {
+			DEBUG(3, ("Could not probe idmap module %s\n",
+				  modulename));
+			goto fail;
+		}
+
+		result->methods = get_methods(modulename);
+	}
+	if (result->methods == NULL) {
+		DEBUG(1, ("idmap backend %s not found\n", modulename));
+		goto fail;
+	}
+
+	/*
 	 * load ranges and read only information from the config
 	 */
 
@@ -196,11 +219,15 @@ static struct idmap_domain *idmap_init_domain(TALLOC_CTX *mem_ctx,
 		goto fail;
 	}
 
+	result->read_only = lp_parm_bool(-1, config_option, "read only", false);
 	range = lp_parm_const_string(-1, config_option, "range", NULL);
+
+	talloc_free(config_option);
+
 	if (range == NULL) {
-		DEBUG(1, ("idmap range not specified for domain %s\n",
-			  result->name));
 		if (check_range) {
+			DEBUG(1, ("idmap range not specified for domain %s\n",
+				  result->name));
 			goto fail;
 		}
 	} else if (sscanf(range, "%u - %u", &result->low_id,
@@ -211,13 +238,7 @@ static struct idmap_domain *idmap_init_domain(TALLOC_CTX *mem_ctx,
 		if (check_range) {
 			goto fail;
 		}
-	}
-
-	result->read_only = lp_parm_bool(-1, config_option, "read only", false);
-
-	talloc_free(config_option);
-
-	if (result->low_id > result->high_id) {
+	} else if (result->low_id > result->high_id) {
 		DEBUG(1, ("Error: invalid idmap range detected: %lu - %lu\n",
 			  (unsigned long)result->low_id,
 			  (unsigned long)result->high_id));
@@ -226,24 +247,6 @@ static struct idmap_domain *idmap_init_domain(TALLOC_CTX *mem_ctx,
 		}
 	}
 
-	result->methods = get_methods(modulename);
-	if (result->methods == NULL) {
-		DEBUG(3, ("idmap backend %s not found\n", modulename));
-
-		status = smb_probe_module("idmap", modulename);
-		if (!NT_STATUS_IS_OK(status)) {
-			DEBUG(3, ("Could not probe idmap module %s\n",
-				  modulename));
-			goto fail;
-		}
-
-		result->methods = get_methods(modulename);
-	}
-	if (result->methods == NULL) {
-		DEBUG(1, ("idmap backend %s not found\n", modulename));
-		goto fail;
-	}
-
 	status = result->methods->init(result);
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(1, ("idmap initialization returned %s\n",
@@ -347,7 +350,7 @@ static struct idmap_domain *idmap_passdb_domain(TALLOC_CTX *mem_ctx)
 		return passdb_idmap_domain;
 	}
 
-	passdb_idmap_domain = idmap_init_domain(NULL, get_global_sam_name(),
+	passdb_idmap_domain = idmap_init_domain(mem_ctx, get_global_sam_name(),
 						"passdb", false);
 	if (passdb_idmap_domain == NULL) {
 		DEBUG(1, ("Could not init passdb idmap domain\n"));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list