[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-103-gc5a1aa5

Andrew Bartlett abartlet at samba.org
Mon Jun 29 05:42:34 GMT 2009


The branch, master has been updated
       via  c5a1aa5224395e2439e0468d653acfbd3faa25fc (commit)
       via  4aa335be113eb89d46fd560745136ed444691f6e (commit)
       via  077898b15819b28320bd049ad0fdfff34733a04f (commit)
       via  994506ae2eb7e8e7eb0463fb87b261eaecb04010 (commit)
       via  2d9b51c2a871ede1677dcf8cbf255429de431346 (commit)
       via  1e21adaaf6409ab3e2d33a5e48da282e1926a720 (commit)
       via  bc7b608625d427e9e6cb38312326eec59d571653 (commit)
       via  b08beed0dbc1228b599884ff14eb66ea5f8f732d (commit)
      from  8414048557305c62682c7d6c7a42a1f466e48a0a (commit)

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


- Log -----------------------------------------------------------------
commit c5a1aa5224395e2439e0468d653acfbd3faa25fc
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sat Jun 27 14:16:19 2009 +0200

    Correct some typos in the LDB partition module

commit 4aa335be113eb89d46fd560745136ed444691f6e
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sat Jun 27 13:38:38 2009 +0200

    SAMDB: Don't check for "sAMAccountName" twice

commit 077898b15819b28320bd049ad0fdfff34733a04f
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Tue Jun 23 18:27:26 2009 +0200

    Enhancement of "simple ldap map" with "systemFlags" attribute
    
    Enhance the simple ldap map to support also the "systemFlags" attribute in the
    correct way.

commit 994506ae2eb7e8e7eb0463fb87b261eaecb04010
Author: Andrew Kroeger <andrew at id10ts.net>
Date:   Tue Jun 23 07:26:17 2009 -0500

    ldb: Properly handle NULL when copying attr lists.
    
    When copying an attribute list, ensure the list itself is not NULL before
    attempting to access elements of the list.

commit 2d9b51c2a871ede1677dcf8cbf255429de431346
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Mon Jun 22 20:51:43 2009 +0200

    Correct the headers of some SAMBA 4 setup python scripts

commit 1e21adaaf6409ab3e2d33a5e48da282e1926a720
Author: Nathaniel McCallum <nathaniel at natemccallum.com>
Date:   Mon Jun 22 15:26:33 2009 +0200

    Two patches which fix issues on cross compiling/building

commit bc7b608625d427e9e6cb38312326eec59d571653
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sun Jun 21 19:07:02 2009 +0200

    Fixes for SAMBA3RPC torture test
    
    On calls where both NT_STATUS and WERROR results are returned and consulted
    we have to make sure to form function results considering both.
    This errors have been found through a run against SAMBA 4.

commit b08beed0dbc1228b599884ff14eb66ea5f8f732d
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Sat Jun 20 23:36:10 2009 +0200

    Small patch for SPOOLSS pipe
    
    Prevents a crash of the SAMBA 4 daemon on the torture SPOOLSS test due to not
    initialised structures.

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

Summary of changes:
 lib/util/time.m4                                 |    2 +-
 source4/build/m4/check_cc.m4                     |    4 +++-
 source4/dsdb/samdb/ldb_modules/partition.c       |   10 +++++-----
 source4/dsdb/samdb/ldb_modules/simple_ldap_map.c |   22 ++++++++++++++++++++++
 source4/dsdb/samdb/samdb.c                       |    1 -
 source4/lib/ldb/common/ldb_msg.c                 |    8 ++++----
 source4/rpc_server/spoolss/dcesrv_spoolss.c      |   10 +++++-----
 source4/setup/enableaccount                      |    2 +-
 source4/setup/setexpiry                          |    2 +-
 source4/setup/setpassword                        |    2 +-
 source4/torture/rpc/samba3rpc.c                  |   15 +++++++++++----
 11 files changed, 54 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/time.m4 b/lib/util/time.m4
index f61ae4c..675e201 100644
--- a/lib/util/time.m4
+++ b/lib/util/time.m4
@@ -3,7 +3,7 @@ AC_TRY_RUN([
 #include <sys/time.h>
 #include <unistd.h>
 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}],
-           samba_cv_HAVE_GETTIMEOFDAY_TZ=yes,samba_cv_HAVE_GETTIMEOFDAY_TZ=no,samba_cv_HAVE_GETTIMEOFDAY_TZ=cross)])
+           samba_cv_HAVE_GETTIMEOFDAY_TZ=yes,samba_cv_HAVE_GETTIMEOFDAY_TZ=no,samba_cv_HAVE_GETTIMEOFDAY_TZ=yes)])
 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
     AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday() is available])
 fi
diff --git a/source4/build/m4/check_cc.m4 b/source4/build/m4/check_cc.m4
index 5580285..32e4b50 100644
--- a/source4/build/m4/check_cc.m4
+++ b/source4/build/m4/check_cc.m4
@@ -45,7 +45,9 @@ AC_CACHE_CHECK([that the C compiler understands negative enum values],samba_cv_C
 		return 0;
 	}
 ],
-	samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv_CC_NEGATIVE_ENUM_VALUES=no)])
+	samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,
+	samba_cv_CC_NEGATIVE_ENUM_VALUES=no,
+	samba_cv_CC_NEGATIVE_ENUM_VALUES=yes)])
 if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then
 	AC_DEFINE(USE_UINT_ENUMS, 1, [Whether the compiler has uint enum support])
 fi
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 965b4c5..d4269b6 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -143,7 +143,7 @@ static struct dsdb_control_current_partition *find_partition(struct partition_pr
 
 	/* Look at base DN */
 	/* Figure out which partition it is under */
-	/* Skip the lot if 'data' isn't here yet (initialistion) */
+	/* Skip the lot if 'data' isn't here yet (initialisation) */
 	for (i=0; data && data->partitions && data->partitions[i]; i++) {
 		if (ldb_dn_compare_base(data->partitions[i]->dn, dn) == 0) {
 			return data->partitions[i];
@@ -594,7 +594,7 @@ static int partition_rename(struct ldb_module *module, struct ldb_request *req)
 	struct partition_private_data *data = talloc_get_type(module->private_data, 
 							      struct partition_private_data);
 
-	/* Skip the lot if 'data' isn't here yet (initialization) */
+	/* Skip the lot if 'data' isn't here yet (initialisation) */
 	if (!data) {
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
@@ -702,7 +702,7 @@ static int partition_end_trans(struct ldb_module *module)
 
 	/* Look at base DN */
 	/* Figure out which partition it is under */
-	/* Skip the lot if 'data' isn't here yet (initialistion) */
+	/* Skip the lot if 'data' isn't here yet (initialisation) */
 	final_ret = LDB_SUCCESS;
 
 	for (i=0; data && data->partitions && data->partitions[i]; i++) {
@@ -805,7 +805,7 @@ static int partition_sequence_number(struct ldb_module *module, struct ldb_reque
 		}
 		talloc_free(res);
 
-		/* Skip the lot if 'data' isn't here yet (initialistion) */
+		/* Skip the lot if 'data' isn't here yet (initialisation) */
 		for (i=0; data && data->partitions && data->partitions[i]; i++) {
 
 			res = talloc_zero(req, struct ldb_result);
@@ -903,7 +903,7 @@ static int partition_sequence_number(struct ldb_module *module, struct ldb_reque
 
 		talloc_free(res);
 
-		/* Skip the lot if 'data' isn't here yet (initialistion) */
+		/* Skip the lot if 'data' isn't here yet (initialisation) */
 		for (i=0; data && data->partitions && data->partitions[i]; i++) {
 
 			res = talloc_zero(req, struct ldb_result);
diff --git a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
index 0a6c350..fe1de1c 100644
--- a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
+++ b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
@@ -372,6 +372,17 @@ static const struct ldb_map_attribute entryuuid_attributes[] =
 		}
 	},
 	{
+		.local_name = "systemFlags",
+		.type = MAP_CONVERT,
+		.u = {
+			.convert = {
+				 .remote_name = "systemFlags",
+				 .convert_local = normalise_to_signed32,
+				 .convert_remote = val_copy,
+			 },
+		}
+	},
+	{
 		.local_name = "usnChanged",
 		.type = MAP_CONVERT,
 		.u = {
@@ -524,6 +535,17 @@ static const struct ldb_map_attribute nsuniqueid_attributes[] =
 		}
 	},
 	{
+		.local_name = "systemFlags",
+		.type = MAP_CONVERT,
+		.u = {
+			.convert = {
+				 .remote_name = "systemFlags",
+				 .convert_local = normalise_to_signed32,
+				 .convert_remote = val_copy,
+			 },
+		}
+	},
+	{
 		.local_name = "usnChanged",
 		.type = MAP_CONVERT,
 		.u = {
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index 98ca6d0..8511873 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -197,7 +197,6 @@ int samdb_copy_template(struct ldb_context *ldb,
 		    ldb_attr_cmp(el->name, "name") == 0 ||
 		    ldb_attr_cmp(el->name, "objectClass") == 0 ||
 		    ldb_attr_cmp(el->name, "sAMAccountName") == 0 ||
-		    ldb_attr_cmp(el->name, "sAMAccountName") == 0 ||
 		    ldb_attr_cmp(el->name, "distinguishedName") == 0 ||
 		    ldb_attr_cmp(el->name, "objectGUID") == 0) {
 			continue;
diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c
index ad53a3d..8d0fa31 100644
--- a/source4/lib/ldb/common/ldb_msg.c
+++ b/source4/lib/ldb/common/ldb_msg.c
@@ -643,12 +643,12 @@ const char **ldb_attr_list_copy(TALLOC_CTX *mem_ctx, const char * const *attrs)
 {
 	const char **ret;
 	int i;
-	for (i=0;attrs[i];i++) /* noop */ ;
+	for (i=0;attrs && attrs[i];i++) /* noop */ ;
 	ret = talloc_array(mem_ctx, const char *, i+1);
 	if (ret == NULL) {
 		return NULL;
 	}
-	for (i=0;attrs[i];i++) {
+	for (i=0;attrs && attrs[i];i++) {
 		ret[i] = attrs[i];
 	}
 	ret[i] = attrs[i];
@@ -665,7 +665,7 @@ const char **ldb_attr_list_copy_add(TALLOC_CTX *mem_ctx, const char * const *att
 	const char **ret;
 	int i;
 	bool found = false;
-	for (i=0;attrs[i];i++) {
+	for (i=0;attrs && attrs[i];i++) {
 		if (ldb_attr_cmp(attrs[i], new_attr) == 0) {
 			found = true;
 		}
@@ -677,7 +677,7 @@ const char **ldb_attr_list_copy_add(TALLOC_CTX *mem_ctx, const char * const *att
 	if (ret == NULL) {
 		return NULL;
 	}
-	for (i=0;attrs[i];i++) {
+	for (i=0;attrs && attrs[i];i++) {
 		ret[i] = attrs[i];
 	}
 	ret[i] = new_attr;
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index 7d14c0e..4e85448 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -575,11 +575,6 @@ static WERROR dcesrv_spoolss_GetPrinterData(struct dcesrv_call_state *dce_call,
 	WERROR status;
 	struct smb_iconv_convenience *ic = lp_iconv_convenience(dce_call->conn->dce_ctx->lp_ctx);
 
-	DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
-	handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
-	if (!handle)
-		return WERR_BADFID;
-
 	r->out.type = talloc_zero(mem_ctx, enum winreg_Type);
 	W_ERROR_HAVE_NO_MEMORY(r->out.type);
 
@@ -589,6 +584,11 @@ static WERROR dcesrv_spoolss_GetPrinterData(struct dcesrv_call_state *dce_call,
 	r->out.data = talloc_zero(mem_ctx, union spoolss_PrinterData);
 	W_ERROR_HAVE_NO_MEMORY(r->out.data);
 
+	DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY);
+	handle = talloc_get_type(h->data, struct ntptr_GenericHandle);
+	if (!handle)
+		return WERR_BADFID;
+
 	switch (handle->type) {
 		case NTPTR_HANDLE_SERVER:
 			status = ntptr_GetPrintServerData(handle, mem_ctx, r);
diff --git a/source4/setup/enableaccount b/source4/setup/enableaccount
index 061997b..b270da0 100755
--- a/source4/setup/enableaccount
+++ b/source4/setup/enableaccount
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 #
-#	add a new user to a Samba4 server
+#	Enables a disabled user account on a Samba4 server
 #	Copyright Andrew Tridgell 2005
 #	Copyright Jelmer Vernooij 2008
 #	Released under the GNU GPL version 3 or later
diff --git a/source4/setup/setexpiry b/source4/setup/setexpiry
index e473305..db7cdd4 100755
--- a/source4/setup/setexpiry
+++ b/source4/setup/setexpiry
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 #
-#	set the password expiry for a user
+#	Sets the password expiry for a user on a Samba4 server
 #	Copyright Andrew Tridgell 2005
 #	Copyright Jelmer Vernooij 2008
 #	Released under the GNU GPL version 3 or later
diff --git a/source4/setup/setpassword b/source4/setup/setpassword
index 77d97d8..3505adf 100755
--- a/source4/setup/setpassword
+++ b/source4/setup/setpassword
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 #
-# Add a new user to a Samba4 server
+# Sets a user password on a Samba4 server
 # Copyright Jelmer Vernooij 2008
 #
 # Based on the original in EJS:
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index e31135c..65d2510 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -3252,13 +3252,14 @@ static NTSTATUS get_shareinfo(TALLOC_CTX *mem_ctx,
 	if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) {
 		d_printf("(%s) srvsvc_NetShareGetInfo failed: %s, %s\n", __location__,
 			 nt_errstr(status), win_errstr(r.out.result));
+		status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(r.out.result) : status;
 		goto fail;
 	}
 
 	*info502 = talloc_move(mem_ctx, &info.info502);
 	return NT_STATUS_OK;
 
- fail:
+fail:
 	talloc_free(p);
 	return status;
 }
@@ -3319,6 +3320,7 @@ static NTSTATUS get_hklm_handle(TALLOC_CTX *mem_ctx,
 	if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) {
 		d_printf("(%s) OpenHKLM failed: %s, %s\n", __location__,
 			 nt_errstr(status), win_errstr(r.out.result));
+		status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(r.out.result) : status;
 		goto fail;
 	}
 
@@ -3373,6 +3375,7 @@ static NTSTATUS torture_samba3_createshare(struct smbcli_state *cli,
 	if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(c.out.result)) {
 		d_printf("(%s) OpenKey failed: %s, %s\n", __location__,
 			 nt_errstr(status), win_errstr(c.out.result));
+		status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(c.out.result) : status;
 		goto fail;
 	}
 
@@ -3382,11 +3385,12 @@ static NTSTATUS torture_samba3_createshare(struct smbcli_state *cli,
 	if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(cl.out.result)) {
 		d_printf("(%s) OpenKey failed: %s, %s\n", __location__,
 			 nt_errstr(status), win_errstr(cl.out.result));
+		status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(cl.out.result) : status;
 		goto fail;
 	}
 
 
- fail:
+fail:
 	talloc_free(mem_ctx);
 	return status;
 }
@@ -3423,10 +3427,11 @@ static NTSTATUS torture_samba3_deleteshare(struct torture_context *torture,
 	if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(d.out.result)) {
 		d_printf("(%s) OpenKey failed: %s, %s\n", __location__,
 			 nt_errstr(status), win_errstr(d.out.result));
+		status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(d.out.result) : status;
 		goto fail;
 	}
 
- fail:
+fail:
 	talloc_free(mem_ctx);
 	return status;
 }
@@ -3467,6 +3472,7 @@ static NTSTATUS torture_samba3_setconfig(struct smbcli_state *cli,
 	if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(o.out.result)) {
 		d_printf("(%s) OpenKey failed: %s, %s\n", __location__,
 			 nt_errstr(status), win_errstr(o.out.result));
+		status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(o.out.result) : status;
 		goto done;
 	}
 
@@ -3486,10 +3492,11 @@ static NTSTATUS torture_samba3_setconfig(struct smbcli_state *cli,
 	if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(s.out.result)) {
 		d_printf("(%s) SetValue failed: %s, %s\n", __location__,
 			 nt_errstr(status), win_errstr(s.out.result));
+		status = NT_STATUS_IS_OK(status) ? werror_to_ntstatus(s.out.result) : status;
 		goto done;
 	}
 
- done:
+done:
 	talloc_free(hklm);
 	return status;
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list