mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34: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);
|
||||
}
|
||||
|
||||
void netlogon_creds_encrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
|
||||
enum netr_LogonInfoClass level,
|
||||
union netr_LogonLevel *logon)
|
||||
NTSTATUS netlogon_creds_encrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
|
||||
enum netr_LogonInfoClass level,
|
||||
union netr_LogonLevel *logon)
|
||||
{
|
||||
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,
|
||||
|
@ -2365,9 +2365,15 @@ static void netlogon_creds_cli_LogonSamLogon_start(struct tevent_req *req)
|
||||
return;
|
||||
}
|
||||
|
||||
netlogon_creds_encrypt_samlogon_logon(state->ro_creds,
|
||||
state->logon_level,
|
||||
state->logon);
|
||||
status = netlogon_creds_encrypt_samlogon_logon(state->ro_creds,
|
||||
state->logon_level,
|
||||
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,
|
||||
@ -2419,9 +2425,13 @@ static void netlogon_creds_cli_LogonSamLogon_start(struct tevent_req *req)
|
||||
return;
|
||||
}
|
||||
|
||||
netlogon_creds_encrypt_samlogon_logon(&state->tmp_creds,
|
||||
state->logon_level,
|
||||
state->logon);
|
||||
status = netlogon_creds_encrypt_samlogon_logon(&state->tmp_creds,
|
||||
state->logon_level,
|
||||
state->logon);
|
||||
if (tevent_req_nterror(req, status)) {
|
||||
netlogon_creds_cli_LogonSamLogon_cleanup(req, status);
|
||||
return;
|
||||
}
|
||||
|
||||
state->validation_level = 3;
|
||||
|
||||
|
@ -68,9 +68,9 @@ NTSTATUS netlogon_creds_encrypt_samlogon_validation(struct netlogon_creds_Creden
|
||||
void netlogon_creds_decrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
|
||||
enum netr_LogonInfoClass level,
|
||||
union netr_LogonLevel *logon);
|
||||
void netlogon_creds_encrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
|
||||
enum netr_LogonInfoClass level,
|
||||
union netr_LogonLevel *logon);
|
||||
NTSTATUS netlogon_creds_encrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
|
||||
enum netr_LogonInfoClass level,
|
||||
union netr_LogonLevel *logon);
|
||||
union netr_LogonLevel *netlogon_creds_shallow_copy_logon(TALLOC_CTX *mem_ctx,
|
||||
enum netr_LogonInfoClass level,
|
||||
const union netr_LogonLevel *in);
|
||||
|
Loading…
Reference in New Issue
Block a user