r22001: change prototype of dump_data(), so that it takes unsigned char * now,
authorStefan Metzmacher <metze@samba.org>
Wed, 28 Mar 2007 13:34:59 +0000 (13:34 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:18:59 +0000 (12:18 -0500)
which matches what samba4 has.

also fix all the callers to prevent compiler warnings

metze
(This used to be commit fa322f0cc9c26a9537ba3f0a7d4e4a25941317e7)

35 files changed:
source3/auth/auth.c
source3/auth/auth_ntlmssp.c
source3/auth/auth_util.c
source3/client/clitar.c
source3/lib/util.c
source3/librpc/ndr/ndr_basic.c
source3/libsmb/clirap.c
source3/libsmb/ntlm_check.c
source3/libsmb/ntlmssp.c
source3/libsmb/ntlmssp_sign.c
source3/libsmb/smb_signing.c
source3/libsmb/smbencrypt.c
source3/nmbd/nmbd_processlogon.c
source3/nsswitch/winbindd_cache.c
source3/nsswitch/winbindd_creds.c
source3/nsswitch/winbindd_pam.c
source3/passdb/pdb_smbpasswd.c
source3/registry/reg_eventlog.c
source3/rpc_client/cli_pipe.c
source3/rpc_parse/parse_net.c
source3/rpc_parse/parse_prs.c
source3/rpc_parse/parse_samr.c
source3/rpc_server/srv_lsa_hnd.c
source3/rpc_server/srv_netlog_nt.c
source3/rpc_server/srv_pipe_hnd.c
source3/rpc_server/srv_samr_nt.c
source3/rpc_server/srv_spoolss_nt.c
source3/smbd/chgpasswd.c
source3/smbd/msdfs.c
source3/smbd/nttrans.c
source3/smbd/trans2.c
source3/torture/cmd_vfs.c
source3/torture/torture.c
source3/utils/ntlm_auth.c
source3/utils/ntlm_auth_diagnostics.c

index dd5481767bd71f825a83707793df88b6d5a7ee96..91a5ac2ff1cc5c3f1fb86c5305cef8609beedcf6 100644 (file)
@@ -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? */
index 51b145a7608b3822bfe23e24a45f024e6adfb0f2..08e88cc21a436383714c2f58445765ca96667ab2 100644 (file)
@@ -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;
 }
 
index 0afcabcf0760837750be183c38f3e3cd2d54b93e..82567473b5cdad87cf31f84571f378899a9e5edf 100644 (file)
@@ -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
 
index 7bbb9fc58bf68554bf7ec637f57ed38b164da6f0..3d925858a0f21418b172186a4a12044c0611bc7f 100644 (file)
@@ -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;
        }
 
index e9c2d372276d36189960df9d97cc4f513aefad34..964b3813edbfb92e77ccf3129070a5c1e31aa85d 100644 (file)
@@ -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
 }
index 7fc290e595976e112f518eedffe2f354ae030e1b..913dfc7e65d5638f7d71fb1d8193f6ea2924baba 100644 (file)
@@ -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);
        }
 }
 
index 05dc36e91c3614219b6c399f2a58cd8cf294797d..4be03e16f079a26124f77bf057c1f64c62d6381d 100644 (file)
@@ -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);
 
index e1fc92e34499e6363673d7d0ca90024ddfa1eec7..1ce5d5e42426a06cfbe5babd00a354e3f09f57ed 100644 (file)
@@ -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);
index 2f919b3f766f985f168b24fd20041263a8575947..2bc2183adde4f80be8ab02e246a93eaa14810820 100644 (file)
@@ -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,
index 5642be42a3da111532d5801f5e908dcc18a297d5..a30535e2ded9cf4a570664792ee7c36878812e30 100644 (file)
@@ -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);
index 0395208986873945a17adfc9dd96f47ef6ca5861..d3384ce365a4028180cfb78fc66ec6db3eadd655 100644 (file)
@@ -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));
index 5f7b5b1809394353e5158b4a8c9896b1b6047c6a..ad833374f3deea1cb7bdde0eb018af7b63c2954a 100644 (file)
@@ -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
index 4a8d1db51dbe869874a11c5e196cf6b054604bcf..232f430b660f9b34222f1e6cc5a89a78ed738fea 100644 (file)
@@ -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);
index 739ff7bdde0f3db98e45f201fe314e75b52925e9..c09db4d20c01cbb440fd7952ecf802f51cb994d3 100644 (file)
@@ -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. */
 }
 
index f11b80909bf5f74819d59530822834def276d809..920527810a40bc207e7de27dc93913b190cfea1b 100644 (file)
@@ -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);
index 6ee548292ccf6d2342e3c47db4c2f0ddc735546b..59bff901ce4d65d656689ad7851f96857ad08a02 100644 (file)
@@ -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
 
index e01b4b1855c7d9c75d16db9eac86f8d639001016..18ca74b27332a7352f25dbb563bcfdd0be454dfb 100644 (file)
@@ -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)) {
index 90d9a244376275d864ca64efe618ec74647b31fb..d0da12637a3e719b74064aa223ce1c01b4b9dc6a 100644 (file)
@@ -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 );
index 61f5ee51bd0acf4b08aeb042788eadf1644098b4..c7c1b7fe69c9699567c62e315d63bdcf4adacf10 100644 (file)
@@ -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 */
index a620781a2f7ee5a24ef2b8bf74322a17fefb8ec8..3eb31ad55fe580b91df68ce9d741021914930fc7 100644 (file)
@@ -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;
index ca46807932d20340c3fe387bee64e78306a3e2c7..0fb429b5917ab6fba0ea4ebd5a05a7bee1cb826f 100644 (file)
@@ -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;
        }
 
index e0f5f7f294cf1860ede2d6ce15149887b7a74b61..18d1a66e71b907278d90a04c238f7008f383a3fe 100644 (file)
@@ -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;
        }
 }
index 88c59ee8952c4281aec89d89aa80561e60a3bcea..a95415c9ce041bd8c37142d4a7a8601a55ebf1ea 100644 (file)
@@ -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;
 
index b8c776964e9070d3201f208623c88b429332f225..0c12cb3b7c5e6466013a2fbba62eb6f2050af386 100644 (file)
@@ -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);
        
index 8aa5bb3e6d175e41c14f006d0ea81c10b1441c9e..d65696668ee0cb3f8240d318cd0bdcca1a041d7e 100644 (file)
@@ -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);
 }
index ca7185f527bcb8331b59b5b6256eb47b94ec49c0..c743e68530fb5387ca08a9caa0b23afef791bb49 100644 (file)
@@ -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;
index 958e9d81fe61072a3102d67dde5a7ba9f4dcc1e1..e06d613c74d036fe07d240f8f8faea47b780ee6c 100644 (file)
@@ -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;
 }
index 7c6886b81c9ab039cd8bf1db57359c3184698253..8146d6d13776bea4dfb82e67200d60d6fae88499 100644 (file)
@@ -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++) {
index 916f661eaae9beb3205e96a48579a204fa349699..397d43b8bb23dd666a41e0d64a0800291e4021e8 100644 (file)
@@ -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);
index 0ecb14f9c76683325aedffcb1385d6ddaa9380f8..51ed081edbe7d6a6893c62573f2fc53eb044dfeb 100644 (file)
@@ -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) &&
index df713db5646e3c08ed2a98eee9541b51daeb75b0..b06b53b2996b3aac452452a7e9a22482939b8625 100644 (file)
@@ -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;
 }
index 455ca1c82c7bff21b5a64292fa25c5d346f50f4f..1005d14e7972e34031398a531eafd3e3e9abeadc 100644 (file)
@@ -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;
 }
 
index 925cac3f32cbc8193f1c743da6cb1f3ce372d2db..39495c6a3e7b2c3ccc23a9a24287b8d2d019ba5c 100644 (file)
@@ -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);
        }
 
index 1f0a915574df018e49314390601285016721f192..2bdbdc042271c9d35016abe5058429c5e7b361ed 100644 (file)
@@ -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;
index 6f829de1dd807b969354cd5643740f9e60588581..0ebe77b0d10f448d3a88dd7f396c9ef7574b8bb3 100644 (file)
@@ -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;