[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Mon Jun 20 06:57:02 MDT 2011


The branch, master has been updated
       via  c8cfd75 s3:idmap_autorid: remove redundant code
       via  d278eba s3:idmap_autorid: in initialize, don't leak storedconfig to talloc_tos() in the success case
       via  389eada s3:idmap_autorid: use "idmap config * : rangesize" instead of "autorid : rangesize"
       via  0f76273 s3:idmap_autorid: fail initialization if the domain is not "*"
      from  dc461ca s3: Fix the build, NAME_MAX not universally available

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


- Log -----------------------------------------------------------------
commit c8cfd756746b23165365acfe25909aab3a26ab8e
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 10 00:50:42 2011 +0200

    s3:idmap_autorid: remove redundant code
    
    Autobuild-User: Michael Adam <obnox at samba.org>
    Autobuild-Date: Mon Jun 20 14:56:29 CEST 2011 on sn-devel-104

commit d278eba7841bd8aaefc1970ea08e6aa4e4914ef0
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 10 00:49:37 2011 +0200

    s3:idmap_autorid: in initialize, don't leak storedconfig to talloc_tos() in the success case

commit 389eada12d3fb4b305d426baaeddf1a9ccfd781e
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jun 10 00:46:19 2011 +0200

    s3:idmap_autorid: use "idmap config * : rangesize" instead of "autorid : rangesize"

commit 0f762734230e85fbc08d4343181ed061f78e053b
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 7 15:53:49 2011 +0200

    s3:idmap_autorid: fail initialization if the domain is not "*"
    
    autorid can only be used as a backend for the default idmap configuration.

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

Summary of changes:
 source3/winbindd/idmap_autorid.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c
index e9048d8..cddbff2 100644
--- a/source3/winbindd/idmap_autorid.c
+++ b/source3/winbindd/idmap_autorid.c
@@ -436,6 +436,13 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom)
 	NTSTATUS status;
 	uint32_t hwm;
 
+	if (!strequal(dom->name, "*")) {
+		DEBUG(0, ("idmap_autorid_initialize: Error: autorid configured "
+			  "for domain '%s'. But autorid can only be used for "
+			  "the default idmap configuration.\n", dom->name));
+		return NT_STATUS_INVALID_PARAMETER;
+	}
+
 	config = talloc_zero(dom, struct autorid_global_config);
 	if (!config) {
 		DEBUG(0, ("Out of memory!\n"));
@@ -448,7 +455,7 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom)
 	}
 
 	config->minvalue = dom->low_id;
-	config->rangesize = lp_parm_int(-1, "autorid", "rangesize", 100000);
+	config->rangesize = lp_parm_int(-1, "idmap config *", "rangesize", 100000);
 
 	if (config->rangesize < 2000) {
 		DEBUG(1, ("autorid rangesize must be at least 2000\n"));
@@ -523,14 +530,12 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom)
 
 	dom->private_data = config;
 
-	if (!NT_STATUS_IS_OK(status)) {
-		goto error;
-	}
+	goto done;
 
-	return NT_STATUS_OK;
-
-      error:
+error:
 	talloc_free(config);
+
+done:
 	talloc_free(storedconfig);
 
 	return status;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list