[SCM] Samba Shared Repository - branch master updated

David Disseldorp ddiss at samba.org
Thu Jan 25 16:20:02 UTC 2018


The branch, master has been updated
       via  849169a Fix wrong condition for error string assignment
       via  89c3a1e libnet: Use talloc_zero instead of ZERO_STRUCTP
       via  e320c4c Samba-VirusFilter: clean up dir check vfs_close and vfs_open
       via  c890011 Samba-VirusFilter: fix virusfilter_vfs_close() crash
      from  d4f7d9e libnmb: Fix CID 1428474 Incorrect expression (COPY_PASTE_ERROR)

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


- Log -----------------------------------------------------------------
commit 849169a7b6ed0beb78bbddf25537521c1ed2f8e1
Author: Swen Schillig <swen at vnet.ibm.com>
Date:   Thu Jan 25 11:02:15 2018 +0100

    Fix wrong condition for error string assignment
    
    Signed-off-by: Swen Schillig <swen at vnet.ibm.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Thu Jan 25 17:19:12 CET 2018 on sn-devel-144

commit 89c3a1ebbe0f22c03d8958df07da9983fd6fd3b5
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jan 4 20:37:16 2018 +0100

    libnet: Use talloc_zero instead of ZERO_STRUCTP
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit e320c4c9b7426be296b3c311861ba2ddeeacdf9f
Author: Trever L. Adams <trever.adams at gmail.com>
Date:   Wed Jan 24 11:21:11 2018 -0700

    Samba-VirusFilter: clean up dir check vfs_close and vfs_open
    
    Signed-off-by: Trever L. Adams <trever.adams at gmail.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit c890011a769b497855748e130fa41e998babc305
Author: Trever L. Adams <trever.adams at gmail.com>
Date:   Wed Jan 24 10:42:11 2018 -0700

    Samba-VirusFilter: fix virusfilter_vfs_close() crash
    
    Signed-off-by: Trever L. Adams <trever.adams at gmail.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

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

Summary of changes:
 source3/modules/vfs_virusfilter.c | 10 +++++++---
 source4/libnet/libnet_join.c      | 10 +++++-----
 2 files changed, 12 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_virusfilter.c b/source3/modules/vfs_virusfilter.c
index 9b29923..ef9dc78 100644
--- a/source3/modules/vfs_virusfilter.c
+++ b/source3/modules/vfs_virusfilter.c
@@ -1153,6 +1153,11 @@ static int virusfilter_vfs_open(
 	SMB_VFS_HANDLE_GET_DATA(handle, config,
 				struct virusfilter_config, return -1);
 
+	if (fsp->is_directory) {
+		DBG_INFO("Not scanned: Directory: %s/\n", cwd_fname);
+		goto virusfilter_vfs_open_next;
+	}
+
 	test_prefix = strlen(config->rename_prefix);
 	test_suffix = strlen(config->rename_suffix);
 	if (test_prefix > 0) {
@@ -1303,7 +1308,7 @@ static int virusfilter_vfs_close(
 	const char *cwd_fname = handle->conn->connectpath;
 
 	struct virusfilter_config *config = NULL;
-	char *fname = fsp->fsp_name->base_name = NULL;
+	char *fname = fsp->fsp_name->base_name;
 	int close_result = -1;
 	int close_errno = 0;
 	virusfilter_result scan_result;
@@ -1338,8 +1343,7 @@ static int virusfilter_vfs_close(
 	}
 
 	if (fsp->is_directory) {
-		DBG_INFO("Not scanned: Directory: %s/%s\n", cwd_fname,
-			 fname);
+		DBG_INFO("Not scanned: Directory: %s/\n", cwd_fname);
 		return close_result;
 	}
 
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index 0c20644..6cd18e0 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -929,7 +929,7 @@ NTSTATUS libnet_Join_member(struct libnet_context *ctx,
 	uint32_t acct_type = 0;
 	const char *account_name;
 	const char *netbios_name;
-	const char *error_string;
+	const char *error_string = NULL;
 
 	r->out.error_string = NULL;
 
@@ -982,14 +982,14 @@ NTSTATUS libnet_Join_member(struct libnet_context *ctx,
 		return status;
 	}
 
-	set_secrets = talloc(tmp_mem, struct provision_store_self_join_settings);
+	set_secrets = talloc_zero(tmp_mem,
+				  struct provision_store_self_join_settings);
 	if (!set_secrets) {
 		r->out.error_string = NULL;
 		talloc_free(tmp_mem);
 		return NT_STATUS_NO_MEMORY;
 	}
-	
-	ZERO_STRUCTP(set_secrets);
+
 	set_secrets->domain_name = r2->out.domain_name;
 	set_secrets->realm = r2->out.realm;
 	set_secrets->netbios_name = netbios_name;
@@ -1000,7 +1000,7 @@ NTSTATUS libnet_Join_member(struct libnet_context *ctx,
 	
 	status = provision_store_self_join(ctx, ctx->lp_ctx, ctx->event_ctx, set_secrets, &error_string);
 	if (!NT_STATUS_IS_OK(status)) {
-		if (r->out.error_string) {
+		if (error_string) {
 			r->out.error_string = talloc_steal(mem_ctx, error_string);
 		} else {
 			r->out.error_string


-- 
Samba Shared Repository



More information about the samba-cvs mailing list