[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Thu Jan 9 20:21:13 UTC 2020


The branch, master has been updated
       via  60b72f589e2 vfs_ceph: assert renameat() fsps match cwd
       via  4b95ea37cb3 ntlm_auth: Add type-safety instead of a simple cast
       via  91f069cc16b ntlm_auth: Add a NULL check
       via  d78b4a841e2 printing: Avoid EBADF from EPOLL_CTL_DEL
       via  1cd20731ab1 printing: Align integer types
      from  17e692a9fa6 s3-rpcclient: add clusapi_resume_node command.

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


- Log -----------------------------------------------------------------
commit 60b72f589e2a912682516f1d28c84cc713248a0a
Author: David Disseldorp <ddiss at samba.org>
Date:   Thu Jan 9 18:20:39 2020 +0100

    vfs_ceph: assert renameat() fsps match cwd
    
    As discussed with Jeremy in bug 14232, the vfs_ceph.renameat_fn
    implementation currently ignores srcfsp and dstfsp. As a result,
    relative smb_fname_src/smb_fname_dest paths will be processed as
    relative to cwd.
    This is currently a valid assumption, as srcfsp and dstfsp should
    always match conn->cwd_fsp. Add an assert to clarify this.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu Jan  9 20:20:05 UTC 2020 on sn-devel-184

commit 4b95ea37cb3d080f22d5c748364dd3b233b76e50
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 5 14:11:54 2020 +0100

    ntlm_auth: Add type-safety instead of a simple cast
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 91f069cc16bedf7a89c488afed7c6b705aefb03c
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 5 14:11:20 2020 +0100

    ntlm_auth: Add a NULL check
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit d78b4a841e2ea7b279ae1f3039216723d24220d4
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jan 9 14:43:02 2020 +0100

    printing: Avoid EBADF from EPOLL_CTL_DEL
    
    TALLOC_FREE the fde before closing the fd. Otherwise the fde
    destructor tries to remove a nonexisting fd from the epoll set.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 1cd20731ab1e10d1b68b649c8588bbccb624c07e
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jan 9 14:42:43 2020 +0100

    printing: Align integer types
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 source3/modules/vfs_ceph.c    |  3 +++
 source3/printing/print_cups.c |  4 ++--
 source3/utils/ntlm_auth.c     | 13 ++++++++++++-
 3 files changed, 17 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 70059db0c01..2c72b6aee23 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -612,6 +612,9 @@ static int cephwrap_renameat(struct vfs_handle_struct *handle,
 		return result;
 	}
 
+	SMB_ASSERT(srcfsp == srcfsp->conn->cwd_fsp);
+	SMB_ASSERT(dstfsp == dstfsp->conn->cwd_fsp);
+
 	result = ceph_rename(handle->data, smb_fname_src->base_name, smb_fname_dst->base_name);
 	WRAP_RETURN(result);
 }
diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index 6ad85498be3..b52f7e25da5 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -527,7 +527,7 @@ static void cups_async_callback(struct tevent_context *event_ctx,
 	struct pcap_data pcap_data;
 	DATA_BLOB pcap_blob;
 	enum ndr_err_code ndr_ret;
-	int i;
+	uint32_t i;
 
 	DEBUG(5,("cups_async_callback: callback received for printer data. "
 		"fd = %d\n", cb_args->pipe_fd));
@@ -573,9 +573,9 @@ static void cups_async_callback(struct tevent_context *event_ctx,
 err_out:
 	pcap_cache_destroy_specific(&tmp_pcap_cache);
 	TALLOC_FREE(frame);
+	TALLOC_FREE(cache_fd_event);
 	close(cb_args->pipe_fd);
 	TALLOC_FREE(cb_args);
-	TALLOC_FREE(cache_fd_event);
 }
 
 bool cups_cache_reload(struct tevent_context *ev,
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 8327af0ebf6..7f8d2688978 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -1475,9 +1475,20 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode,
 	TALLOC_CTX *mem_ctx;
 
 	mem_ctx = talloc_named(NULL, 0, "manage_gensec_request internal mem_ctx");
+	if (mem_ctx == NULL) {
+		printf("BH No Memory\n");
+		exit(1);
+	}
 
 	if (*private1) {
-		state = (struct gensec_ntlm_state *)*private1;
+		state = talloc_get_type(*private1, struct gensec_ntlm_state);
+		if (state == NULL) {
+			DBG_WARNING("*private1 is of type %s\n",
+				    talloc_get_name(*private1));
+			printf("BH *private1 is of type %s\n",
+			       talloc_get_name(*private1));
+			exit(1);
+		}
 	} else {
 		state = talloc_zero(NULL, struct gensec_ntlm_state);
 		if (!state) {


-- 
Samba Shared Repository



More information about the samba-cvs mailing list