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

libcli:auth: Return NTSTATUS for netlogon_creds_encrypt_samlogon_validation()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andreas Schneider 2019-05-29 14:25:57 +02:00 committed by Andreas Schneider
parent f825fa6d90
commit 00dd1a8bf8
4 changed files with 21 additions and 13 deletions

View File

@ -688,12 +688,14 @@ void netlogon_creds_decrypt_samlogon_validation(struct netlogon_creds_Credential
validation, false);
}
void netlogon_creds_encrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
uint16_t validation_level,
union netr_Validation *validation)
NTSTATUS netlogon_creds_encrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
uint16_t validation_level,
union netr_Validation *validation)
{
netlogon_creds_crypt_samlogon_validation(creds, validation_level,
validation, true);
return NT_STATUS_OK;
}
static void netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,

View File

@ -62,9 +62,9 @@ NTSTATUS netlogon_creds_server_step_check(struct netlogon_creds_CredentialState
void netlogon_creds_decrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
uint16_t validation_level,
union netr_Validation *validation);
void netlogon_creds_encrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
uint16_t validation_level,
union netr_Validation *validation);
NTSTATUS netlogon_creds_encrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
uint16_t validation_level,
union netr_Validation *validation);
void netlogon_creds_decrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
enum netr_LogonInfoClass level,
union netr_LogonLevel *logon);

View File

@ -1752,10 +1752,11 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
return status;
}
netlogon_creds_encrypt_samlogon_validation(creds,
r->in.validation_level,
r->out.validation);
return NT_STATUS_OK;
status = netlogon_creds_encrypt_samlogon_validation(creds,
r->in.validation_level,
r->out.validation);
return status;
}
/****************************************************************

View File

@ -1262,9 +1262,14 @@ static void dcesrv_netr_LogonSamLogon_base_reply(
NTSTATUS status;
if (NT_STATUS_IS_OK(r->out.result)) {
netlogon_creds_encrypt_samlogon_validation(state->creds,
r->in.validation_level,
r->out.validation);
status = netlogon_creds_encrypt_samlogon_validation(state->creds,
r->in.validation_level,
r->out.validation);
if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("netlogon_creds_encrypt_samlogon_validation() "
"failed - %s\n",
nt_errstr(status));
}
}
if (state->_r.lslex != NULL) {