enum netr_LogonInfoClass logon_type,
uint8_t *authoritative,
uint32_t *flags,
- struct netr_SamInfo3 **info3)
+ uint16_t *_validation_level,
+ union netr_Validation **_validation)
{
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS status;
binding_handle,
logon_type,
logon,
- frame,
+ mem_ctx,
&validation_level,
&validation,
authoritative,
return status;
}
- status = map_validation_to_info3(mem_ctx,
- validation_level, validation,
- info3);
TALLOC_FREE(frame);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
+ *_validation_level = validation_level;
+ *_validation = validation;
return NT_STATUS_OK;
}
DATA_BLOB nt_response,
uint8_t *authoritative,
uint32_t *flags,
- struct netr_SamInfo3 **info3)
+ uint16_t *_validation_level,
+ union netr_Validation **_validation)
{
NTSTATUS status;
const char *workstation_name_slash;
struct netr_ChallengeResponse lm;
struct netr_ChallengeResponse nt;
- *info3 = NULL;
+ *_validation = NULL;
ZERO_STRUCT(lm);
ZERO_STRUCT(nt);
return status;
}
- status = map_validation_to_info3(mem_ctx,
- validation_level, validation,
- info3);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
+ *_validation_level = validation_level;
+ *_validation = validation;
return NT_STATUS_OK;
}
enum netr_LogonInfoClass logon_type,
uint8_t *authoritative,
uint32_t *flags,
- struct netr_SamInfo3 **info3);
+ uint16_t *_validation_level,
+ union netr_Validation **_validation);
NTSTATUS rpccli_netlogon_network_logon(
- struct netlogon_creds_cli_context *creds,
+ struct netlogon_creds_cli_context *creds_ctx,
struct dcerpc_binding_handle *binding_handle,
TALLOC_CTX *mem_ctx,
uint32_t logon_parameters,
DATA_BLOB nt_response,
uint8_t *authoritative,
uint32_t *flags,
- struct netr_SamInfo3 **info3);
+ uint16_t *_validation_level,
+ union netr_Validation **_validation);
#endif /* _RPC_CLIENT_CLI_NETLOGON_H_ */
#include "rpc_client/cli_netlogon.h"
#include "secrets.h"
#include "../libcli/auth/netlogon_creds_cli.h"
+#include "rpc_client/util_netlogon.h"
static WERROR cmd_netlogon_logon_ctrl2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx, int argc,
struct netr_SamInfo3 *info3 = NULL;
uint8_t authoritative = 0;
uint32_t flags = 0;
+ uint16_t validation_level;
+ union netr_Validation *validation = NULL;
/* Check arguments */
logon_type,
&authoritative,
&flags,
- &info3);
+ &validation_level,
+ &validation);
if (!NT_STATUS_IS_OK(result))
goto done;
+ result = map_validation_to_info3(mem_ctx,
+ validation_level,
+ validation,
+ &info3);
+ if (!NT_STATUS_IS_OK(result)) {
+ return result;
+ }
+
done:
return result;
}
int netr_attempts = 0;
bool retry = false;
NTSTATUS result;
+ uint16_t validation_level;
+ union netr_Validation *validation = NULL;
do {
struct rpc_pipe_client *netlogon_pipe;
NetlogonInteractiveInformation,
authoritative,
flags,
- info3);
+ &validation_level,
+ &validation);
} else {
result = rpccli_netlogon_network_logon(
domain->conn.netlogon_creds_ctx,
nt_response,
authoritative,
flags,
- info3);
+ &validation_level,
+ &validation);
}
/*
domainname));
invalidate_cm_connection(domain);
}
- return result;
+
+ if (!NT_STATUS_IS_OK(result)) {
+ return result;
+ }
+
+ result = map_validation_to_info3(mem_ctx,
+ validation_level,
+ validation,
+ info3);
+ TALLOC_FREE(validation);
+ if (!NT_STATUS_IS_OK(result)) {
+ return result;
+ }
+
+ return NT_STATUS_OK;
}
static NTSTATUS winbindd_dual_pam_auth_samlogon(