mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
netlogon_creds_cli: Pass "capabilities" up from creds_cli_check
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
d7e31d9f4d
commit
32e823e08d
@ -1728,8 +1728,11 @@ static void netlogon_creds_cli_check_caps(struct tevent_req *subreq)
|
|||||||
tevent_req_done(req);
|
tevent_req_done(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS netlogon_creds_cli_check_recv(struct tevent_req *req)
|
NTSTATUS netlogon_creds_cli_check_recv(struct tevent_req *req,
|
||||||
|
union netr_Capabilities *capabilities)
|
||||||
{
|
{
|
||||||
|
struct netlogon_creds_cli_check_state *state = tevent_req_data(
|
||||||
|
req, struct netlogon_creds_cli_check_state);
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
if (tevent_req_is_nterror(req, &status)) {
|
if (tevent_req_is_nterror(req, &status)) {
|
||||||
@ -1738,12 +1741,17 @@ NTSTATUS netlogon_creds_cli_check_recv(struct tevent_req *req)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (capabilities != NULL) {
|
||||||
|
*capabilities = state->caps;
|
||||||
|
}
|
||||||
|
|
||||||
tevent_req_received(req);
|
tevent_req_received(req);
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS netlogon_creds_cli_check(struct netlogon_creds_cli_context *context,
|
NTSTATUS netlogon_creds_cli_check(struct netlogon_creds_cli_context *context,
|
||||||
struct dcerpc_binding_handle *b)
|
struct dcerpc_binding_handle *b,
|
||||||
|
union netr_Capabilities *capabilities)
|
||||||
{
|
{
|
||||||
TALLOC_CTX *frame = talloc_stackframe();
|
TALLOC_CTX *frame = talloc_stackframe();
|
||||||
struct tevent_context *ev;
|
struct tevent_context *ev;
|
||||||
@ -1761,7 +1769,7 @@ NTSTATUS netlogon_creds_cli_check(struct netlogon_creds_cli_context *context,
|
|||||||
if (!tevent_req_poll_ntstatus(req, ev, &status)) {
|
if (!tevent_req_poll_ntstatus(req, ev, &status)) {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
status = netlogon_creds_cli_check_recv(req);
|
status = netlogon_creds_cli_check_recv(req, capabilities);
|
||||||
fail:
|
fail:
|
||||||
TALLOC_FREE(frame);
|
TALLOC_FREE(frame);
|
||||||
return status;
|
return status;
|
||||||
|
@ -116,9 +116,11 @@ struct tevent_req *netlogon_creds_cli_check_send(TALLOC_CTX *mem_ctx,
|
|||||||
struct tevent_context *ev,
|
struct tevent_context *ev,
|
||||||
struct netlogon_creds_cli_context *context,
|
struct netlogon_creds_cli_context *context,
|
||||||
struct dcerpc_binding_handle *b);
|
struct dcerpc_binding_handle *b);
|
||||||
NTSTATUS netlogon_creds_cli_check_recv(struct tevent_req *req);
|
NTSTATUS netlogon_creds_cli_check_recv(struct tevent_req *req,
|
||||||
|
union netr_Capabilities *capabilities);
|
||||||
NTSTATUS netlogon_creds_cli_check(struct netlogon_creds_cli_context *context,
|
NTSTATUS netlogon_creds_cli_check(struct netlogon_creds_cli_context *context,
|
||||||
struct dcerpc_binding_handle *b);
|
struct dcerpc_binding_handle *b,
|
||||||
|
union netr_Capabilities *capabilities);
|
||||||
|
|
||||||
struct tevent_req *netlogon_creds_cli_ServerPasswordSet_send(TALLOC_CTX *mem_ctx,
|
struct tevent_req *netlogon_creds_cli_ServerPasswordSet_send(TALLOC_CTX *mem_ctx,
|
||||||
struct tevent_context *ev,
|
struct tevent_context *ev,
|
||||||
|
@ -446,7 +446,8 @@ again:
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = netlogon_creds_cli_check(creds_ctx, rpccli->binding_handle);
|
status = netlogon_creds_cli_check(creds_ctx, rpccli->binding_handle,
|
||||||
|
NULL);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
DBG_WARNING("netlogon_creds_cli_check failed: %s\n",
|
DBG_WARNING("netlogon_creds_cli_check failed: %s\n",
|
||||||
nt_errstr(status));
|
nt_errstr(status));
|
||||||
|
@ -3370,7 +3370,8 @@ NTSTATUS cli_rpc_pipe_open_schannel_with_creds(struct cli_state *cli,
|
|||||||
if (ndr_syntax_id_equal(&table->syntax_id,
|
if (ndr_syntax_id_equal(&table->syntax_id,
|
||||||
&ndr_table_netlogon.syntax_id)) {
|
&ndr_table_netlogon.syntax_id)) {
|
||||||
status = netlogon_creds_cli_check(netlogon_creds,
|
status = netlogon_creds_cli_check(netlogon_creds,
|
||||||
rpccli->binding_handle);
|
rpccli->binding_handle,
|
||||||
|
NULL);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
DEBUG(0, ("netlogon_creds_cli_check failed with %s\n",
|
DEBUG(0, ("netlogon_creds_cli_check failed with %s\n",
|
||||||
nt_errstr(status)));
|
nt_errstr(status)));
|
||||||
|
Loading…
Reference in New Issue
Block a user