diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-11-25 18:01:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:06:08 -0500 |
commit | 13abb5275827673c765863d7f5bd7dafea5ad8b9 (patch) | |
tree | 3077098c8d49df14f54fb3a545ed12fd7a15ad08 | |
parent | f342dbe702655fa8d05692051012e47d1f67ed31 (diff) | |
download | samba-13abb5275827673c765863d7f5bd7dafea5ad8b9.tar.gz samba-13abb5275827673c765863d7f5bd7dafea5ad8b9.tar.bz2 samba-13abb5275827673c765863d7f5bd7dafea5ad8b9.zip |
r3959: fix compiler warnings
metze
(This used to be commit e28351f710525ca9863210974544a8b1a537e63a)
-rw-r--r-- | source4/client/clitar.c | 2 | ||||
-rw-r--r-- | source4/libcli/auth/gensec_ntlmssp.c | 2 | ||||
-rw-r--r-- | source4/libcli/auth/ntlmssp.c | 14 | ||||
-rw-r--r-- | source4/torture/rpc/echo.c | 6 | ||||
-rw-r--r-- | source4/torture/rpc/samlogon.c | 64 |
5 files changed, 44 insertions, 44 deletions
diff --git a/source4/client/clitar.c b/source4/client/clitar.c index 40ff5a79ab..476e29d4ba 100644 --- a/source4/client/clitar.c +++ b/source4/client/clitar.c @@ -300,7 +300,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_t *)hb - TBLOCK, TBLOCK *3); return -1; } diff --git a/source4/libcli/auth/gensec_ntlmssp.c b/source4/libcli/auth/gensec_ntlmssp.c index ee8d1aa79c..5e55082c6f 100644 --- a/source4/libcli/auth/gensec_ntlmssp.c +++ b/source4/libcli/auth/gensec_ntlmssp.c @@ -74,7 +74,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/source4/libcli/auth/ntlmssp.c b/source4/libcli/auth/ntlmssp.c index f0003279e5..5d61361d69 100644 --- a/source4/libcli/auth/ntlmssp.c +++ b/source4/libcli/auth/ntlmssp.c @@ -264,7 +264,7 @@ NTSTATUS ntlmssp_update(struct 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; } } @@ -472,7 +472,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state, &cliname, &domname)) { DEBUG(1, ("ntlmssp_server_negotiate: failed to parse NTLMSSP:\n")); - dump_data(2, (const char *)in.data, in.length); + dump_data(2, in.data, in.length); return NT_STATUS_INVALID_PARAMETER; } @@ -611,7 +611,7 @@ static NTSTATUS ntlmssp_server_preauth(struct ntlmssp_state *ntlmssp_state, &ntlmssp_state->encrypted_session_key, &auth_flags)) { DEBUG(10, ("ntlmssp_server_auth: failed to parse NTLMSSP (nonfatal):\n")); - dump_data(10, (const char *)request.data, request.length); + dump_data(10, request.data, request.length); /* zero this out */ data_blob_free(&ntlmssp_state->encrypted_session_key); @@ -635,7 +635,7 @@ static NTSTATUS ntlmssp_server_preauth(struct ntlmssp_state *ntlmssp_state, &user, &workstation)) { DEBUG(1, ("ntlmssp_server_auth: failed to parse NTLMSSP:\n")); - dump_data(2, (const char *)request.data, request.length); + dump_data(2, request.data, request.length); return NT_STATUS_INVALID_PARAMETER; } @@ -1027,7 +1027,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 *)in.data, in.length); + dump_data(2, in.data, in.length); return NT_STATUS_INVALID_PARAMETER; } @@ -1069,7 +1069,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 *)in.data, in.length); + dump_data(2, in.data, in.length); return NT_STATUS_INVALID_PARAMETER; } @@ -1136,7 +1136,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, NULL, 24); SMBNTencrypt(ntlmssp_state->password, diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c index 441a4835f2..c141d4be9c 100644 --- a/source4/torture/rpc/echo.c +++ b/source4/torture/rpc/echo.c @@ -56,7 +56,7 @@ static BOOL test_echodata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) { int i; NTSTATUS status; - char *data_in, *data_out; + uint8_t *data_in, *data_out; int len = 1 + (random() % 5000); struct echo_EchoData r; @@ -104,7 +104,7 @@ static BOOL test_sourcedata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) int i; NTSTATUS status; int len = 200000 + (random() % 5000); - char *data_out; + uint8_t *data_out; struct echo_SourceData r; printf("\nTesting SourceData\n"); @@ -138,7 +138,7 @@ static BOOL test_sinkdata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) { int i; NTSTATUS status; - char *data_in; + uint8_t *data_in; int len = 200000 + (random() % 5000); struct echo_SinkData r; diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c index c193ba5557..e7c04b6ad1 100644 --- a/source4/torture/rpc/samlogon.c +++ b/source4/torture/rpc/samlogon.c @@ -344,25 +344,25 @@ static BOOL test_lm_ntlm_broken(struct samlogon_state *samlogon_state, enum ntlm sizeof(lm_key)) != 0) { printf("LM Key does not match expectations!\n"); printf("lm_key:\n"); - dump_data(1, (const char *)lm_key, 8); + dump_data(1, lm_key, 8); printf("expected:\n"); - dump_data(1, (const char *)lm_hash, 8); + dump_data(1, lm_hash, 8); pass = False; } switch (break_which) { case NO_NT: { - char lm_key_expected[16]; + uint8_t lm_key_expected[16]; memcpy(lm_key_expected, lm_hash, 8); memset(lm_key_expected+8, '\0', 8); if (memcmp(lm_key_expected, user_session_key, 16) != 0) { printf("NT Session Key does not match expectations (should be first-8 LM hash)!\n"); printf("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)); printf("expected:\n"); - dump_data(1, (const char *)lm_key_expected, sizeof(lm_key_expected)); + dump_data(1, lm_key_expected, sizeof(lm_key_expected)); pass = False; } break; @@ -372,9 +372,9 @@ static BOOL test_lm_ntlm_broken(struct samlogon_state *samlogon_state, enum ntlm sizeof(user_session_key)) != 0) { printf("NT Session Key does not match expectations!\n"); printf("user_session_key:\n"); - dump_data(1, (const char *)user_session_key, 16); + dump_data(1, user_session_key, 16); printf("expected:\n"); - dump_data(1, (const char *)session_key.data, session_key.length); + dump_data(1, session_key.data, session_key.length); pass = False; } } @@ -437,22 +437,22 @@ static BOOL test_ntlm_in_lm(struct samlogon_state *samlogon_state, char **error_ sizeof(lm_key)) != 0) { printf("LM Key does not match expectations!\n"); printf("lm_key:\n"); - dump_data(1, (const char *)lm_key, 8); + dump_data(1, lm_key, 8); printf("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) { - char lm_key_expected[16]; + uint8_t lm_key_expected[16]; memcpy(lm_key_expected, lm_hash, 8); memset(lm_key_expected+8, '\0', 8); if (memcmp(lm_key_expected, user_session_key, 16) != 0) { printf("NT Session Key does not match expectations (should be first-8 LM hash)!\n"); printf("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)); printf("expected:\n"); - dump_data(1, (const char *)lm_key_expected, sizeof(lm_key_expected)); + dump_data(1, lm_key_expected, sizeof(lm_key_expected)); pass = False; } } @@ -471,21 +471,21 @@ static BOOL test_ntlm_in_both(struct samlogon_state *samlogon_state, char **erro DATA_BLOB nt_response = data_blob_talloc(samlogon_state->mem_ctx, NULL, 24); DATA_BLOB session_key = data_blob_talloc(samlogon_state->mem_ctx, NULL, 16); - char lm_key[8]; - char lm_hash[16]; - char user_session_key[16]; - char nt_hash[16]; + uint8_t lm_key[8]; + uint8_t lm_hash[16]; + uint8_t user_session_key[16]; + uint8_t nt_hash[16]; ZERO_STRUCT(lm_key); ZERO_STRUCT(user_session_key); SMBNTencrypt(samlogon_state->password, samlogon_state->chall.data, nt_response.data); - E_md4hash(samlogon_state->password, (uint8_t *)nt_hash); - SMBsesskeygen_ntv1((const uint8_t *)nt_hash, + E_md4hash(samlogon_state->password, nt_hash); + SMBsesskeygen_ntv1(nt_hash, session_key.data); - lm_good = E_deshash(samlogon_state->password, (uint8_t *)lm_hash); + lm_good = E_deshash(samlogon_state->password, lm_hash); if (!lm_good) { ZERO_STRUCT(lm_hash); } @@ -518,7 +518,7 @@ static BOOL test_ntlm_in_both(struct samlogon_state *samlogon_state, char **erro printf("user_session_key:\n"); dump_data(1, user_session_key, 16); printf("expected:\n"); - dump_data(1, (const char *)session_key.data, session_key.length); + dump_data(1, session_key.data, session_key.length); pass = False; } @@ -584,18 +584,18 @@ static BOOL test_lmv2_ntlmv2_broken(struct samlogon_state *samlogon_state, enum sizeof(user_session_key)) != 0) { printf("USER (LMv2) Session Key does not match expectations!\n"); printf("user_session_key:\n"); - dump_data(1, (const char *)user_session_key, 16); + dump_data(1, user_session_key, 16); printf("expected:\n"); - dump_data(1, (const char *)lmv2_session_key.data, ntlmv2_session_key.length); + dump_data(1, lmv2_session_key.data, ntlmv2_session_key.length); pass = False; } if (memcmp(lmv2_session_key.data, lm_session_key, sizeof(lm_session_key)) != 0) { printf("LM (LMv2) Session Key does not match expectations!\n"); printf("lm_session_key:\n"); - dump_data(1, (const char *)lm_session_key, 8); + dump_data(1, lm_session_key, 8); printf("expected:\n"); - dump_data(1, (const char *)lmv2_session_key.data, 8); + dump_data(1, lmv2_session_key.data, 8); pass = False; } break; @@ -604,18 +604,18 @@ static BOOL test_lmv2_ntlmv2_broken(struct samlogon_state *samlogon_state, enum sizeof(user_session_key)) != 0) { printf("USER (NTLMv2) Session Key does not match expectations!\n"); printf("user_session_key:\n"); - dump_data(1, (const char *)user_session_key, 16); + dump_data(1, user_session_key, 16); printf("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; } if (memcmp(ntlmv2_session_key.data, lm_session_key, sizeof(lm_session_key)) != 0) { printf("LM (NTLMv2) Session Key does not match expectations!\n"); printf("lm_session_key:\n"); - dump_data(1, (const char *)lm_session_key, 8); + dump_data(1, lm_session_key, 8); printf("expected:\n"); - dump_data(1, (const char *)ntlmv2_session_key.data, 8); + dump_data(1, ntlmv2_session_key.data, 8); pass = False; } } @@ -752,17 +752,17 @@ static BOOL test_ntlm2(struct samlogon_state *samlogon_state, char **error_strin sizeof(lm_key)) != 0) { printf("LM Key does not match expectations!\n"); printf("lm_key:\n"); - dump_data(1, (const char *)lm_key, 8); + dump_data(1, lm_key, 8); printf("expected:\n"); - dump_data(1, (const char *)lm_hash, 8); + dump_data(1, lm_hash, 8); pass = False; } if (memcmp(nt_key, user_session_key, 16) != 0) { printf("NT Session Key does not match expectations (should be first-8 LM hash)!\n"); printf("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)); printf("expected:\n"); - dump_data(1, (const char *)nt_key, sizeof(nt_key)); + dump_data(1, nt_key, sizeof(nt_key)); pass = False; } return pass; |