summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-11-25 18:01:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:08 -0500
commit13abb5275827673c765863d7f5bd7dafea5ad8b9 (patch)
tree3077098c8d49df14f54fb3a545ed12fd7a15ad08 /source4/torture/rpc
parentf342dbe702655fa8d05692051012e47d1f67ed31 (diff)
downloadsamba-13abb5275827673c765863d7f5bd7dafea5ad8b9.tar.gz
samba-13abb5275827673c765863d7f5bd7dafea5ad8b9.tar.bz2
samba-13abb5275827673c765863d7f5bd7dafea5ad8b9.zip
r3959: fix compiler warnings
metze (This used to be commit e28351f710525ca9863210974544a8b1a537e63a)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/echo.c6
-rw-r--r--source4/torture/rpc/samlogon.c64
2 files changed, 35 insertions, 35 deletions
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;