mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s3:rpc_client: remove unused rpccli_netlogon_sam_network_logon()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
e4fea80693
commit
3f41b58384
@ -346,100 +346,6 @@ static NTSTATUS map_validation_to_info3(TALLOC_CTX *mem_ctx,
|
||||
* @param info3 Pointer to a NET_USER_INFO_3 already allocated by the caller.
|
||||
**/
|
||||
|
||||
NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 logon_parameters,
|
||||
const char *server,
|
||||
const char *username,
|
||||
const char *domain,
|
||||
const char *workstation,
|
||||
const uint8 chal[8],
|
||||
uint16_t _ignored_validation_level,
|
||||
DATA_BLOB lm_response,
|
||||
DATA_BLOB nt_response,
|
||||
struct netr_SamInfo3 **info3)
|
||||
{
|
||||
NTSTATUS status;
|
||||
const char *workstation_name_slash;
|
||||
union netr_LogonLevel *logon = NULL;
|
||||
struct netr_NetworkInfo *network_info;
|
||||
uint16_t validation_level = 0;
|
||||
union netr_Validation *validation = NULL;
|
||||
uint8_t authoritative = 0;
|
||||
uint32_t flags = 0;
|
||||
struct netr_ChallengeResponse lm;
|
||||
struct netr_ChallengeResponse nt;
|
||||
|
||||
*info3 = NULL;
|
||||
|
||||
ZERO_STRUCT(lm);
|
||||
ZERO_STRUCT(nt);
|
||||
|
||||
logon = talloc_zero(mem_ctx, union netr_LogonLevel);
|
||||
if (!logon) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
network_info = talloc_zero(mem_ctx, struct netr_NetworkInfo);
|
||||
if (!network_info) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (workstation[0] != '\\' && workstation[1] != '\\') {
|
||||
workstation_name_slash = talloc_asprintf(mem_ctx, "\\\\%s", workstation);
|
||||
} else {
|
||||
workstation_name_slash = workstation;
|
||||
}
|
||||
|
||||
if (!workstation_name_slash) {
|
||||
DEBUG(0, ("talloc_asprintf failed!\n"));
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
/* Initialise input parameters */
|
||||
|
||||
lm.data = lm_response.data;
|
||||
lm.length = lm_response.length;
|
||||
nt.data = nt_response.data;
|
||||
nt.length = nt_response.length;
|
||||
|
||||
network_info->identity_info.domain_name.string = domain;
|
||||
network_info->identity_info.parameter_control = logon_parameters;
|
||||
network_info->identity_info.logon_id_low = 0xdead;
|
||||
network_info->identity_info.logon_id_high = 0xbeef;
|
||||
network_info->identity_info.account_name.string = username;
|
||||
network_info->identity_info.workstation.string = workstation_name_slash;
|
||||
|
||||
memcpy(network_info->challenge, chal, 8);
|
||||
network_info->nt = nt;
|
||||
network_info->lm = lm;
|
||||
|
||||
logon->network = network_info;
|
||||
|
||||
/* Marshall data and send request */
|
||||
|
||||
status = netlogon_creds_cli_LogonSamLogon(cli->netlogon_creds,
|
||||
cli->binding_handle,
|
||||
NetlogonNetworkInformation,
|
||||
logon,
|
||||
mem_ctx,
|
||||
&validation_level,
|
||||
&validation,
|
||||
&authoritative,
|
||||
&flags);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
status = map_validation_to_info3(mem_ctx,
|
||||
validation_level, validation,
|
||||
info3);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
NTSTATUS rpccli_netlogon_network_logon(struct netlogon_creds_cli_context *creds,
|
||||
struct dcerpc_binding_handle *binding_handle,
|
||||
|
@ -51,18 +51,6 @@ NTSTATUS rpccli_netlogon_password_logon(struct netlogon_creds_cli_context *creds
|
||||
const char *password,
|
||||
const char *workstation,
|
||||
enum netr_LogonInfoClass logon_type);
|
||||
NTSTATUS rpccli_netlogon_sam_network_logon(struct rpc_pipe_client *cli,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32 logon_parameters,
|
||||
const char *server,
|
||||
const char *username,
|
||||
const char *domain,
|
||||
const char *workstation,
|
||||
const uint8 chal[8],
|
||||
uint16_t validation_level,
|
||||
DATA_BLOB lm_response,
|
||||
DATA_BLOB nt_response,
|
||||
struct netr_SamInfo3 **info3);
|
||||
NTSTATUS rpccli_netlogon_network_logon(struct netlogon_creds_cli_context *creds,
|
||||
struct dcerpc_binding_handle *binding_handle,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
|
Loading…
Reference in New Issue
Block a user