summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clirap.c2
-rw-r--r--source3/libsmb/ntlm_check.c18
-rw-r--r--source3/libsmb/ntlmssp.c12
-rw-r--r--source3/libsmb/ntlmssp_sign.c8
-rw-r--r--source3/libsmb/smb_signing.c20
-rw-r--r--source3/libsmb/smbencrypt.c50
6 files changed, 55 insertions, 55 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 05dc36e91c..4be03e16f0 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -334,7 +334,7 @@ BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char
#ifdef DEBUG_PASSWORD
DEBUG(100,("make_oem_passwd_hash\n"));
- dump_data(100, (char *)data, 516);
+ dump_data(100, data, 516);
#endif
SamOEMhash( (unsigned char *)data, (unsigned char *)old_pw_hash, 516);
diff --git a/source3/libsmb/ntlm_check.c b/source3/libsmb/ntlm_check.c
index e1fc92e344..1ce5d5e424 100644
--- a/source3/libsmb/ntlm_check.c
+++ b/source3/libsmb/ntlm_check.c
@@ -65,13 +65,13 @@ static BOOL smb_pwd_check_ntlmv1(const DATA_BLOB *nt_response,
#ifdef DEBUG_PASSWORD
DEBUG(100,("Part password (P16) was |\n"));
- dump_data(100, (const char *)part_passwd, 16);
+ dump_data(100, part_passwd, 16);
DEBUGADD(100,("Password from client was |\n"));
- dump_data(100, (const char *)nt_response->data, nt_response->length);
+ dump_data(100, nt_response->data, nt_response->length);
DEBUGADD(100,("Given challenge was |\n"));
- dump_data(100, (const char *)sec_blob->data, sec_blob->length);
+ dump_data(100, sec_blob->data, sec_blob->length);
DEBUGADD(100,("Value from encryption was |\n"));
- dump_data(100, (const char *)p24, 24);
+ dump_data(100, p24, 24);
#endif
return (memcmp(p24, nt_response->data, 24) == 0);
}
@@ -136,15 +136,15 @@ static BOOL smb_pwd_check_ntlmv2(const DATA_BLOB *ntv2_response,
#if DEBUG_PASSWORD
DEBUG(100,("Part password (P16) was |\n"));
- dump_data(100, (const char *)part_passwd, 16);
+ dump_data(100, part_passwd, 16);
DEBUGADD(100,("Password from client was |\n"));
- dump_data(100, (const char *)ntv2_response->data, ntv2_response->length);
+ dump_data(100, ntv2_response->data, ntv2_response->length);
DEBUGADD(100,("Variable data from client was |\n"));
- dump_data(100, (const char *)client_key_data.data, client_key_data.length);
+ dump_data(100, client_key_data.data, client_key_data.length);
DEBUGADD(100,("Given challenge was |\n"));
- dump_data(100, (const char *)sec_blob->data, sec_blob->length);
+ dump_data(100, sec_blob->data, sec_blob->length);
DEBUGADD(100,("Value from encryption was |\n"));
- dump_data(100, (const char *)value_from_encryption, 16);
+ dump_data(100, value_from_encryption, 16);
#endif
data_blob_clear_free(&client_key_data);
res = (memcmp(value_from_encryption, client_response, 16) == 0);
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index 2f919b3f76..2bc2183add 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -325,7 +325,7 @@ NTSTATUS ntlmssp_update(NTLMSSP_STATE *ntlmssp_state,
"NTLMSSP",
&ntlmssp_command)) {
DEBUG(1, ("Failed to parse NTLMSSP packet, could not extract NTLMSSP command\n"));
- dump_data(2, (const char *)input.data, input.length);
+ dump_data(2, input.data, input.length);
return NT_STATUS_INVALID_PARAMETER;
}
}
@@ -531,7 +531,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
&neg_flags)) {
DEBUG(1, ("ntlmssp_server_negotiate: failed to parse NTLMSSP Negotiate of length %u\n",
(unsigned int)request.length));
- dump_data(2, (const char *)request.data, request.length);
+ dump_data(2, request.data, request.length);
return NT_STATUS_INVALID_PARAMETER;
}
debug_ntlmssp_flags(neg_flags);
@@ -695,7 +695,7 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
&user,
&workstation)) {
DEBUG(1, ("ntlmssp_server_auth: failed to parse NTLMSSP (tried both formats):\n"));
- dump_data(2, (const char *)request.data, request.length);
+ dump_data(2, request.data, request.length);
SAFE_FREE(domain);
SAFE_FREE(user);
SAFE_FREE(workstation);
@@ -1008,7 +1008,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state,
&server_domain_blob,
&chal_flags)) {
DEBUG(1, ("Failed to parse the NTLMSSP Challenge: (#1)\n"));
- dump_data(2, (const char *)reply.data, reply.length);
+ dump_data(2, reply.data, reply.length);
return NT_STATUS_INVALID_PARAMETER;
}
@@ -1049,7 +1049,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state,
&unkn1, &unkn2,
&struct_blob)) {
DEBUG(1, ("Failed to parse the NTLMSSP Challenge: (#2)\n"));
- dump_data(2, (const char *)reply.data, reply.length);
+ dump_data(2, reply.data, reply.length);
return NT_STATUS_INVALID_PARAMETER;
}
@@ -1111,7 +1111,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state,
DEBUG(5, ("NTLMSSP challenge set by NTLM2\n"));
DEBUG(5, ("challenge is: \n"));
- dump_data(5, (const char *)session_nonce_hash, 8);
+ dump_data(5, session_nonce_hash, 8);
nt_response = data_blob_talloc(ntlmssp_state->mem_ctx, NULL, 24);
SMBNTencrypt_hash(ntlmssp_state->nt_hash,
diff --git a/source3/libsmb/ntlmssp_sign.c b/source3/libsmb/ntlmssp_sign.c
index 5642be42a3..a30535e2de 100644
--- a/source3/libsmb/ntlmssp_sign.c
+++ b/source3/libsmb/ntlmssp_sign.c
@@ -196,10 +196,10 @@ NTSTATUS ntlmssp_check_packet(NTLMSSP_STATE *ntlmssp_state,
if (local_sig.length != sig->length ||
memcmp(local_sig.data, sig->data, sig->length) != 0) {
DEBUG(5, ("BAD SIG NTLM2: wanted signature of\n"));
- dump_data(5, (const char *)local_sig.data, local_sig.length);
+ dump_data(5, local_sig.data, local_sig.length);
DEBUG(5, ("BAD SIG: got signature of\n"));
- dump_data(5, (const char *)sig->data, sig->length);
+ dump_data(5, sig->data, sig->length);
DEBUG(0, ("NTLMSSP NTLM2 packet check failed due to invalid signature!\n"));
data_blob_free(&local_sig);
@@ -209,10 +209,10 @@ NTSTATUS ntlmssp_check_packet(NTLMSSP_STATE *ntlmssp_state,
if (local_sig.length != sig->length ||
memcmp(local_sig.data + 8, sig->data + 8, sig->length - 8) != 0) {
DEBUG(5, ("BAD SIG NTLM1: wanted signature of\n"));
- dump_data(5, (const char *)local_sig.data, local_sig.length);
+ dump_data(5, local_sig.data, local_sig.length);
DEBUG(5, ("BAD SIG: got signature of\n"));
- dump_data(5, (const char *)sig->data, sig->length);
+ dump_data(5, sig->data, sig->length);
DEBUG(0, ("NTLMSSP NTLM1 packet check failed due to invalid signature!\n"));
data_blob_free(&local_sig);
diff --git a/source3/libsmb/smb_signing.c b/source3/libsmb/smb_signing.c
index 0395208986..d3384ce365 100644
--- a/source3/libsmb/smb_signing.c
+++ b/source3/libsmb/smb_signing.c
@@ -347,7 +347,7 @@ static void client_sign_outgoing_message(char *outbuf, struct smb_sign_info *si)
data->send_seq_num, calc_md5_mac);
DEBUG(10, ("client_sign_outgoing_message: sent SMB signature of\n"));
- dump_data(10, (const char *)calc_md5_mac, 8);
+ dump_data(10, calc_md5_mac, 8);
memcpy(&outbuf[smb_ss_field], calc_md5_mac, 8);
@@ -408,10 +408,10 @@ static BOOL client_check_incoming_message(char *inbuf, struct smb_sign_info *si,
if (!good) {
DEBUG(5, ("client_check_incoming_message: BAD SIG: wanted SMB signature of\n"));
- dump_data(5, (const char *)calc_md5_mac, 8);
+ dump_data(5, calc_md5_mac, 8);
DEBUG(5, ("client_check_incoming_message: BAD SIG: got SMB signature of\n"));
- dump_data(5, (const char *)server_sent_mac, 8);
+ dump_data(5, server_sent_mac, 8);
#if 1 /* JRATEST */
{
int i;
@@ -428,7 +428,7 @@ We were expecting seq %u\n", reply_seq_number+i, reply_seq_number ));
} else {
DEBUG(10, ("client_check_incoming_message: seq %u: got good SMB signature of\n", (unsigned int)reply_seq_number));
- dump_data(10, (const char *)server_sent_mac, 8);
+ dump_data(10, server_sent_mac, 8);
}
return signing_good(inbuf, si, good, reply_seq_number, must_be_ok);
}
@@ -488,12 +488,12 @@ BOOL cli_simple_set_signing(struct cli_state *cli,
memcpy(&data->mac_key.data[0], user_session_key.data, user_session_key.length);
DEBUG(10, ("cli_simple_set_signing: user_session_key\n"));
- dump_data(10, (const char *)user_session_key.data, user_session_key.length);
+ dump_data(10, user_session_key.data, user_session_key.length);
if (response.length) {
memcpy(&data->mac_key.data[user_session_key.length],response.data, response.length);
DEBUG(10, ("cli_simple_set_signing: response_data\n"));
- dump_data(10, (const char *)response.data, response.length);
+ dump_data(10, response.data, response.length);
} else {
DEBUG(10, ("cli_simple_set_signing: NULL response_data\n"));
}
@@ -691,7 +691,7 @@ static void srv_sign_outgoing_message(char *outbuf, struct smb_sign_info *si)
simple_packet_signature(data, (const unsigned char *)outbuf, send_seq_number, calc_md5_mac);
DEBUG(10, ("srv_sign_outgoing_message: seq %u: sent SMB signature of\n", (unsigned int)send_seq_number));
- dump_data(10, (const char *)calc_md5_mac, 8);
+ dump_data(10, calc_md5_mac, 8);
memcpy(&outbuf[smb_ss_field], calc_md5_mac, 8);
@@ -735,11 +735,11 @@ static BOOL srv_check_incoming_message(char *inbuf, struct smb_sign_info *si, BO
if (saved_seq) {
DEBUG(0, ("srv_check_incoming_message: BAD SIG: seq %u wanted SMB signature of\n",
(unsigned int)saved_seq));
- dump_data(5, (const char *)calc_md5_mac, 8);
+ dump_data(5, calc_md5_mac, 8);
DEBUG(0, ("srv_check_incoming_message: BAD SIG: seq %u got SMB signature of\n",
(unsigned int)reply_seq_number));
- dump_data(5, (const char *)server_sent_mac, 8);
+ dump_data(5, server_sent_mac, 8);
}
#if 1 /* JRATEST */
@@ -759,7 +759,7 @@ We were expecting seq %u\n", reply_seq_number, saved_seq ));
} else {
DEBUG(10, ("srv_check_incoming_message: seq %u: (current is %u) got good SMB signature of\n", (unsigned int)reply_seq_number, (unsigned int)data->send_seq_num));
- dump_data(10, (const char *)server_sent_mac, 8);
+ dump_data(10, server_sent_mac, 8);
}
return (signing_good(inbuf, si, good, saved_seq, must_be_ok));
diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c
index 5f7b5b1809..ad833374f3 100644
--- a/source3/libsmb/smbencrypt.c
+++ b/source3/libsmb/smbencrypt.c
@@ -36,9 +36,9 @@ void SMBencrypt_hash(const uchar lm_hash[16], const uchar *c8, uchar p24[24])
#ifdef DEBUG_PASSWORD
DEBUG(100,("SMBencrypt_hash: lm#, challenge, response\n"));
- dump_data(100, (const char *)p21, 16);
- dump_data(100, (const char *)c8, 8);
- dump_data(100, (const char *)p24, 24);
+ dump_data(100, p21, 16);
+ dump_data(100, c8, 8);
+ dump_data(100, p24, 24);
#endif
}
@@ -146,16 +146,16 @@ void nt_lm_owf_gen(const char *pwd, uchar nt_p16[16], uchar p16[16])
#ifdef DEBUG_PASSWORD
DEBUG(100,("nt_lm_owf_gen: pwd, nt#\n"));
- dump_data(120, pwd, strlen(pwd));
- dump_data(100, (char *)nt_p16, 16);
+ dump_data(120, (uint8 *)pwd, strlen(pwd));
+ dump_data(100, nt_p16, 16);
#endif
E_deshash(pwd, (uchar *)p16);
#ifdef DEBUG_PASSWORD
DEBUG(100,("nt_lm_owf_gen: pwd, lm#\n"));
- dump_data(120, pwd, strlen(pwd));
- dump_data(100, (char *)p16, 16);
+ dump_data(120, (uint8 *)pwd, strlen(pwd));
+ dump_data(100, p16, 16);
#endif
}
@@ -204,10 +204,10 @@ BOOL ntv2_owf_gen(const uchar owf[16],
#ifdef DEBUG_PASSWORD
DEBUG(100, ("ntv2_owf_gen: user, domain, owfkey, kr\n"));
- dump_data(100, (const char *)user, user_byte_len);
- dump_data(100, (const char *)domain, domain_byte_len);
- dump_data(100, (const char *)owf, 16);
- dump_data(100, (const char *)kr_buf, 16);
+ dump_data(100, (uint8 *)user, user_byte_len);
+ dump_data(100, (uint8 *)domain, domain_byte_len);
+ dump_data(100, (uint8 *)owf, 16);
+ dump_data(100, (uint8 *)kr_buf, 16);
#endif
SAFE_FREE(user);
@@ -238,9 +238,9 @@ void NTLMSSPOWFencrypt(const uchar passwd[8], const uchar *ntlmchalresp, uchar p
E_P24(p21, ntlmchalresp, p24);
#ifdef DEBUG_PASSWORD
DEBUG(100,("NTLMSSPOWFencrypt: p21, c8, p24\n"));
- dump_data(100, (char *)p21, 21);
- dump_data(100, (const char *)ntlmchalresp, 8);
- dump_data(100, (char *)p24, 24);
+ dump_data(100, p21, 21);
+ dump_data(100, ntlmchalresp, 8);
+ dump_data(100, p24, 24);
#endif
}
@@ -257,9 +257,9 @@ void SMBNTencrypt_hash(const uchar nt_hash[16], uchar *c8, uchar *p24)
#ifdef DEBUG_PASSWORD
DEBUG(100,("SMBNTencrypt: nt#, challenge, response\n"));
- dump_data(100, (char *)p21, 16);
- dump_data(100, (char *)c8, 8);
- dump_data(100, (char *)p24, 24);
+ dump_data(100, p21, 16);
+ dump_data(100, c8, 8);
+ dump_data(100, p24, 24);
#endif
}
@@ -287,9 +287,9 @@ void SMBOWFencrypt_ntv2(const uchar kr[16],
#ifdef DEBUG_PASSWORD
DEBUG(100, ("SMBOWFencrypt_ntv2: srv_chal, cli_chal, resp_buf\n"));
- dump_data(100, (const char *)srv_chal->data, srv_chal->length);
- dump_data(100, (const char *)cli_chal->data, cli_chal->length);
- dump_data(100, (const char *)resp_buf, 16);
+ dump_data(100, srv_chal->data, srv_chal->length);
+ dump_data(100, cli_chal->data, cli_chal->length);
+ dump_data(100, resp_buf, 16);
#endif
}
@@ -306,7 +306,7 @@ void SMBsesskeygen_ntv2(const uchar kr[16],
#ifdef DEBUG_PASSWORD
DEBUG(100, ("SMBsesskeygen_ntv2:\n"));
- dump_data(100, (const char *)sess_key, 16);
+ dump_data(100, sess_key, 16);
#endif
}
@@ -320,7 +320,7 @@ void SMBsesskeygen_ntv1(const uchar kr[16],
#ifdef DEBUG_PASSWORD
DEBUG(100, ("SMBsesskeygen_ntv1:\n"));
- dump_data(100, (const char *)sess_key, 16);
+ dump_data(100, sess_key, 16);
#endif
}
@@ -340,7 +340,7 @@ void SMBsesskeygen_lm_sess_key(const uchar lm_hash[16],
#ifdef DEBUG_PASSWORD
DEBUG(100, ("SMBsesskeygen_lmv1_jerry:\n"));
- dump_data(100, (const char *)sess_key, 16);
+ dump_data(100, sess_key, 16);
#endif
}
@@ -544,7 +544,7 @@ BOOL decode_pw_buffer(uint8 in_buffer[516], char *new_pwrd,
byte_len = IVAL(in_buffer, 512);
#ifdef DEBUG_PASSWORD
- dump_data(100, (const char *)in_buffer, 516);
+ dump_data(100, in_buffer, 516);
#endif
/* Password cannot be longer than the size of the password buffer */
@@ -560,7 +560,7 @@ BOOL decode_pw_buffer(uint8 in_buffer[516], char *new_pwrd,
#ifdef DEBUG_PASSWORD
DEBUG(100,("decode_pw_buffer: new_pwrd: "));
- dump_data(100, (const char *)new_pwrd, *new_pw_len);
+ dump_data(100, (uint8 *)new_pwrd, *new_pw_len);
DEBUG(100,("multibyte len:%d\n", *new_pw_len));
DEBUG(100,("original char len:%d\n", byte_len/2));
#endif