mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
libcli:auth: Return NTSTATUS for netlogon_creds_encrypt_samlogon_logon()
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
8c9cf56fe9
commit
31f110317f
@ -811,11 +811,13 @@ void netlogon_creds_decrypt_samlogon_logon(struct netlogon_creds_CredentialState
|
|||||||
netlogon_creds_crypt_samlogon_logon(creds, level, logon, false);
|
netlogon_creds_crypt_samlogon_logon(creds, level, logon, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void netlogon_creds_encrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
|
NTSTATUS netlogon_creds_encrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
|
||||||
enum netr_LogonInfoClass level,
|
enum netr_LogonInfoClass level,
|
||||||
union netr_LogonLevel *logon)
|
union netr_LogonLevel *logon)
|
||||||
{
|
{
|
||||||
netlogon_creds_crypt_samlogon_logon(creds, level, logon, true);
|
netlogon_creds_crypt_samlogon_logon(creds, level, logon, true);
|
||||||
|
|
||||||
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
union netr_LogonLevel *netlogon_creds_shallow_copy_logon(TALLOC_CTX *mem_ctx,
|
union netr_LogonLevel *netlogon_creds_shallow_copy_logon(TALLOC_CTX *mem_ctx,
|
||||||
|
@ -2365,9 +2365,15 @@ static void netlogon_creds_cli_LogonSamLogon_start(struct tevent_req *req)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
netlogon_creds_encrypt_samlogon_logon(state->ro_creds,
|
status = netlogon_creds_encrypt_samlogon_logon(state->ro_creds,
|
||||||
state->logon_level,
|
state->logon_level,
|
||||||
state->logon);
|
state->logon);
|
||||||
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
|
status = NT_STATUS_ACCESS_DENIED;
|
||||||
|
tevent_req_nterror(req, status);
|
||||||
|
netlogon_creds_cli_LogonSamLogon_cleanup(req, status);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
subreq = dcerpc_netr_LogonSamLogonEx_send(state, state->ev,
|
subreq = dcerpc_netr_LogonSamLogonEx_send(state, state->ev,
|
||||||
@ -2419,9 +2425,13 @@ static void netlogon_creds_cli_LogonSamLogon_start(struct tevent_req *req)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
netlogon_creds_encrypt_samlogon_logon(&state->tmp_creds,
|
status = netlogon_creds_encrypt_samlogon_logon(&state->tmp_creds,
|
||||||
state->logon_level,
|
state->logon_level,
|
||||||
state->logon);
|
state->logon);
|
||||||
|
if (tevent_req_nterror(req, status)) {
|
||||||
|
netlogon_creds_cli_LogonSamLogon_cleanup(req, status);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
state->validation_level = 3;
|
state->validation_level = 3;
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ NTSTATUS netlogon_creds_encrypt_samlogon_validation(struct netlogon_creds_Creden
|
|||||||
void netlogon_creds_decrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
|
void netlogon_creds_decrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
|
||||||
enum netr_LogonInfoClass level,
|
enum netr_LogonInfoClass level,
|
||||||
union netr_LogonLevel *logon);
|
union netr_LogonLevel *logon);
|
||||||
void netlogon_creds_encrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
|
NTSTATUS netlogon_creds_encrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
|
||||||
enum netr_LogonInfoClass level,
|
enum netr_LogonInfoClass level,
|
||||||
union netr_LogonLevel *logon);
|
union netr_LogonLevel *logon);
|
||||||
union netr_LogonLevel *netlogon_creds_shallow_copy_logon(TALLOC_CTX *mem_ctx,
|
union netr_LogonLevel *netlogon_creds_shallow_copy_logon(TALLOC_CTX *mem_ctx,
|
||||||
|
Loading…
Reference in New Issue
Block a user