[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Oct 19 20:20:02 UTC 2021


The branch, master has been updated
       via  8a607e7577a netlogon_creds_cli: add netlogon_creds_cli_SendToSam_recv() and don't ignore result
      from  dd07bb81bb9 libcli/smb: use MID=0 for SMB2 Cancel with ASYNC_ID and legacy signing algorithms

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


- Log -----------------------------------------------------------------
commit 8a607e7577a259ae8a786f436241b41b6cc6c884
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Apr 16 16:08:29 2018 +0200

    netlogon_creds_cli: add netlogon_creds_cli_SendToSam_recv() and don't ignore result
    
    This is a low level function that should not ignore results.
    
    If the caller doesn't care it's his choice.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Oct 19 20:20:00 UTC 2021 on sn-devel-184

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

Summary of changes:
 libcli/auth/netlogon_creds_cli.c | 19 ++++++++++++++++---
 libcli/auth/netlogon_creds_cli.h |  2 +-
 2 files changed, 17 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c
index e78bc173968..beab2fae53a 100644
--- a/libcli/auth/netlogon_creds_cli.c
+++ b/libcli/auth/netlogon_creds_cli.c
@@ -3820,6 +3820,20 @@ static void netlogon_creds_cli_SendToSam_done(struct tevent_req *subreq)
 	tevent_req_done(req);
 }
 
+NTSTATUS netlogon_creds_cli_SendToSam_recv(struct tevent_req *req)
+{
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		netlogon_creds_cli_SendToSam_cleanup(req, status);
+		tevent_req_received(req);
+		return status;
+	}
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
 NTSTATUS netlogon_creds_cli_SendToSam(struct netlogon_creds_cli_context *context,
 				      struct dcerpc_binding_handle *b,
 				      struct netr_SendToSamBase *message)
@@ -3827,7 +3841,7 @@ NTSTATUS netlogon_creds_cli_SendToSam(struct netlogon_creds_cli_context *context
 	TALLOC_CTX *frame = talloc_stackframe();
 	struct tevent_context *ev;
 	struct tevent_req *req;
-	NTSTATUS status = NT_STATUS_OK;
+	NTSTATUS status = NT_STATUS_NO_MEMORY;
 
 	ev = samba_tevent_context_init(frame);
 	if (ev == NULL) {
@@ -3840,8 +3854,7 @@ NTSTATUS netlogon_creds_cli_SendToSam(struct netlogon_creds_cli_context *context
 	if (!tevent_req_poll_ntstatus(req, ev, &status)) {
 		goto fail;
 	}
-
-	/* Ignore the result */
+	status = netlogon_creds_cli_SendToSam_recv(req);
  fail:
 	TALLOC_FREE(frame);
 	return status;
diff --git a/libcli/auth/netlogon_creds_cli.h b/libcli/auth/netlogon_creds_cli.h
index 7fb41872c36..6f40a46aa0a 100644
--- a/libcli/auth/netlogon_creds_cli.h
+++ b/libcli/auth/netlogon_creds_cli.h
@@ -208,7 +208,7 @@ struct tevent_req *netlogon_creds_cli_SendToSam_send(TALLOC_CTX *mem_ctx,
 						     struct netlogon_creds_cli_context *context,
 						     struct dcerpc_binding_handle *b,
 						     struct netr_SendToSamBase *message);
-
+NTSTATUS netlogon_creds_cli_SendToSam_recv(struct tevent_req *req);
 NTSTATUS netlogon_creds_cli_SendToSam(
 				struct netlogon_creds_cli_context *context,
 				struct dcerpc_binding_handle *b,


-- 
Samba Shared Repository



More information about the samba-cvs mailing list