1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

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@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 19 20:20:00 UTC 2021 on sn-devel-184
This commit is contained in:
Stefan Metzmacher 2018-04-16 16:08:29 +02:00 committed by Jeremy Allison
parent dd07bb81bb
commit 8a607e7577
2 changed files with 17 additions and 4 deletions

View File

@ -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;

View File

@ -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,