diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-09-16 19:23:18 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2014-01-07 12:47:16 +0100 |
commit | e4fea80693b49e79a96acdac09d5ea292756635c (patch) | |
tree | 277b3365b0c39763fc8f51fcd1e1f1f30efafed9 /source3/rpc_client/cli_netlogon.c | |
parent | a4faf57b47095bfc0f4370ac093c8c4cef17584f (diff) | |
download | samba-e4fea80693b49e79a96acdac09d5ea292756635c.tar.gz |
s3:rpc_client: remove unused rpccli_netlogon_sam_logon()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/rpc_client/cli_netlogon.c')
-rw-r--r-- | source3/rpc_client/cli_netlogon.c | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index 687d0c20824..171337a1730 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -160,130 +160,6 @@ NTSTATUS rpccli_setup_netlogon_creds(struct cli_state *cli, /* Logon domain user */ -NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - uint32 logon_parameters, - const char *domain, - const char *username, - const char *password, - const char *workstation, - uint16_t _ignored_validation_level, - int logon_type) -{ - NTSTATUS status; - union netr_LogonLevel *logon; - uint16_t validation_level = 0; - union netr_Validation *validation = NULL; - uint8_t authoritative = 0; - uint32_t flags = 0; - fstring clnt_name_slash; - - logon = talloc_zero(mem_ctx, union netr_LogonLevel); - if (!logon) { - return NT_STATUS_NO_MEMORY; - } - - if (workstation) { - fstr_sprintf( clnt_name_slash, "\\\\%s", workstation ); - } else { - fstr_sprintf( clnt_name_slash, "\\\\%s", lp_netbios_name() ); - } - - /* Initialise input parameters */ - - switch (logon_type) { - case NetlogonInteractiveInformation: { - - struct netr_PasswordInfo *password_info; - - struct samr_Password lmpassword; - struct samr_Password ntpassword; - - password_info = talloc_zero(mem_ctx, struct netr_PasswordInfo); - if (!password_info) { - return NT_STATUS_NO_MEMORY; - } - - nt_lm_owf_gen(password, ntpassword.hash, lmpassword.hash); - - password_info->identity_info.domain_name.string = domain; - password_info->identity_info.parameter_control = logon_parameters; - password_info->identity_info.logon_id_low = 0xdead; - password_info->identity_info.logon_id_high = 0xbeef; - password_info->identity_info.account_name.string = username; - password_info->identity_info.workstation.string = clnt_name_slash; - - password_info->lmpassword = lmpassword; - password_info->ntpassword = ntpassword; - - logon->password = password_info; - - break; - } - case NetlogonNetworkInformation: { - struct netr_NetworkInfo *network_info; - uint8 chal[8]; - unsigned char local_lm_response[24]; - unsigned char local_nt_response[24]; - struct netr_ChallengeResponse lm; - struct netr_ChallengeResponse nt; - - ZERO_STRUCT(lm); - ZERO_STRUCT(nt); - - network_info = talloc_zero(mem_ctx, struct netr_NetworkInfo); - if (!network_info) { - return NT_STATUS_NO_MEMORY; - } - - generate_random_buffer(chal, 8); - - SMBencrypt(password, chal, local_lm_response); - SMBNTencrypt(password, chal, local_nt_response); - - lm.length = 24; - lm.data = local_lm_response; - - nt.length = 24; - nt.data = local_nt_response; - - 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 = clnt_name_slash; - - memcpy(network_info->challenge, chal, 8); - network_info->nt = nt; - network_info->lm = lm; - - logon->network = network_info; - - break; - } - default: - DEBUG(0, ("switch value %d not supported\n", - logon_type)); - return NT_STATUS_INVALID_INFO_CLASS; - } - - status = netlogon_creds_cli_LogonSamLogon(cli->netlogon_creds, - cli->binding_handle, - logon_type, - logon, - mem_ctx, - &validation_level, - &validation, - &authoritative, - &flags); - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - return NT_STATUS_OK; -} - NTSTATUS rpccli_netlogon_password_logon(struct netlogon_creds_cli_context *creds, struct dcerpc_binding_handle *binding_handle, uint32_t logon_parameters, |