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_decrypt_samlogon_validation()
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
00dd1a8bf8
commit
2e6fe27bad
@ -680,12 +680,14 @@ static void netlogon_creds_crypt_samlogon_validation(struct netlogon_creds_Crede
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void netlogon_creds_decrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
|
NTSTATUS netlogon_creds_decrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
|
||||||
uint16_t validation_level,
|
uint16_t validation_level,
|
||||||
union netr_Validation *validation)
|
union netr_Validation *validation)
|
||||||
{
|
{
|
||||||
netlogon_creds_crypt_samlogon_validation(creds, validation_level,
|
netlogon_creds_crypt_samlogon_validation(creds, validation_level,
|
||||||
validation, false);
|
validation, false);
|
||||||
|
|
||||||
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS netlogon_creds_encrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
|
NTSTATUS netlogon_creds_encrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
|
||||||
|
@ -2531,9 +2531,13 @@ static void netlogon_creds_cli_LogonSamLogon_done(struct tevent_req *subreq)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
netlogon_creds_decrypt_samlogon_validation(state->ro_creds,
|
status = netlogon_creds_decrypt_samlogon_validation(state->ro_creds,
|
||||||
state->validation_level,
|
state->validation_level,
|
||||||
state->validation);
|
state->validation);
|
||||||
|
if (tevent_req_nterror(req, status)) {
|
||||||
|
netlogon_creds_cli_LogonSamLogon_cleanup(req, status);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
tevent_req_done(req);
|
tevent_req_done(req);
|
||||||
return;
|
return;
|
||||||
@ -2601,9 +2605,13 @@ static void netlogon_creds_cli_LogonSamLogon_done(struct tevent_req *subreq)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
netlogon_creds_decrypt_samlogon_validation(&state->tmp_creds,
|
status = netlogon_creds_decrypt_samlogon_validation(&state->tmp_creds,
|
||||||
state->validation_level,
|
state->validation_level,
|
||||||
state->validation);
|
state->validation);
|
||||||
|
if (tevent_req_nterror(req, result)) {
|
||||||
|
netlogon_creds_cli_LogonSamLogon_cleanup(req, result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
tevent_req_done(req);
|
tevent_req_done(req);
|
||||||
}
|
}
|
||||||
|
@ -59,9 +59,9 @@ struct netlogon_creds_CredentialState *netlogon_creds_server_init(TALLOC_CTX *me
|
|||||||
NTSTATUS netlogon_creds_server_step_check(struct netlogon_creds_CredentialState *creds,
|
NTSTATUS netlogon_creds_server_step_check(struct netlogon_creds_CredentialState *creds,
|
||||||
const struct netr_Authenticator *received_authenticator,
|
const struct netr_Authenticator *received_authenticator,
|
||||||
struct netr_Authenticator *return_authenticator) ;
|
struct netr_Authenticator *return_authenticator) ;
|
||||||
void netlogon_creds_decrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
|
NTSTATUS netlogon_creds_decrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
|
||||||
uint16_t validation_level,
|
uint16_t validation_level,
|
||||||
union netr_Validation *validation);
|
union netr_Validation *validation);
|
||||||
NTSTATUS netlogon_creds_encrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
|
NTSTATUS netlogon_creds_encrypt_samlogon_validation(struct netlogon_creds_CredentialState *creds,
|
||||||
uint16_t validation_level,
|
uint16_t validation_level,
|
||||||
union netr_Validation *validation);
|
union netr_Validation *validation);
|
||||||
|
@ -176,9 +176,15 @@ static NTSTATUS check_samlogon(struct samlogon_state *samlogon_state,
|
|||||||
|
|
||||||
validation_level = r->in.validation_level;
|
validation_level = r->in.validation_level;
|
||||||
|
|
||||||
netlogon_creds_decrypt_samlogon_validation(samlogon_state->creds,
|
status = netlogon_creds_decrypt_samlogon_validation(samlogon_state->creds,
|
||||||
validation_level,
|
validation_level,
|
||||||
r->out.validation);
|
r->out.validation);
|
||||||
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
|
if (error_string) {
|
||||||
|
*error_string = strdup(nt_errstr(status));
|
||||||
|
}
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
switch (validation_level) {
|
switch (validation_level) {
|
||||||
case 2:
|
case 2:
|
||||||
@ -210,9 +216,15 @@ static NTSTATUS check_samlogon(struct samlogon_state *samlogon_state,
|
|||||||
|
|
||||||
validation_level = r_ex->in.validation_level;
|
validation_level = r_ex->in.validation_level;
|
||||||
|
|
||||||
netlogon_creds_decrypt_samlogon_validation(samlogon_state->creds,
|
status = netlogon_creds_decrypt_samlogon_validation(samlogon_state->creds,
|
||||||
validation_level,
|
validation_level,
|
||||||
r_ex->out.validation);
|
r_ex->out.validation);
|
||||||
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
|
if (error_string) {
|
||||||
|
*error_string = strdup(nt_errstr(status));
|
||||||
|
}
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
switch (validation_level) {
|
switch (validation_level) {
|
||||||
case 2:
|
case 2:
|
||||||
@ -252,9 +264,15 @@ static NTSTATUS check_samlogon(struct samlogon_state *samlogon_state,
|
|||||||
|
|
||||||
validation_level = r_flags->in.validation_level;
|
validation_level = r_flags->in.validation_level;
|
||||||
|
|
||||||
netlogon_creds_decrypt_samlogon_validation(samlogon_state->creds,
|
status = netlogon_creds_decrypt_samlogon_validation(samlogon_state->creds,
|
||||||
validation_level,
|
validation_level,
|
||||||
r_flags->out.validation);
|
r_flags->out.validation);
|
||||||
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
|
if (error_string) {
|
||||||
|
*error_string = strdup(nt_errstr(status));
|
||||||
|
}
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
switch (validation_level) {
|
switch (validation_level) {
|
||||||
case 2:
|
case 2:
|
||||||
|
Loading…
Reference in New Issue
Block a user