summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-03-28 13:34:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:59 -0500
commit56ba44766854ed7cda265bdaf85913f2a1008282 (patch)
treeab942a31d2bca6bd228fae1c996e5d498bb0cf7e
parent9bb40d7c6158090712d774e98654d80c888ca4f3 (diff)
downloadsamba-56ba44766854ed7cda265bdaf85913f2a1008282.tar.gz
samba-56ba44766854ed7cda265bdaf85913f2a1008282.tar.bz2
samba-56ba44766854ed7cda265bdaf85913f2a1008282.zip
r22001: change prototype of dump_data(), so that it takes unsigned char * now,
which matches what samba4 has. also fix all the callers to prevent compiler warnings metze (This used to be commit fa322f0cc9c26a9537ba3f0a7d4e4a25941317e7)
-rw-r--r--source3/auth/auth.c8
-rw-r--r--source3/auth/auth_ntlmssp.c2
-rw-r--r--source3/auth/auth_util.c4
-rw-r--r--source3/client/clitar.c2
-rw-r--r--source3/lib/util.c7
-rw-r--r--source3/librpc/ndr/ndr_basic.c2
-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
-rw-r--r--source3/nmbd/nmbd_processlogon.c6
-rw-r--r--source3/nsswitch/winbindd_cache.c12
-rw-r--r--source3/nsswitch/winbindd_creds.c2
-rw-r--r--source3/nsswitch/winbindd_pam.c6
-rw-r--r--source3/passdb/pdb_smbpasswd.c2
-rw-r--r--source3/registry/reg_eventlog.c4
-rw-r--r--source3/rpc_client/cli_pipe.c10
-rw-r--r--source3/rpc_parse/parse_net.c8
-rw-r--r--source3/rpc_parse/parse_prs.c16
-rw-r--r--source3/rpc_parse/parse_samr.c14
-rw-r--r--source3/rpc_server/srv_lsa_hnd.c6
-rw-r--r--source3/rpc_server/srv_netlog_nt.c2
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c2
-rw-r--r--source3/rpc_server/srv_samr_nt.c12
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c2
-rw-r--r--source3/smbd/chgpasswd.c4
-rw-r--r--source3/smbd/msdfs.c6
-rw-r--r--source3/smbd/nttrans.c2
-rw-r--r--source3/smbd/trans2.c4
-rw-r--r--source3/torture/cmd_vfs.c2
-rw-r--r--source3/torture/torture.c6
-rw-r--r--source3/utils/ntlm_auth.c6
-rw-r--r--source3/utils/ntlm_auth_diagnostics.c26
35 files changed, 147 insertions, 148 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index dd5481767b..91a5ac2ff1 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -136,7 +136,7 @@ static const uint8 *get_ntlm_challenge(struct auth_context *auth_context)
DEBUG(5, ("auth_context challenge created by %s\n", challenge_set_by));
DEBUG(5, ("challenge is: \n"));
- dump_data(5, (const char *)auth_context->challenge.data, auth_context->challenge.length);
+ dump_data(5, auth_context->challenge.data, auth_context->challenge.length);
SMB_ASSERT(auth_context->challenge.length == 8);
@@ -233,15 +233,15 @@ static NTSTATUS check_ntlm_password(const struct auth_context *auth_context,
auth_context->challenge_set_by));
DEBUG(10, ("challenge is: \n"));
- dump_data(5, (const char *)auth_context->challenge.data, auth_context->challenge.length);
+ dump_data(5, auth_context->challenge.data, auth_context->challenge.length);
#ifdef DEBUG_PASSWORD
DEBUG(100, ("user_info has passwords of length %d and %d\n",
(int)user_info->lm_resp.length, (int)user_info->nt_resp.length));
DEBUG(100, ("lm:\n"));
- dump_data(100, (const char *)user_info->lm_resp.data, user_info->lm_resp.length);
+ dump_data(100, user_info->lm_resp.data, user_info->lm_resp.length);
DEBUG(100, ("nt:\n"));
- dump_data(100, (const char *)user_info->nt_resp.data, user_info->nt_resp.length);
+ dump_data(100, user_info->nt_resp.data, user_info->nt_resp.length);
#endif
/* This needs to be sorted: If it doesn't match, what should we do? */
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index 51b145a760..08e88cc21a 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -68,7 +68,7 @@ static NTSTATUS auth_ntlmssp_set_challenge(struct ntlmssp_state *ntlmssp_state,
DEBUG(5, ("auth_context challenge set by %s\n", auth_context->challenge_set_by));
DEBUG(5, ("challenge is: \n"));
- dump_data(5, (const char *)auth_context->challenge.data, auth_context->challenge.length);
+ dump_data(5, auth_context->challenge.data, auth_context->challenge.length);
return NT_STATUS_OK;
}
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 0afcabcf07..82567473b5 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -258,7 +258,7 @@ BOOL make_user_info_netlogon_interactive(auth_usersupplied_info **user_info,
#ifdef DEBUG_PASSWORD
DEBUG(100,("key:"));
- dump_data(100, (char *)key, sizeof(key));
+ dump_data(100, key, sizeof(key));
DEBUG(100,("lm owf password:"));
dump_data(100, lm_pwd, sizeof(lm_pwd));
@@ -368,7 +368,7 @@ BOOL make_user_info_for_reply(auth_usersupplied_info **user_info,
#ifdef DEBUG_PASSWORD
DEBUG(10,("Unencrypted password (len %d):\n",
(int)plaintext_password.length));
- dump_data(100, (const char *)plaintext_password.data,
+ dump_data(100, plaintext_password.data,
plaintext_password.length);
#endif
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 7bbb9fc58b..3d925858a0 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -264,7 +264,7 @@ static long readtarheader(union hblock *hb, file_info2 *finfo, char *prefix)
if (fchk != chk) {
DEBUG(0, ("checksums don't match %ld %ld\n", fchk, chk));
- dump_data(5, (char *)hb - TBLOCK, TBLOCK *3);
+ dump_data(5, (uint8 *)hb - TBLOCK, TBLOCK *3);
return -1;
}
diff --git a/source3/lib/util.c b/source3/lib/util.c
index e9c2d37227..964b3813ed 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -513,7 +513,7 @@ void show_msg(char *buf)
if (DEBUGLEVEL < 50)
bcc = MIN(bcc, 512);
- dump_data(10, smb_buf(buf), bcc);
+ dump_data(10, (uint8 *)smb_buf(buf), bcc);
}
/*******************************************************************
@@ -2253,9 +2253,8 @@ void print_asc(int level, const unsigned char *buf,int len)
DEBUG(level,("%c", isprint(buf[i])?buf[i]:'.'));
}
-void dump_data(int level, const char *buf1,int len)
+void dump_data(int level, const unsigned char *buf,int len)
{
- const unsigned char *buf = (const unsigned char *)buf1;
int i=0;
if (len<=0) return;
@@ -2292,7 +2291,7 @@ void dump_data_pw(const char *msg, const uchar * data, size_t len)
DEBUG(11, ("%s", msg));
if (data != NULL && len > 0)
{
- dump_data(11, (const char *)data, len);
+ dump_data(11, data, len);
}
#endif
}
diff --git a/source3/librpc/ndr/ndr_basic.c b/source3/librpc/ndr/ndr_basic.c
index 7fc290e595..913dfc7e65 100644
--- a/source3/librpc/ndr/ndr_basic.c
+++ b/source3/librpc/ndr/ndr_basic.c
@@ -741,7 +741,7 @@ void ndr_print_DATA_BLOB(struct ndr_print *ndr, const char *name, DATA_BLOB r)
{
ndr->print(ndr, "%-25s: DATA_BLOB length=%u", name, r.length);
if (r.length) {
- dump_data(10, (const char *)r.data, r.length);
+ dump_data(10, r.data, r.length);
}
}
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
diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c
index 4a8d1db51d..232f430b66 100644
--- a/source3/nmbd/nmbd_processlogon.c
+++ b/source3/nmbd/nmbd_processlogon.c
@@ -141,7 +141,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) ));
SSVAL(q, 0, token);
q += 2;
- dump_data(4, outbuf, PTR_DIFF(q, outbuf));
+ dump_data(4, (uint8 *)outbuf, PTR_DIFF(q, outbuf));
send_mailslot(True, getdc_str,
outbuf,PTR_DIFF(q,outbuf),
@@ -257,7 +257,7 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
QUERYFORPDC_R, (uint32)ntversion, (uint32)lmnttoken,
(uint32)lm20token ));
- dump_data(4, outbuf, PTR_DIFF(q, outbuf));
+ dump_data(4, (uint8 *)outbuf, PTR_DIFF(q, outbuf));
pull_ascii_fstring(getdc_str, getdc);
pull_ascii_nstring(source_name, sizeof(source_name), dgram->source_name.name);
@@ -501,7 +501,7 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
SSVAL(q, 6, 0xffff); /* our lm20token */
q += 8;
- dump_data(4, outbuf, PTR_DIFF(q, outbuf));
+ dump_data(4, (uint8 *)outbuf, PTR_DIFF(q, outbuf));
pull_ascii_fstring(getdc_str, getdc);
pull_ascii_nstring(source_name, sizeof(source_name), dgram->source_name.name);
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index 739ff7bdde..c09db4d20c 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -967,9 +967,9 @@ NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
}
#if DEBUG_PASSWORD
- dump_data(100, (const char *)*cached_nt_pass, NT_HASH_LEN);
+ dump_data(100, *cached_nt_pass, NT_HASH_LEN);
if (*cached_salt) {
- dump_data(100, (const char *)*cached_salt, NT_HASH_LEN);
+ dump_data(100, *cached_salt, NT_HASH_LEN);
}
#endif
status = centry->status;
@@ -1008,7 +1008,7 @@ NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
}
#if DEBUG_PASSWORD
- dump_data(100, (const char *)nt_pass, NT_HASH_LEN);
+ dump_data(100, nt_pass, NT_HASH_LEN);
#endif
centry_put_time(centry, time(NULL));
@@ -2226,7 +2226,7 @@ BOOL cache_retrieve_response(pid_t pid, struct winbindd_response * response)
return False;
}
- dump_data(11, data.dptr, data.dsize);
+ dump_data(11, (uint8 *)data.dptr, data.dsize);
response->extra_data.data = data.dptr;
return True;
@@ -2723,9 +2723,9 @@ static int cache_traverse_validate_fn(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_D
}
DEBUG(0,("cache_traverse_validate_fn: unknown cache entry\nkey :\n"));
- dump_data(0, kbuf.dptr, kbuf.dsize);
+ dump_data(0, (uint8 *)kbuf.dptr, kbuf.dsize);
DEBUG(0,("data :\n"));
- dump_data(0, dbuf.dptr, dbuf.dsize);
+ dump_data(0, (uint8 *)dbuf.dptr, dbuf.dsize);
return 1; /* terminate. */
}
diff --git a/source3/nsswitch/winbindd_creds.c b/source3/nsswitch/winbindd_creds.c
index f11b80909b..920527810a 100644
--- a/source3/nsswitch/winbindd_creds.c
+++ b/source3/nsswitch/winbindd_creds.c
@@ -119,7 +119,7 @@ NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
E_md4hash(pass, nt_pass);
#if DEBUG_PASSWORD
- dump_data(100, (const char *)nt_pass, NT_HASH_LEN);
+ dump_data(100, nt_pass, NT_HASH_LEN);
#endif
status = wcache_save_creds(domain, mem_ctx, &cred_sid, nt_pass);
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c
index 6ee548292c..59bff901ce 100644
--- a/source3/nsswitch/winbindd_pam.c
+++ b/source3/nsswitch/winbindd_pam.c
@@ -831,10 +831,10 @@ NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
E_md4hash(state->request.data.auth.pass, new_nt_pass);
#if DEBUG_PASSWORD
- dump_data(100, (const char *)new_nt_pass, NT_HASH_LEN);
- dump_data(100, (const char *)cached_nt_pass, NT_HASH_LEN);
+ dump_data(100, new_nt_pass, NT_HASH_LEN);
+ dump_data(100, cached_nt_pass, NT_HASH_LEN);
if (cached_salt) {
- dump_data(100, (const char *)cached_salt, NT_HASH_LEN);
+ dump_data(100, cached_salt, NT_HASH_LEN);
}
#endif
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index e01b4b1855..18ca74b273 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -1023,7 +1023,7 @@ This is no longer supported.!\n", pwd->smb_name));
#ifdef DEBUG_PASSWORD
DEBUG(100,("mod_smbfilepwd_entry: "));
- dump_data(100, ascii_p16, wr_len);
+ dump_data(100, (uint8 *)ascii_p16, wr_len);
#endif
if(wr_len > sizeof(linebuf)) {
diff --git a/source3/registry/reg_eventlog.c b/source3/registry/reg_eventlog.c
index 90d9a24437..d0da12637a 100644
--- a/source3/registry/reg_eventlog.c
+++ b/source3/registry/reg_eventlog.c
@@ -237,7 +237,7 @@ BOOL eventlog_add_source( const char *eventlog, const char *sourcename,
already_in = False;
wrklist = NULL;
- dump_data( 1, (const char *)rval->data_p, rval->size );
+ dump_data( 1, rval->data_p, rval->size );
if ( ( numsources =
regval_convert_multi_sz( ( uint16 * ) rval->data_p, rval->size,
&wrklist ) ) > 0 ) {
@@ -280,7 +280,7 @@ BOOL eventlog_add_source( const char *eventlog, const char *sourcename,
*( wp + numsources ) = ( char * ) sourcename;
*( wp + numsources + 1 ) = NULL;
mbytes = regval_build_multi_sz( wp, &msz_wp );
- dump_data( 1, ( char * ) msz_wp, mbytes );
+ dump_data( 1, ( uint8 * ) msz_wp, mbytes );
regval_ctr_addvalue( values, "Sources", REG_MULTI_SZ,
( char * ) msz_wp, mbytes );
regdb_store_values( evtlogpath, values );
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 61f5ee51bd..c7c1b7fe69 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -953,7 +953,7 @@ static NTSTATUS create_krb5_auth_bind_req( struct rpc_pipe_client *cli,
}
DEBUG(5, ("create_krb5_auth_bind_req: Created krb5 GSS blob :\n"));
- dump_data(5, (const char *)tkt_wrapped.data, tkt_wrapped.length);
+ dump_data(5, tkt_wrapped.data, tkt_wrapped.length);
data_blob_free(&tkt_wrapped);
return NT_STATUS_OK;
@@ -1003,7 +1003,7 @@ static NTSTATUS create_spnego_ntlmssp_auth_rpc_bind_req( struct rpc_pipe_client
}
DEBUG(5, ("create_spnego_ntlmssp_auth_rpc_bind_req: NTLMSSP Negotiate:\n"));
- dump_data(5, (const char *)spnego_msg.data, spnego_msg.length);
+ dump_data(5, spnego_msg.data, spnego_msg.length);
data_blob_free(&spnego_msg);
return NT_STATUS_OK;
@@ -1044,7 +1044,7 @@ static NTSTATUS create_ntlmssp_auth_rpc_bind_req( struct rpc_pipe_client *cli,
}
DEBUG(5, ("create_ntlmssp_auth_rpc_bind_req: NTLMSSP Negotiate:\n"));
- dump_data(5, (const char *)request.data, request.length);
+ dump_data(5, request.data, request.length);
data_blob_free(&request);
return NT_STATUS_OK;
@@ -1645,10 +1645,10 @@ static BOOL valid_pipe_name(const int pipe_idx, RPC_IFACE *abstract, RPC_IFACE *
}
DEBUG(5,("Bind Abstract Syntax: "));
- dump_data(5, (char*)&pipe_names[pipe_idx].abstr_syntax,
+ dump_data(5, (uint8 *)&pipe_names[pipe_idx].abstr_syntax,
sizeof(pipe_names[pipe_idx].abstr_syntax));
DEBUG(5,("Bind Transfer Syntax: "));
- dump_data(5, (char*)&pipe_names[pipe_idx].trans_syntax,
+ dump_data(5, (uint8 *)&pipe_names[pipe_idx].trans_syntax,
sizeof(pipe_names[pipe_idx].trans_syntax));
/* copy the required syntaxes out so we can do the right bind */
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index a620781a2f..3eb31ad55f 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -1150,10 +1150,10 @@ void init_id_info1(NET_ID_INFO_1 *id, const char *domain_name,
unsigned char key[16];
#ifdef DEBUG_PASSWORD
DEBUG(100,("lm cypher:"));
- dump_data(100, (char *)lm_cypher, 16);
+ dump_data(100, lm_cypher, 16);
DEBUG(100,("nt cypher:"));
- dump_data(100, (char *)nt_cypher, 16);
+ dump_data(100, nt_cypher, 16);
#endif
memset(key, 0, 16);
@@ -1166,10 +1166,10 @@ void init_id_info1(NET_ID_INFO_1 *id, const char *domain_name,
#ifdef DEBUG_PASSWORD
DEBUG(100,("encrypt of lm owf password:"));
- dump_data(100, (char *)lm_owf, 16);
+ dump_data(100, lm_owf, 16);
DEBUG(100,("encrypt of nt owf password:"));
- dump_data(100, (char *)nt_owf, 16);
+ dump_data(100, nt_owf, 16);
#endif
/* set up pointers to cypher blocks */
lm_cypher = lm_owf;
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index ca46807932..0fb429b591 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -1332,7 +1332,7 @@ BOOL prs_string(const char *name, prs_struct *ps, int depth, char *str, int max_
ps->data_offset += len+1;
- dump_data(5+depth, q, len);
+ dump_data(5+depth, (uint8 *)q, len);
return True;
}
@@ -1503,13 +1503,13 @@ BOOL prs_hash1(prs_struct *ps, uint32 offset, int len)
#ifdef DEBUG_PASSWORD
DEBUG(100, ("prs_hash1\n"));
- dump_data(100, ps->sess_key, 16);
- dump_data(100, q, len);
+ dump_data(100, (uint8 *)ps->sess_key, 16);
+ dump_data(100, (uint8 *)q, len);
#endif
SamOEMhash((uchar *) q, (const unsigned char *)ps->sess_key, len);
#ifdef DEBUG_PASSWORD
- dump_data(100, q, len);
+ dump_data(100, (uint8 *)q, len);
#endif
return True;
@@ -1754,9 +1754,9 @@ BOOL schannel_decode(struct schannel_auth_struct *a, enum pipe_auth_level auth_l
checksum after the decode, below
*/
DEBUG(2, ("schannel_decode: FAILED: packet sequence number:\n"));
- dump_data(2, (const char*)verf->seq_num, sizeof(verf->seq_num));
+ dump_data(2, (const uint8 *)verf->seq_num, sizeof(verf->seq_num));
DEBUG(2, ("should be:\n"));
- dump_data(2, (const char*)seq_num, sizeof(seq_num));
+ dump_data(2, (const uint8 *)seq_num, sizeof(seq_num));
return False;
}
@@ -1764,9 +1764,9 @@ BOOL schannel_decode(struct schannel_auth_struct *a, enum pipe_auth_level auth_l
if (memcmp(verf->sig, schannel_sig, sizeof(verf->sig))) {
/* Validate that the other end sent the expected header */
DEBUG(2, ("schannel_decode: FAILED: packet header:\n"));
- dump_data(2, (const char*)verf->sig, sizeof(verf->sig));
+ dump_data(2, (const uint8 *)verf->sig, sizeof(verf->sig));
DEBUG(2, ("should be:\n"));
- dump_data(2, (const char*)schannel_sig, sizeof(schannel_sig));
+ dump_data(2, (const uint8 *)schannel_sig, sizeof(schannel_sig));
return False;
}
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index e0f5f7f294..18d1a66e71 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -6661,13 +6661,13 @@ static void init_samr_userinfo_ctr(SAM_USERINFO_CTR * ctr, DATA_BLOB *sess_key,
switch (switch_value) {
case 0x18:
SamOEMhashBlob(ctr->info.id24->pass, 516, sess_key);
- dump_data(100, (char *)sess_key->data, sess_key->length);
- dump_data(100, (char *)ctr->info.id24->pass, 516);
+ dump_data(100, sess_key->data, sess_key->length);
+ dump_data(100, ctr->info.id24->pass, 516);
break;
case 0x17:
SamOEMhashBlob(ctr->info.id23->pass, 516, sess_key);
- dump_data(100, (char *)sess_key->data, sess_key->length);
- dump_data(100, (char *)ctr->info.id23->pass, 516);
+ dump_data(100, sess_key->data, sess_key->length);
+ dump_data(100, ctr->info.id23->pass, 516);
break;
case 0x07:
break;
@@ -6970,9 +6970,9 @@ void init_samr_q_set_userinfo2(SAMR_Q_SET_USERINFO2 * q_u,
case 18:
SamOEMhashBlob(ctr->info.id18->lm_pwd, 16, sess_key);
SamOEMhashBlob(ctr->info.id18->nt_pwd, 16, sess_key);
- dump_data(100, (char *)sess_key->data, sess_key->length);
- dump_data(100, (char *)ctr->info.id18->lm_pwd, 16);
- dump_data(100, (char *)ctr->info.id18->nt_pwd, 16);
+ dump_data(100, sess_key->data, sess_key->length);
+ dump_data(100, ctr->info.id18->lm_pwd, 16);
+ dump_data(100, ctr->info.id18->nt_pwd, 16);
break;
}
}
diff --git a/source3/rpc_server/srv_lsa_hnd.c b/source3/rpc_server/srv_lsa_hnd.c
index 88c59ee895..a95415c9ce 100644
--- a/source3/rpc_server/srv_lsa_hnd.c
+++ b/source3/rpc_server/srv_lsa_hnd.c
@@ -146,7 +146,7 @@ BOOL create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *)
*hnd = pol->pol_hnd;
DEBUG(4,("Opened policy hnd[%d] ", (int)p->pipe_handles->count));
- dump_data(4, (char *)hnd, sizeof(*hnd));
+ dump_data(4, (uint8 *)hnd, sizeof(*hnd));
return True;
}
@@ -166,7 +166,7 @@ static struct policy *find_policy_by_hnd_internal(pipes_struct *p, POLICY_HND *h
for (i = 0, pol=p->pipe_handles->Policy;pol;pol=pol->next, i++) {
if (memcmp(&pol->pol_hnd, hnd, sizeof(*hnd)) == 0) {
DEBUG(4,("Found policy hnd[%d] ", (int)i));
- dump_data(4, (char *)hnd, sizeof(*hnd));
+ dump_data(4, (uint8 *)hnd, sizeof(*hnd));
if (data_p)
*data_p = pol->data_ptr;
return pol;
@@ -174,7 +174,7 @@ static struct policy *find_policy_by_hnd_internal(pipes_struct *p, POLICY_HND *h
}
DEBUG(4,("Policy not found: "));
- dump_data(4, (char *)hnd, sizeof(*hnd));
+ dump_data(4, (uint8 *)hnd, sizeof(*hnd));
p->bad_handle_fault_state = True;
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index b8c776964e..0c12cb3b7c 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -296,7 +296,7 @@ static NTSTATUS get_md4pw(char *md4pw, char *mach_acct, uint16 sec_chan_type)
}
memcpy(md4pw, pass, 16);
- dump_data(5, md4pw, 16);
+ dump_data(5, (uint8 *)md4pw, 16);
TALLOC_FREE(sampass);
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index 8aa5bb3e6d..d65696668e 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -937,7 +937,7 @@ ssize_t write_to_pipe(smb_np_struct *p, char *data, size_t n)
DEBUG(6,(" name: %s open: %s len: %d\n",
p->name, BOOLSTR(p->open), (int)n));
- dump_data(50, data, n);
+ dump_data(50, (uint8 *)data, n);
return p->namedpipe_write(p->np_state, data, n);
}
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index ca7185f527..c743e68530 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -3553,7 +3553,7 @@ NTSTATUS _samr_set_userinfo(pipes_struct *p, SAMR_Q_SET_USERINFO *q_u, SAMR_R_SE
}
SamOEMhashBlob(ctr->info.id24->pass, 516, &p->session_key);
- dump_data(100, (char *)ctr->info.id24->pass, 516);
+ dump_data(100, ctr->info.id24->pass, 516);
if (!set_user_info_pw(ctr->info.id24->pass, pwd))
r_u->status = NT_STATUS_ACCESS_DENIED;
@@ -3565,7 +3565,7 @@ NTSTATUS _samr_set_userinfo(pipes_struct *p, SAMR_Q_SET_USERINFO *q_u, SAMR_R_SE
}
encode_or_decode_arc4_passwd_buffer(ctr->info.id25->pass, &p->session_key);
- dump_data(100, (char *)ctr->info.id25->pass, 532);
+ dump_data(100, ctr->info.id25->pass, 532);
r_u->status = set_user_info_25(p->mem_ctx,
ctr->info.id25, pwd);
@@ -3582,7 +3582,7 @@ NTSTATUS _samr_set_userinfo(pipes_struct *p, SAMR_Q_SET_USERINFO *q_u, SAMR_R_SE
}
encode_or_decode_arc4_passwd_buffer(ctr->info.id26->pass, &p->session_key);
- dump_data(100, (char *)ctr->info.id26->pass, 516);
+ dump_data(100, ctr->info.id26->pass, 516);
if (!set_user_info_pw(ctr->info.id26->pass, pwd))
r_u->status = NT_STATUS_ACCESS_DENIED;
@@ -3594,7 +3594,7 @@ NTSTATUS _samr_set_userinfo(pipes_struct *p, SAMR_Q_SET_USERINFO *q_u, SAMR_R_SE
}
SamOEMhashBlob(ctr->info.id23->pass, 516, &p->session_key);
- dump_data(100, (char *)ctr->info.id23->pass, 516);
+ dump_data(100, ctr->info.id23->pass, 516);
r_u->status = set_user_info_23(p->mem_ctx,
ctr->info.id23, pwd);
@@ -3728,7 +3728,7 @@ NTSTATUS _samr_set_userinfo2(pipes_struct *p, SAMR_Q_SET_USERINFO2 *q_u, SAMR_R_
}
SamOEMhashBlob(ctr->info.id23->pass, 516, &p->session_key);
- dump_data(100, (char *)ctr->info.id23->pass, 516);
+ dump_data(100, ctr->info.id23->pass, 516);
r_u->status = set_user_info_23(p->mem_ctx,
ctr->info.id23, pwd);
@@ -3739,7 +3739,7 @@ NTSTATUS _samr_set_userinfo2(pipes_struct *p, SAMR_Q_SET_USERINFO2 *q_u, SAMR_R_
}
encode_or_decode_arc4_passwd_buffer(ctr->info.id26->pass, &p->session_key);
- dump_data(100, (char *)ctr->info.id26->pass, 516);
+ dump_data(100, ctr->info.id26->pass, 516);
if (!set_user_info_pw(ctr->info.id26->pass, pwd))
r_u->status = NT_STATUS_ACCESS_DENIED;
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 958e9d81fe..e06d613c74 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1097,7 +1097,7 @@ static BOOL notify2_unpack_msg( SPOOLSS_NOTIFY_MSG *msg, struct timeval *tv, voi
DEBUG(3, ("notify2_unpack_msg: value1 = %d, value2 = %d\n", msg->notify.value[0],
msg->notify.value[1]));
else
- dump_data(3, msg->notify.data, msg->len);
+ dump_data(3, (uint8 *)msg->notify.data, msg->len);
return True;
}
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c
index 7c6886b81c..8146d6d137 100644
--- a/source3/smbd/chgpasswd.c
+++ b/source3/smbd/chgpasswd.c
@@ -983,8 +983,8 @@ static BOOL check_passwd_history(struct samu *sampass, const char *plaintext)
return True;
}
- dump_data(100, (const char *)new_nt_p16, NT_HASH_LEN);
- dump_data(100, (const char *)pwhistory, PW_HISTORY_ENTRY_LEN*pwHisLen);
+ dump_data(100, new_nt_p16, NT_HASH_LEN);
+ dump_data(100, pwhistory, PW_HISTORY_ENTRY_LEN*pwHisLen);
memset(zero_md5_nt_pw, '\0', SALTED_MD5_HASH_LEN);
for (i=0; i<pwHisLen; i++) {
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 916f661eaa..397d43b8bb 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -717,7 +717,7 @@ static int setup_ver2_dfs_referral(const char *pathname,
STR_TERMINATE);
if (DEBUGLVL(10)) {
- dump_data(0, (const char *) uni_requestedpath,requestedpathlen);
+ dump_data(0, uni_requestedpath,requestedpathlen);
}
DEBUG(10,("ref count = %u\n",junction->referral_count));
@@ -817,7 +817,7 @@ static int setup_ver3_dfs_referral(const char *pathname,
reqpathlen = rpcstr_push(uni_reqpath, pathname, sizeof(pstring), STR_TERMINATE);
if (DEBUGLVL(10)) {
- dump_data(0, (char *) uni_reqpath,reqpathlen);
+ dump_data(0, uni_reqpath,reqpathlen);
}
uni_reqpathoffset1 = REFERRAL_HEADER_SIZE + VERSION3_REFERRAL_SIZE * junction->referral_count;
@@ -970,7 +970,7 @@ int setup_dfs_referral(connection_struct *orig_conn,
if (DEBUGLVL(10)) {
DEBUGADD(0,("DFS Referral pdata:\n"));
- dump_data(0,*ppdata,reply_size);
+ dump_data(0,(uint8 *)*ppdata,reply_size);
}
talloc_destroy(ctx);
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 0ecb14f9c7..51ed081edb 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -3044,7 +3044,7 @@ int reply_nttrans(connection_struct *conn,
}
memcpy( state->setup, &inbuf[smb_nt_SetupStart], state->setup_count);
- dump_data(10, (char *)state->setup, state->setup_count);
+ dump_data(10, (uint8 *)state->setup, state->setup_count);
}
if ((state->received_data == state->total_data) &&
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index df713db564..b06b53b299 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -147,7 +147,7 @@ static BOOL get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn, files_str
}
DEBUG(10,("get_ea_value: EA %s is of length %u: ", ea_name, (unsigned int)sizeret));
- dump_data(10, val, sizeret);
+ dump_data(10, (uint8 *)val, sizeret);
pea->flags = 0;
if (strnequal(ea_name, "user.", 5)) {
@@ -487,7 +487,7 @@ struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t da
}
DEBUG(10,("read_ea_list_entry: read ea name %s\n", eal->ea.name));
- dump_data(10, (const char *)eal->ea.value.data, eal->ea.value.length);
+ dump_data(10, eal->ea.value.data, eal->ea.value.length);
return eal;
}
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index 455ca1c82c..1005d14e79 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -88,7 +88,7 @@ static NTSTATUS cmd_show_data(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int ar
printf("show_data: error=-1 (not enough data in buffer)\n");
return NT_STATUS_UNSUCCESSFUL;
}
- dump_data(0, (char *)(vfs->data) + offset, len);
+ dump_data(0, (uint8 *)(vfs->data) + offset, len);
return NT_STATUS_OK;
}
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 925cac3f32..39495c6a3e 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -2616,7 +2616,7 @@ static BOOL new_trans(struct cli_state *pcli, int fnum, int level)
correct = False;
} else {
printf("qfileinfo: level %d, len = %u\n", level, len);
- dump_data(0, buf, len);
+ dump_data(0, (uint8 *)buf, len);
printf("\n");
}
SAFE_FREE(buf);
@@ -4538,7 +4538,7 @@ static BOOL run_eatest(int dummy)
for (i = 0; i < num_eas; i++) {
printf("%d: ea_name = %s. Val = ", i, ea_list[i].name);
- dump_data(0, (char *)ea_list[i].value.data,
+ dump_data(0, ea_list[i].value.data,
ea_list[i].value.length);
}
@@ -4567,7 +4567,7 @@ static BOOL run_eatest(int dummy)
printf("num_eas = %d\n", (int)num_eas);
for (i = 0; i < num_eas; i++) {
printf("%d: ea_name = %s. Val = ", i, ea_list[i].name);
- dump_data(0, (char *)ea_list[i].value.data,
+ dump_data(0, ea_list[i].value.data,
ea_list[i].value.length);
}
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 1f0a915574..2bdbdc0422 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -761,7 +761,7 @@ static void manage_squid_ntlmssp_request(enum stdio_helper_mode stdio_helper_mod
}
DEBUG(10, ("got NTLMSSP packet:\n"));
- dump_data(10, (const char *)request.data, request.length);
+ dump_data(10, request.data, request.length);
nt_status = ntlmssp_update(ntlmssp_state, request, &reply);
@@ -914,7 +914,7 @@ static void manage_client_ntlmssp_request(enum stdio_helper_mode stdio_helper_mo
}
DEBUG(10, ("got NTLMSSP packet:\n"));
- dump_data(10, (const char *)request.data, request.length);
+ dump_data(10, request.data, request.length);
if (use_cached_creds && !opt_password && !first) {
nt_status = do_ccache_ntlm_auth(initial_message, request, &reply);
@@ -1135,7 +1135,7 @@ static void manage_gss_spnego_request(enum stdio_helper_mode stdio_helper_mode,
}
DEBUG(10, ("got NTLMSSP packet:\n"));
- dump_data(10, (const char *)request.negTokenInit.mechToken.data,
+ dump_data(10, request.negTokenInit.mechToken.data,
request.negTokenInit.mechToken.length);
response.type = SPNEGO_NEG_TOKEN_TARG;
diff --git a/source3/utils/ntlm_auth_diagnostics.c b/source3/utils/ntlm_auth_diagnostics.c
index 6f829de1dd..0ebe77b0d1 100644
--- a/source3/utils/ntlm_auth_diagnostics.c
+++ b/source3/utils/ntlm_auth_diagnostics.c
@@ -116,9 +116,9 @@ static BOOL test_lm_ntlm_broken(enum ntlm_break break_which)
sizeof(lm_key)) != 0) {
DEBUG(1, ("LM Key does not match expectations!\n"));
DEBUG(1, ("lm_key:\n"));
- dump_data(1, (const char *)lm_key, 8);
+ dump_data(1, lm_key, 8);
DEBUG(1, ("expected:\n"));
- dump_data(1, (const char *)lm_hash, 8);
+ dump_data(1, lm_hash, 8);
pass = False;
}
@@ -127,9 +127,9 @@ static BOOL test_lm_ntlm_broken(enum ntlm_break break_which)
8) != 0) {
DEBUG(1, ("NT Session Key does not match expectations (should be LM hash)!\n"));
DEBUG(1, ("user_session_key:\n"));
- dump_data(1, (const char *)user_session_key, sizeof(user_session_key));
+ dump_data(1, user_session_key, sizeof(user_session_key));
DEBUG(1, ("expected:\n"));
- dump_data(1, (const char *)lm_hash, sizeof(lm_hash));
+ dump_data(1, lm_hash, sizeof(lm_hash));
pass = False;
}
} else {
@@ -137,9 +137,9 @@ static BOOL test_lm_ntlm_broken(enum ntlm_break break_which)
sizeof(user_session_key)) != 0) {
DEBUG(1, ("NT Session Key does not match expectations!\n"));
DEBUG(1, ("user_session_key:\n"));
- dump_data(1, (const char *)user_session_key, 16);
+ dump_data(1, user_session_key, 16);
DEBUG(1, ("expected:\n"));
- dump_data(1, (const char *)session_key.data, session_key.length);
+ dump_data(1, session_key.data, session_key.length);
pass = False;
}
}
@@ -215,17 +215,17 @@ static BOOL test_ntlm_in_lm(void)
sizeof(lm_key)) != 0) {
DEBUG(1, ("LM Key does not match expectations!\n"));
DEBUG(1, ("lm_key:\n"));
- dump_data(1, (const char *)lm_key, 8);
+ dump_data(1, lm_key, 8);
DEBUG(1, ("expected:\n"));
- dump_data(1, (const char *)lm_hash, 8);
+ dump_data(1, lm_hash, 8);
pass = False;
}
if (memcmp(lm_hash, user_session_key, 8) != 0) {
DEBUG(1, ("Session Key (first 8 lm hash) does not match expectations!\n"));
DEBUG(1, ("user_session_key:\n"));
- dump_data(1, (const char *)user_session_key, 16);
+ dump_data(1, user_session_key, 16);
DEBUG(1, ("expected:\n"));
- dump_data(1, (const char *)lm_hash, 8);
+ dump_data(1, lm_hash, 8);
pass = False;
}
return pass;
@@ -297,7 +297,7 @@ static BOOL test_ntlm_in_both(void)
DEBUG(1, ("user_session_key:\n"));
dump_data(1, user_session_key, 16);
DEBUG(1, ("expected:\n"));
- dump_data(1, (const char *)session_key.data, session_key.length);
+ dump_data(1, session_key.data, session_key.length);
pass = False;
}
@@ -378,9 +378,9 @@ static BOOL test_lmv2_ntlmv2_broken(enum ntlm_break break_which)
sizeof(user_session_key)) != 0) {
DEBUG(1, ("USER (NTLMv2) Session Key does not match expectations!\n"));
DEBUG(1, ("user_session_key:\n"));
- dump_data(1, (const char *)user_session_key, 16);
+ dump_data(1, user_session_key, 16);
DEBUG(1, ("expected:\n"));
- dump_data(1, (const char *)ntlmv2_session_key.data, ntlmv2_session_key.length);
+ dump_data(1, ntlmv2_session_key.data, ntlmv2_session_key.length);
pass = False;
}
return pass;