*/
#include "includes.h"
+#include "../libcli/auth/libcli_auth.h"
static const struct {
int prot;
the server's domain at this point. The 'server name' is also
dodgy...
*/
- names_blob = NTLMv2_generate_names_blob(cli->called.name, workgroup);
+ names_blob = NTLMv2_generate_names_blob(NULL, cli->called.name, workgroup);
- if (!SMBNTLMv2encrypt(user, workgroup, pass, &server_chal,
+ if (!SMBNTLMv2encrypt(NULL, user, workgroup, pass, &server_chal,
&names_blob,
- &lm_response, &nt_response, &session_key)) {
+ &lm_response, &nt_response, NULL, &session_key)) {
data_blob_free(&names_blob);
data_blob_free(&server_chal);
return NT_STATUS_ACCESS_DENIED;
E_deshash(pass, session_key.data);
memset(&session_key.data[8], '\0', 8);
#else
- SMBsesskeygen_ntv1(nt_hash, NULL, session_key.data);
+ SMBsesskeygen_ntv1(nt_hash, session_key.data);
#endif
}
cli_temp_set_signing(cli);
break;
}
} else {
- if (!msrpc_parse(&input, "Cd",
+ if (!msrpc_parse(NULL, &input, "Cd",
"NTLMSSP",
&ntlmssp_command)) {
DEBUG(1, ("Failed to parse NTLMSSP packet, could not extract NTLMSSP command\n"));
#endif
if (request.length) {
- if ((request.length < 16) || !msrpc_parse(&request, "Cdd",
+ if ((request.length < 16) || !msrpc_parse(NULL, &request, "Cdd",
"NTLMSSP",
&ntlmssp_command,
&neg_flags)) {
/* This creates the 'blob' of names that appears at the end of the packet */
if (chal_flags & NTLMSSP_CHAL_TARGET_INFO)
{
- msrpc_gen(&struct_blob, "aaaaa",
+ msrpc_gen(NULL, &struct_blob, "aaaaa",
NTLMSSP_NAME_TYPE_DOMAIN, target_name,
NTLMSSP_NAME_TYPE_SERVER, ntlmssp_state->get_global_myname(),
NTLMSSP_NAME_TYPE_DOMAIN_DNS, dnsdomname,
gen_string = "CdAdbddB";
}
- msrpc_gen(reply, gen_string,
+ msrpc_gen(NULL, reply, gen_string,
"NTLMSSP",
NTLMSSP_CHALLENGE,
target_name,
ntlmssp_state->workstation = NULL;
/* now the NTLMSSP encoded auth hashes */
- if (!msrpc_parse(&request, parse_string,
+ if (!msrpc_parse(NULL, &request, parse_string,
"NTLMSSP",
&ntlmssp_command,
&ntlmssp_state->lm_resp,
}
/* now the NTLMSSP encoded auth hashes */
- if (!msrpc_parse(&request, parse_string,
+ if (!msrpc_parse(NULL, &request, parse_string,
"NTLMSSP",
&ntlmssp_command,
&ntlmssp_state->lm_resp,
}
/* generate the ntlmssp negotiate packet */
- msrpc_gen(next_request, "CddAA",
+ msrpc_gen(NULL, next_request, "CddAA",
"NTLMSSP",
NTLMSSP_NEGOTIATE,
ntlmssp_state->neg_flags,
DATA_BLOB encrypted_session_key = data_blob_null;
NTSTATUS nt_status = NT_STATUS_OK;
- if (!msrpc_parse(&reply, "CdBd",
+ if (!msrpc_parse(NULL, &reply, "CdBd",
"NTLMSSP",
&ntlmssp_command,
&server_domain_blob,
DEBUG(3, ("NTLMSSP: Set final flags:\n"));
debug_ntlmssp_flags(ntlmssp_state->neg_flags);
- if (!msrpc_parse(&reply, chal_parse_string,
+ if (!msrpc_parse(NULL, &reply, chal_parse_string,
"NTLMSSP",
&ntlmssp_command,
&server_domain,
}
/* this generates the actual auth packet */
- if (!msrpc_gen(next_request, auth_gen_string,
+ if (!msrpc_gen(NULL, next_request, auth_gen_string,
"NTLMSSP",
NTLMSSP_AUTH,
lm_response.data, lm_response.length,
*/
#include "includes.h"
+#include "../libcli/auth/libcli_auth.h"
#define CLI_SIGN "session key to client-to-server signing key magic constant"
#define CLI_SEAL "session key to client-to-server sealing key magic constant"
} else {
uint32 crc;
crc = crc32_calc_buffer(data, length);
- if (!msrpc_gen(sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmv1_seq_num)) {
+ if (!msrpc_gen(NULL, sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmv1_seq_num)) {
return NT_STATUS_NO_MEMORY;
}
} else {
uint32 crc;
crc = crc32_calc_buffer(data, length);
- if (!msrpc_gen(sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmv1_seq_num)) {
+ if (!msrpc_gen(NULL, sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmv1_seq_num)) {
return NT_STATUS_NO_MEMORY;
}