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_decrypt_samlogon_logon()

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 16:49:29 +02:00 committed by Andreas Schneider
parent 31f110317f
commit cad3adb0b4
4 changed files with 18 additions and 14 deletions

View File

@ -804,11 +804,13 @@ static void netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_Credential
}
}
void netlogon_creds_decrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
enum netr_LogonInfoClass level,
union netr_LogonLevel *logon)
NTSTATUS netlogon_creds_decrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
enum netr_LogonInfoClass level,
union netr_LogonLevel *logon)
{
netlogon_creds_crypt_samlogon_logon(creds, level, logon, false);
return NT_STATUS_OK;
}
NTSTATUS netlogon_creds_encrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,

View File

@ -65,9 +65,9 @@ NTSTATUS netlogon_creds_decrypt_samlogon_validation(struct netlogon_creds_Creden
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);
NTSTATUS netlogon_creds_decrypt_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);

View File

@ -1584,11 +1584,12 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
DEBUG(5,("Attempting validation level %d for unmapped username %s.\n",
r->in.validation_level, nt_username));
status = NT_STATUS_OK;
netlogon_creds_decrypt_samlogon_logon(creds,
r->in.logon_level,
logon);
status = netlogon_creds_decrypt_samlogon_logon(creds,
r->in.logon_level,
logon);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
status = make_auth3_context_for_netlogon(talloc_tos(), &auth_context);
if (!NT_STATUS_IS_OK(status)) {

View File

@ -970,9 +970,10 @@ static NTSTATUS dcesrv_netr_LogonSamLogon_base_call(struct dcesrv_netr_LogonSamL
user_info->service_description = "SamLogon";
netlogon_creds_decrypt_samlogon_logon(creds,
r->in.logon_level,
r->in.logon);
nt_status = netlogon_creds_decrypt_samlogon_logon(creds,
r->in.logon_level,
r->in.logon);
NT_STATUS_NOT_OK_RETURN(nt_status);
switch (r->in.logon_level) {
case NetlogonInteractiveInformation: