summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/auth/auth.c4
-rw-r--r--source3/auth/auth_util.c2
-rw-r--r--source3/auth/auth_winbind.c2
-rw-r--r--source3/client/client.c4
-rw-r--r--source3/lib/module.c2
-rw-r--r--source3/lib/util_str.c14
-rw-r--r--source3/libads/ads_status.c2
-rw-r--r--source3/libads/authdata.c4
-rw-r--r--source3/libads/krb5_setpw.c2
-rw-r--r--source3/libads/sasl.c16
-rw-r--r--source3/libsmb/smb_signing.c36
-rw-r--r--source3/libsmb/smbencrypt.c2
-rw-r--r--source3/nsswitch/winbindd_ads.c2
-rw-r--r--source3/nsswitch/winbindd_cache.c8
-rw-r--r--source3/nsswitch/winbindd_rpc.c4
-rw-r--r--source3/nsswitch/winbindd_util.c2
-rw-r--r--source3/printing/nt_printing.c4
-rw-r--r--source3/rpc_client/cli_netlogon.c6
-rw-r--r--source3/rpc_client/cli_pipe.c16
-rw-r--r--source3/rpc_client/cli_spoolss.c6
-rw-r--r--source3/rpc_parse/parse_prs.c14
-rw-r--r--source3/rpcclient/cmd_ds.c2
-rw-r--r--source3/rpcclient/rpcclient.c4
-rw-r--r--source3/sam/idmap_tdb.c4
-rw-r--r--source3/sam/idmap_util.c4
-rw-r--r--source3/utils/net_ads_cldap.c28
-rw-r--r--source3/utils/net_rpc.c4
-rw-r--r--source3/utils/ntlm_auth.c78
-rw-r--r--source3/utils/profiles.c2
29 files changed, 139 insertions, 139 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index 8316c4b617..668bba0d64 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -131,7 +131,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, auth_context->challenge.data, auth_context->challenge.length);
+ dump_data(5, (const char *)auth_context->challenge.data, auth_context->challenge.length);
SMB_ASSERT(auth_context->challenge.length == 8);
@@ -228,7 +228,7 @@ static NTSTATUS check_ntlm_password(const struct auth_context *auth_context,
auth_context->challenge_set_by));
DEBUG(10, ("challenge is: \n"));
- dump_data(5, auth_context->challenge.data, auth_context->challenge.length);
+ dump_data(5, (const char *)auth_context->challenge.data, auth_context->challenge.length);
#ifdef DEBUG_PASSWORD
DEBUG(100, ("user_info has passwords of length %d and %d\n",
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index d07681ee7d..952aa8ba59 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -393,7 +393,7 @@ BOOL make_user_info_for_reply(auth_usersupplied_info **user_info,
dump_data(100, plaintext_password.data, plaintext_password.length);
#endif
- SMBencrypt( (const uchar *)plaintext_password.data, (const uchar*)chal, local_lm_response);
+ SMBencrypt( (const char *)plaintext_password.data, (const uchar*)chal, local_lm_response);
local_lm_blob = data_blob(local_lm_response, 24);
/* We can't do an NT hash here, as the password needs to be
diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c
index aa8f345a5b..cae7aadd0c 100644
--- a/source3/auth/auth_winbind.c
+++ b/source3/auth/auth_winbind.c
@@ -36,7 +36,7 @@ static NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct winbindd_response
if (!prs_init(&ps, len, mem_ctx, UNMARSHALL)) {
return NT_STATUS_NO_MEMORY;
}
- prs_copy_data_in(&ps, info3_ndr, len);
+ prs_copy_data_in(&ps, (char *)info3_ndr, len);
prs_set_offset(&ps,0);
if (!net_io_user_info3("", info3, &ps, 1, 3)) {
DEBUG(2, ("get_info3_from_ndr: could not parse info3 struct!\n"));
diff --git a/source3/client/client.c b/source3/client/client.c
index c4407b8c31..67fadd11a8 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -2186,7 +2186,7 @@ static int cmd_help(void)
static int process_command_string(char *cmd)
{
pstring line;
- char *ptr;
+ const char *ptr;
int rc = 0;
/* establish the connection if not already */
@@ -2460,7 +2460,7 @@ static void readline_callback(void)
static void process_stdin(void)
{
- char *ptr;
+ const char *ptr;
while (1) {
fstring tok;
diff --git a/source3/lib/module.c b/source3/lib/module.c
index ac4fe57a2c..d860cba819 100644
--- a/source3/lib/module.c
+++ b/source3/lib/module.c
@@ -41,7 +41,7 @@ NTSTATUS smb_load_module(const char *module_name)
return NT_STATUS_UNSUCCESSFUL;
}
- init = sys_dlsym(handle, "init_module");
+ init = (init_module_function *)sys_dlsym(handle, "init_module");
/* we must check sys_dlerror() to determine if it worked, because
sys_dlsym() can validly return NULL */
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 8d2b996785..eb1c70d412 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -35,7 +35,7 @@
* Based on a routine by GJC@VILLAGE.COM.
* Extensively modified by Andrew.Tridgell@anu.edu.au
**/
-BOOL next_token(char **ptr,char *buff, const char *sep, size_t bufsize)
+BOOL next_token(const char **ptr,char *buff, const char *sep, size_t bufsize)
{
char *s;
char *pbuf;
@@ -45,7 +45,7 @@ BOOL next_token(char **ptr,char *buff, const char *sep, size_t bufsize)
if (!ptr)
return(False);
- s = *ptr;
+ s = (char *)*ptr;
/* default to simple separators */
if (!sep)
@@ -82,13 +82,13 @@ parameter so you can pass NULL. This is useful for user interface code
but beware the fact that it is not re-entrant!
**/
-static char *last_ptr=NULL;
+static const char *last_ptr=NULL;
-BOOL next_token_nr(char **ptr,char *buff, const char *sep, size_t bufsize)
+BOOL next_token_nr(const char **ptr,char *buff, const char *sep, size_t bufsize)
{
BOOL ret;
if (!ptr)
- ptr = (char **)&last_ptr;
+ ptr = &last_ptr;
ret = next_token(ptr, buff, sep, bufsize);
last_ptr = *ptr;
@@ -109,7 +109,7 @@ void set_first_token(char *ptr)
char **toktocliplist(int *ctok, const char *sep)
{
- char *s=last_ptr;
+ char *s=(char *)last_ptr;
int ictok=0;
char **ret, **iret;
@@ -132,7 +132,7 @@ char **toktocliplist(int *ctok, const char *sep)
} while(*s);
*ctok=ictok;
- s=last_ptr;
+ s=(char *)last_ptr;
if (!(ret=iret=malloc(ictok*sizeof(char *))))
return NULL;
diff --git a/source3/libads/ads_status.c b/source3/libads/ads_status.c
index 80fdb99eac..b8f7788bd7 100644
--- a/source3/libads/ads_status.c
+++ b/source3/libads/ads_status.c
@@ -87,7 +87,7 @@ NTSTATUS ads_ntstatus(ADS_STATUS status)
*/
const char *ads_errstr(ADS_STATUS status)
{
- int msg_ctx;
+ OM_uint32 msg_ctx;
static char *ret;
SAFE_FREE(ret);
diff --git a/source3/libads/authdata.c b/source3/libads/authdata.c
index f78a4ad707..29170af377 100644
--- a/source3/libads/authdata.c
+++ b/source3/libads/authdata.c
@@ -423,7 +423,7 @@ static BOOL pac_io_pac_signature_data(const char *desc,
if (!prs_uint32("type", ps, depth, &data->type))
return False;
if (UNMARSHALLING(ps)) {
- data->signature = prs_alloc_mem(ps, siglen);
+ data->signature = (unsigned char *)prs_alloc_mem(ps, siglen);
if (!data->signature) {
DEBUG(3, ("No memory available\n"));
return False;
@@ -601,7 +601,7 @@ PAC_DATA *decode_pac_data(DATA_BLOB *auth_data, TALLOC_CTX *ctx)
DEBUG(5,("dump_pac_data\n"));
prs_init(&ps, pac_data_blob.length, ctx, UNMARSHALL);
- prs_copy_data_in(&ps, pac_data_blob.data, pac_data_blob.length);
+ prs_copy_data_in(&ps, (char *)pac_data_blob.data, pac_data_blob.length);
prs_set_offset(&ps, 0);
data_blob_free(&pac_data_blob);
diff --git a/source3/libads/krb5_setpw.c b/source3/libads/krb5_setpw.c
index 80ef6cdf01..d1da118bb8 100644
--- a/source3/libads/krb5_setpw.c
+++ b/source3/libads/krb5_setpw.c
@@ -143,7 +143,7 @@ static krb5_error_code build_kpasswd_request(uint16 pversion,
else
return EINVAL;
- encoded_setpw.data = setpw.data;
+ encoded_setpw.data = (char *)setpw.data;
encoded_setpw.length = setpw.length;
ret = krb5_mk_priv(context, auth_context,
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index 910ff3f4dc..0320bb0cfc 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -60,7 +60,7 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
msg1 = gen_negTokenTarg(mechs, blob);
data_blob_free(&blob);
- cred.bv_val = msg1.data;
+ cred.bv_val = (char *)msg1.data;
cred.bv_len = msg1.length;
rc = ldap_sasl_bind_s(ads->ld, NULL, "GSS-SPNEGO", &cred, NULL, NULL, &scred);
@@ -106,7 +106,7 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
data_blob_free(&blob);
/* now send the auth packet and we should be done */
- cred.bv_val = auth.data;
+ cred.bv_val = (char *)auth.data;
cred.bv_len = auth.length;
rc = ldap_sasl_bind_s(ads->ld, NULL, "GSS-SPNEGO", &cred, NULL, NULL, &scred);
@@ -134,7 +134,7 @@ static ADS_STATUS ads_sasl_spnego_krb5_bind(ADS_STRUCT *ads, const char *princip
}
/* now send the auth packet and we should be done */
- cred.bv_val = blob.data;
+ cred.bv_val = (char *)blob.data;
cred.bv_len = blob.length;
rc = ldap_sasl_bind_s(ads->ld, NULL, "GSS-SPNEGO", &cred, NULL, NULL, &scred);
@@ -227,7 +227,7 @@ failed:
*/
static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
{
- int minor_status;
+ OM_uint32 minor_status;
gss_name_t serv_name;
gss_buffer_desc input_name;
gss_ctx_id_t context_handle;
@@ -328,7 +328,7 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
gss_release_name(&minor_status, &serv_name);
gss_rc = gss_unwrap(&minor_status,context_handle,&input_token,&output_token,
- &conf_state,NULL);
+ (int *)&conf_state,NULL);
if (gss_rc) {
status = ADS_ERROR_GSS(gss_rc, minor_status);
goto failed;
@@ -353,13 +353,13 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
*p++ = max_msg_size>>16;
*p++ = max_msg_size>>8;
*p++ = max_msg_size;
- snprintf(p, strlen(ads->config.bind_path)+4, "dn:%s", ads->config.bind_path);
- p += strlen(p);
+ snprintf((char *)p, strlen(ads->config.bind_path)+4, "dn:%s", ads->config.bind_path);
+ p += strlen((const char *)p);
output_token.length = PTR_DIFF(p, output_token.value);
gss_rc = gss_wrap(&minor_status, context_handle,0,GSS_C_QOP_DEFAULT,
- &output_token, &conf_state,
+ &output_token, (int *)&conf_state,
&input_token);
if (gss_rc) {
status = ADS_ERROR_GSS(gss_rc, minor_status);
diff --git a/source3/libsmb/smb_signing.c b/source3/libsmb/smb_signing.c
index afacfc7a93..08ff655a3f 100644
--- a/source3/libsmb/smb_signing.c
+++ b/source3/libsmb/smb_signing.c
@@ -314,10 +314,10 @@ static void client_sign_outgoing_message(char *outbuf, struct smb_sign_info *si)
else
send_seq_num = data->send_seq_num;
- simple_packet_signature(data, outbuf, send_seq_num, calc_md5_mac);
+ simple_packet_signature(data, (const unsigned char *)outbuf, send_seq_num, calc_md5_mac);
DEBUG(10, ("client_sign_outgoing_message: sent SMB signature of\n"));
- dump_data(10, calc_md5_mac, 8);
+ dump_data(10, (const char *)calc_md5_mac, 8);
memcpy(&outbuf[smb_ss_field], calc_md5_mac, 8);
@@ -367,23 +367,23 @@ static BOOL client_check_incoming_message(char *inbuf, struct smb_sign_info *si)
}
saved_seq = reply_seq_number;
- simple_packet_signature(data, inbuf, reply_seq_number, calc_md5_mac);
+ simple_packet_signature(data, (const unsigned char *)inbuf, reply_seq_number, calc_md5_mac);
- server_sent_mac = &inbuf[smb_ss_field];
+ server_sent_mac = (unsigned char *)&inbuf[smb_ss_field];
good = (memcmp(server_sent_mac, calc_md5_mac, 8) == 0);
if (!good) {
DEBUG(5, ("client_check_incoming_message: BAD SIG: wanted SMB signature of\n"));
- dump_data(5, calc_md5_mac, 8);
+ dump_data(5, (const char *)calc_md5_mac, 8);
DEBUG(5, ("client_check_incoming_message: BAD SIG: got SMB signature of\n"));
- dump_data(5, server_sent_mac, 8);
+ dump_data(5, (const char *)server_sent_mac, 8);
#if 1 /* JRATEST */
{
int i;
reply_seq_number -= 5;
for (i = 0; i < 10; i++, reply_seq_number++) {
- simple_packet_signature(data, inbuf, reply_seq_number, calc_md5_mac);
+ simple_packet_signature(data, (const unsigned char *)inbuf, reply_seq_number, calc_md5_mac);
if (memcmp(server_sent_mac, calc_md5_mac, 8) == 0) {
DEBUG(0,("client_check_incoming_message: out of seq. seq num %u matches.\n",
reply_seq_number ));
@@ -395,7 +395,7 @@ static BOOL client_check_incoming_message(char *inbuf, struct smb_sign_info *si)
} else {
DEBUG(10, ("client_check_incoming_message:: seq %u: got good SMB signature of\n", (unsigned int)reply_seq_number));
- dump_data(10, server_sent_mac, 8);
+ dump_data(10, (const char *)server_sent_mac, 8);
}
return signing_good(inbuf, si, good, saved_seq);
}
@@ -454,12 +454,12 @@ BOOL cli_simple_set_signing(struct cli_state *cli, const uchar user_session_key[
memcpy(&data->mac_key.data[0], user_session_key, 16);
DEBUG(10, ("cli_simple_set_signing: user_session_key\n"));
- dump_data(10, user_session_key, 16);
+ dump_data(10, (const char *)user_session_key, 16);
if (response.length) {
memcpy(&data->mac_key.data[16],response.data, response.length);
DEBUG(10, ("cli_simple_set_signing: response_data\n"));
- dump_data(10, response.data, response.length);
+ dump_data(10, (const char *)response.data, response.length);
} else {
DEBUG(10, ("cli_simple_set_signing: NULL response_data\n"));
}
@@ -647,10 +647,10 @@ static void srv_sign_outgoing_message(char *outbuf, struct smb_sign_info *si)
send_seq_number = data->trans_info->send_seq_num;
}
- simple_packet_signature(data, outbuf, send_seq_number, calc_md5_mac);
+ 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, calc_md5_mac, 8);
+ dump_data(10, (const char *)calc_md5_mac, 8);
memcpy(&outbuf[smb_ss_field], calc_md5_mac, 8);
@@ -726,27 +726,27 @@ static BOOL srv_check_incoming_message(char *inbuf, struct smb_sign_info *si)
}
saved_seq = reply_seq_number;
- simple_packet_signature(data, inbuf, reply_seq_number, calc_md5_mac);
+ simple_packet_signature(data, (const unsigned char *)inbuf, reply_seq_number, calc_md5_mac);
- server_sent_mac = &inbuf[smb_ss_field];
+ server_sent_mac = (unsigned char *)&inbuf[smb_ss_field];
good = (memcmp(server_sent_mac, calc_md5_mac, 8) == 0);
if (!good) {
DEBUG(5, ("srv_check_incoming_message: BAD SIG: seq %u wanted SMB signature of\n",
(unsigned int)saved_seq));
- dump_data(5, calc_md5_mac, 8);
+ dump_data(5, (const char *)calc_md5_mac, 8);
DEBUG(5, ("srv_check_incoming_message: BAD SIG: seq %u got SMB signature of\n",
(unsigned int)saved_seq));
- dump_data(5, server_sent_mac, 8);
+ dump_data(5, (const char *)server_sent_mac, 8);
#if 1 /* JRATEST */
{
int i;
reply_seq_number -= 5;
for (i = 0; i < 10; i++, reply_seq_number++) {
- simple_packet_signature(data, inbuf, reply_seq_number, calc_md5_mac);
+ simple_packet_signature(data, (const unsigned char *)inbuf, reply_seq_number, calc_md5_mac);
if (memcmp(server_sent_mac, calc_md5_mac, 8) == 0) {
DEBUG(0,("srv_check_incoming_message: out of seq. seq num %u matches.\n",
reply_seq_number ));
@@ -758,7 +758,7 @@ static BOOL srv_check_incoming_message(char *inbuf, struct smb_sign_info *si)
} 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, server_sent_mac, 8);
+ dump_data(10, (const char *)server_sent_mac, 8);
}
return signing_good(inbuf, si, good, saved_seq);
}
diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c
index ada6a423f2..ec31bb5dba 100644
--- a/source3/libsmb/smbencrypt.c
+++ b/source3/libsmb/smbencrypt.c
@@ -81,7 +81,7 @@ void E_deshash(const char *passwd, uchar p16[16])
push_ascii(dospwd, passwd, sizeof(dospwd), STR_UPPER|STR_TERMINATE);
/* Only the fisrt 14 chars are considered, password need not be null terminated. */
- E_P16(dospwd, p16);
+ E_P16((const unsigned char *)dospwd, p16);
ZERO_STRUCT(dospwd);
}
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index 7140dc35a0..19babae46b 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -823,7 +823,7 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain,
}
if ( NT_STATUS_IS_OK(result) )
- result = cli_ds_enum_domain_trusts( cli, mem_ctx, cli->desthost, flags, &domains, &count );
+ result = cli_ds_enum_domain_trusts( cli, mem_ctx, cli->desthost, flags, &domains, (unsigned int *)&count );
if ( NT_STATUS_IS_OK(result) && count) {
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index 2891a4fa68..bc6967dee1 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -432,7 +432,7 @@ static struct cache_entry *wcache_fetch(struct winbind_cache *cache,
}
centry = smb_xmalloc(sizeof(*centry));
- centry->data = data.dptr;
+ centry->data = (unsigned char *)data.dptr;
centry->len = data.dsize;
centry->ofs = 0;
@@ -576,7 +576,7 @@ static void centry_end(struct cache_entry *centry, const char *format, ...)
key.dptr = kstr;
key.dsize = strlen(kstr);
- data.dptr = centry->data;
+ data.dptr = (char *)centry->data;
data.dsize = centry->ofs;
tdb_store(wcache->tdb, key, data, TDB_REPLACE);
@@ -924,7 +924,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
centry = wcache_fetch(cache, domain, "NS/%s/%s", domain->name, uname);
if (!centry)
goto do_query;
- *type = centry_uint32(centry);
+ *type = (enum SID_NAME_USE)centry_uint32(centry);
sid2 = centry_sid(centry, mem_ctx);
if (!sid2) {
ZERO_STRUCTP(sid);
@@ -988,7 +988,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
if (!centry)
goto do_query;
if (NT_STATUS_IS_OK(centry->status)) {
- *type = centry_uint32(centry);
+ *type = (enum SID_NAME_USE)centry_uint32(centry);
*name = centry_string(centry, mem_ctx);
}
status = centry->status;
diff --git a/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c
index 33339d7ca0..8bd2c66511 100644
--- a/source3/nsswitch/winbindd_rpc.c
+++ b/source3/nsswitch/winbindd_rpc.c
@@ -295,7 +295,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
if (NT_STATUS_IS_OK(result)) {
sid_copy(sid, &sids[0]);
- *type = types[0];
+ *type = (enum SID_NAME_USE)types[0];
}
return result;
@@ -331,7 +331,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
hnd && hnd->cli && hnd->cli->fd == -1);
if (NT_STATUS_IS_OK(result)) {
- *type = types[0];
+ *type = (enum SID_NAME_USE)types[0];
*name = names[0];
DEBUG(5,("Mapped sid to [%s]\\[%s]\n", domains[0], *name));
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index 79588477ba..95dff84769 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -176,7 +176,7 @@ void add_trusted_domains( struct winbindd_domain *domain )
/* ask the DC what domains it trusts */
- result = domain->methods->trusted_domains(domain, mem_ctx, &num_domains,
+ result = domain->methods->trusted_domains(domain, mem_ctx, (unsigned int *)&num_domains,
&names, &alt_names, &dom_sids);
if ( NT_STATUS_IS_OK(result) ) {
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 2596d99815..9ac5d2b744 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2930,7 +2930,7 @@ WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const cha
return WERR_NOMEM;
regval_ctr_addvalue( &p2->data.keys[key_index].values, value,
- type, data, real_len );
+ type, (const char *)data, real_len );
DEBUG(8,("add_printer_data: Added key => [%s], value => [%s], type=> [%d], size => [%d]\n",
key, value, type, real_len ));
@@ -3023,7 +3023,7 @@ static int unpack_values(NT_PRINTER_DATA *printer_data, char *buf, int buflen)
/* add the new value */
- regval_ctr_addvalue( &printer_data->keys[key_index].values, valuename, type, data_p, size );
+ regval_ctr_addvalue( &printer_data->keys[key_index].values, valuename, type, (const char *)data_p, size );
SAFE_FREE(data_p); /* 'B' option to tdbpack does a malloc() */
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index 7b8cd19174..2de830e558 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -514,7 +514,7 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx,
0, /* param_ctrl */
0xdead, 0xbeef, /* LUID? */
username, cli->clnt_name_slash,
- cli->sess_key, lm_owf_user_pwd,
+ (const char *)cli->sess_key, lm_owf_user_pwd,
nt_owf_user_pwd);
break;
@@ -707,9 +707,9 @@ NTSTATUS cli_net_srv_pwset(struct cli_state *cli, TALLOC_CTX *mem_ctx,
credstr(new_clnt_cred.challenge.data), new_clnt_cred.timestamp.time));
/* store the parameters */
- init_q_srv_pwset(&q_s, cli->srv_name_slash, cli->sess_key,
+ init_q_srv_pwset(&q_s, cli->srv_name_slash, (const char *)cli->sess_key,
mach_acct, sec_chan_type, machine_name,
- &new_clnt_cred, (char *)hashed_mach_pwd);
+ &new_clnt_cred, hashed_mach_pwd);
/* turn parameters into data stream */
if(!net_io_q_srv_pwset("", &q_s, &qbuf, 0)) {
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 52395b39c9..13a7841455 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -264,7 +264,7 @@ static BOOL rpc_auth_pipe(struct cli_state *cli, prs_struct *rdata,
DATA_BLOB ntlmssp_verf = data_blob(NULL, auth_len);
/* save the reply away, for use a little later */
- prs_copy_data_out(ntlmssp_verf.data, &auth_verf, auth_len);
+ prs_copy_data_out((char *)ntlmssp_verf.data, &auth_verf, auth_len);
return (NT_STATUS_IS_OK(ntlmssp_client_store_response(cli->ntlmssp_pipe_state,
@@ -287,7 +287,7 @@ static BOOL rpc_auth_pipe(struct cli_state *cli, prs_struct *rdata,
return False;
}
sig = data_blob(NULL, auth_len);
- prs_copy_data_out(sig.data, &auth_verf, auth_len);
+ prs_copy_data_out((char *)sig.data, &auth_verf, auth_len);
}
/*
@@ -306,12 +306,12 @@ static BOOL rpc_auth_pipe(struct cli_state *cli, prs_struct *rdata,
return False;
}
nt_status = ntlmssp_client_unseal_packet(cli->ntlmssp_pipe_state,
- reply_data, data_len,
+ (unsigned char *)reply_data, data_len,
&sig);
}
else if (cli->pipe_auth_flags & AUTH_PIPE_SIGN) {
nt_status = ntlmssp_client_check_packet(cli->ntlmssp_pipe_state,
- reply_data, data_len,
+ (const unsigned char *)reply_data, data_len,
&sig);
}
@@ -684,10 +684,10 @@ static NTSTATUS create_rpc_bind_req(struct cli_state *cli, prs_struct *rpc_out,
/* Auth len in the rpc header doesn't include auth_header. */
auth_len = request.length;
- prs_copy_data_in(&auth_info, request.data, request.length);
+ prs_copy_data_in(&auth_info, (char *)request.data, request.length);
DEBUG(5, ("NTLMSSP Negotiate:\n"));
- dump_data(5, request.data, request.length);
+ dump_data(5, (const char *)request.data, request.length);
data_blob_free(&request);
@@ -811,7 +811,7 @@ static NTSTATUS create_rpc_bind_resp(struct cli_state *cli,
* Append the auth data to the outgoing buffer.
*/
- if(!prs_copy_data_in(rpc_out, ntlmssp_reply.data, ntlmssp_reply.length)) {
+ if(!prs_copy_data_in(rpc_out, (char *)ntlmssp_reply.data, ntlmssp_reply.length)) {
DEBUG(0,("create_rpc_bind_req: failed to grow parse struct to add auth.\n"));
data_blob_free(&ntlmssp_reply);
return NT_STATUS_NO_MEMORY;
@@ -1017,7 +1017,7 @@ BOOL rpc_api_pipe_req(struct cli_state *cli, uint8 op_num,
/* write auth footer onto the packet */
real_auth_len = sign_blob.length;
- prs_copy_data_in(&sec_blob, sign_blob.data, sign_blob.length);
+ prs_copy_data_in(&sec_blob, (char *)sign_blob.data, sign_blob.length);
data_blob_free(&sign_blob);
}
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 6392620497..f983f63cd7 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -2027,7 +2027,7 @@ WERROR cli_spoolss_setprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Initialise input parameters */
make_spoolss_q_setprinterdata(
- &q, hnd, value->valuename, value->type, value->data_p, value->size);
+ &q, hnd, value->valuename, value->type, (char *)value->data_p, value->size);
/* Marshall data and send request */
@@ -2072,7 +2072,7 @@ WERROR cli_spoolss_setprinterdataex(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Initialise input parameters */
make_spoolss_q_setprinterdataex(
- &q, hnd, keyname, value->valuename, value->type, value->data_p,
+ &q, hnd, keyname, value->valuename, value->type, (char *)value->data_p,
value->size);
/* Marshall data and send request */
@@ -2215,7 +2215,7 @@ WERROR cli_spoolss_enumprinterdataex(struct cli_state *cli, TALLOC_CTX *mem_ctx,
rpcstr_pull(name, v->valuename.buffer, sizeof(name), -1,
STR_TERMINATE);
- regval_ctr_addvalue(ctr, name, v->type, v->data, v->data_len);
+ regval_ctr_addvalue(ctr, name, v->type, (const char *)v->data, v->data_len);
}
done:
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 90fce9eb9d..81a9573077 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -1402,7 +1402,7 @@ static void netsec_digest(struct netsec_auth_struct *a,
if (auth_flags & AUTH_PIPE_SEAL) {
MD5Update(&ctx3, verf->data8, sizeof(verf->data8));
}
- MD5Update(&ctx3, data, data_len);
+ MD5Update(&ctx3, (const unsigned char *)data, data_len);
MD5Final(whole_packet_digest, &ctx3);
dump_data_pw("whole_packet_digest:\n", whole_packet_digest, sizeof(whole_packet_digest));
@@ -1506,9 +1506,9 @@ void netsec_encode(struct netsec_auth_struct *a, int auth_flags,
dump_data_pw("verf->data8_enc:\n", verf->data8, sizeof(verf->data8));
/* encode the packet payload */
- dump_data_pw("data:\n", data, data_len);
- netsechash(sealing_key, data, data_len);
- dump_data_pw("data_enc:\n", data, data_len);
+ dump_data_pw("data:\n", (const unsigned char *)data, data_len);
+ netsechash(sealing_key, (unsigned char *)data, data_len);
+ dump_data_pw("data_enc:\n", (const unsigned char *)data, data_len);
}
/* encode the sequence number (key based on packet digest) */
@@ -1578,9 +1578,9 @@ BOOL netsec_decode(struct netsec_auth_struct *a, int auth_flags,
sizeof(verf->data8));
/* extract the packet payload */
- dump_data_pw("data :\n", data, data_len);
- netsechash(sealing_key, data, data_len);
- dump_data_pw("datadec:\n", data, data_len);
+ dump_data_pw("data :\n", (const unsigned char *)data, data_len);
+ netsechash(sealing_key, (unsigned char *)data, data_len);
+ dump_data_pw("datadec:\n", (const unsigned char *)data, data_len);
}
/* digest includes 'data' after unsealing */
diff --git a/source3/rpcclient/cmd_ds.c b/source3/rpcclient/cmd_ds.c
index 721bd59ba0..b01236d9a5 100644
--- a/source3/rpcclient/cmd_ds.c
+++ b/source3/rpcclient/cmd_ds.c
@@ -54,7 +54,7 @@ static NTSTATUS cmd_ds_enum_domain_trusts(struct cli_state *cli,
NTSTATUS result;
uint32 flags = 0x1;
DS_DOMAIN_TRUSTS *trusts = NULL;
- int num_domains = 0;
+ unsigned int num_domains = 0;
result = cli_ds_enum_domain_trusts( cli, mem_ctx, cli->desthost, flags,
&trusts, &num_domains );
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index abdedc8f96..6efa9874a0 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -40,7 +40,7 @@ static struct cmd_list {
/****************************************************************************
handle completion of commands for readline
****************************************************************************/
-static char **completion_fn(char *text, int start, int end)
+static char **completion_fn(const char *text, int start, int end)
{
#define MAX_COMPLETIONS 100
char **matches;
@@ -361,7 +361,7 @@ static NTSTATUS cmd_schannel(struct cli_state *cli, TALLOC_CTX *mem_ctx,
static uchar zeros[16];
if (argc == 2) {
- strhex_to_str(cli->auth_info.sess_key,
+ strhex_to_str((char *)cli->auth_info.sess_key,
strlen(argv[1]),
argv[1]);
memcpy(cli->sess_key, cli->auth_info.sess_key, sizeof(cli->sess_key));
diff --git a/source3/sam/idmap_tdb.c b/source3/sam/idmap_tdb.c
index 63d97b656f..8ab8ec8477 100644
--- a/source3/sam/idmap_tdb.c
+++ b/source3/sam/idmap_tdb.c
@@ -108,7 +108,7 @@ static NTSTATUS db_allocate_id(unid_t *id, int id_type)
}
/* fetch a new id and increment it */
- ret = tdb_change_uint32_atomic(idmap_tdb, HWM_USER, &hwm, 1);
+ ret = tdb_change_uint32_atomic(idmap_tdb, HWM_USER, (unsigned int *)&hwm, 1);
if (!ret) {
DEBUG(0, ("idmap_tdb: Fatal error while fetching a new id\n!"));
return NT_STATUS_UNSUCCESSFUL;
@@ -138,7 +138,7 @@ static NTSTATUS db_allocate_id(unid_t *id, int id_type)
}
/* fetch a new id and increment it */
- ret = tdb_change_uint32_atomic(idmap_tdb, HWM_GROUP, &hwm, 1);
+ ret = tdb_change_uint32_atomic(idmap_tdb, HWM_GROUP, (unsigned int *)&hwm, 1);
if (!ret) {
DEBUG(0, ("idmap_tdb: Fatal error while fetching a new id\n!"));
diff --git a/source3/sam/idmap_util.c b/source3/sam/idmap_util.c
index c0a3b65c92..f28e11cde7 100644
--- a/source3/sam/idmap_util.c
+++ b/source3/sam/idmap_util.c
@@ -151,7 +151,7 @@ NTSTATUS idmap_sid_to_uid(const DOM_SID *sid, uid_t *uid, uint32 flags)
flags |= ID_USERID;
- ret = idmap_get_id_from_sid(&id, &flags, sid);
+ ret = idmap_get_id_from_sid(&id, (int *)&flags, sid);
if ( NT_STATUS_IS_OK(ret) ) {
DEBUG(10,("idmap_sid_to_uid: uid = [%lu]\n", (unsigned long)id.uid));
@@ -180,7 +180,7 @@ NTSTATUS idmap_sid_to_gid(const DOM_SID *sid, gid_t *gid, uint32 flags)
flags |= ID_GROUPID;
- ret = idmap_get_id_from_sid(&id, &flags, sid);
+ ret = idmap_get_id_from_sid(&id, (int *)&flags, sid);
if ( NT_STATUS_IS_OK(ret) )
{
diff --git a/source3/utils/net_ads_cldap.c b/source3/utils/net_ads_cldap.c
index e74e4b5a4c..595e6e9434 100644
--- a/source3/utils/net_ads_cldap.c
+++ b/source3/utils/net_ads_cldap.c
@@ -240,7 +240,7 @@ static int recv_cldap_netlogon(int sock, struct cldap_netlogon_reply *reply)
return -1;
}
- p = os3.data;
+ p = (char *)os3.data;
reply->type = IVAL(p, 0); p += 4;
reply->flags = IVAL(p, 0); p += 4;
@@ -248,25 +248,25 @@ static int recv_cldap_netlogon(int sock, struct cldap_netlogon_reply *reply)
memcpy(&reply->guid.info, p, GUID_SIZE);
p += GUID_SIZE;
- p += pull_netlogon_string(reply->forest, p, os3.data);
- p += pull_netlogon_string(reply->unk0, p, os3.data);
- p += pull_netlogon_string(reply->domain, p, os3.data);
- p += pull_netlogon_string(reply->hostname, p, os3.data);
- p += pull_netlogon_string(reply->netbios_domain, p, os3.data);
- p += pull_netlogon_string(reply->unk1, p, os3.data);
- p += pull_netlogon_string(reply->netbios_hostname, p, os3.data);
- p += pull_netlogon_string(reply->unk2, p, os3.data);
+ p += pull_netlogon_string(reply->forest, p, (const char *)os3.data);
+ p += pull_netlogon_string(reply->unk0, p, (const char *)os3.data);
+ p += pull_netlogon_string(reply->domain, p, (const char *)os3.data);
+ p += pull_netlogon_string(reply->hostname, p, (const char *)os3.data);
+ p += pull_netlogon_string(reply->netbios_domain, p, (const char *)os3.data);
+ p += pull_netlogon_string(reply->unk1, p, (const char *)os3.data);
+ p += pull_netlogon_string(reply->netbios_hostname, p, (const char *)os3.data);
+ p += pull_netlogon_string(reply->unk2, p, (const char *)os3.data);
if (reply->type == SAMLOGON_AD_R) {
- p += pull_netlogon_string(reply->user_name, p, os3.data);
+ p += pull_netlogon_string(reply->user_name, p, (const char *)os3.data);
} else {
*reply->user_name = 0;
}
- p += pull_netlogon_string(reply->unk3, p, os3.data);
- p += pull_netlogon_string(reply->site_name, p, os3.data);
- p += pull_netlogon_string(reply->unk4, p, os3.data);
- p += pull_netlogon_string(reply->site_name_2, p, os3.data);
+ p += pull_netlogon_string(reply->unk3, p, (const char *)os3.data);
+ p += pull_netlogon_string(reply->site_name, p, (const char *)os3.data);
+ p += pull_netlogon_string(reply->unk4, p, (const char *)os3.data);
+ p += pull_netlogon_string(reply->site_name_2, p, (const char *)os3.data);
reply->version = IVAL(p, 0);
reply->lmnt_token = SVAL(p, 4);
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index f14ae94906..36d135c73d 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -1986,8 +1986,8 @@ static int rpc_trustdom_list(int argc, const char **argv)
POLICY_HND connect_hnd;
/* trusted domains listing variables */
- int enum_ctx = 0;
- int num_domains, i, pad_len, col_len = 20;
+ unsigned int num_domains, enum_ctx = 0;
+ int i, pad_len, col_len = 20;
DOM_SID *domain_sids;
char **trusted_dom_names;
fstring pdc_name, dummy;
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 4ac125f317..7cd7e0b087 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -310,7 +310,7 @@ static void manage_squid_ntlmssp_request(enum squid_mode squid_mode,
}
DEBUG(10, ("got NTLMSSP packet:\n"));
- dump_data(10, request.data, request.length);
+ dump_data(10, (const char *)request.data, request.length);
nt_status = ntlmssp_server_update(ntlmssp_state, request, &reply);
@@ -503,7 +503,7 @@ static void manage_gss_spnego_request(enum squid_mode squid_mode,
ntlmssp_state->get_global_myname = get_winbind_netbios_name;
DEBUG(10, ("got NTLMSSP packet:\n"));
- dump_data(10, request.negTokenInit.mechToken.data,
+ dump_data(10, (const char *)request.negTokenInit.mechToken.data,
request.negTokenInit.mechToken.length);
response.type = SPNEGO_NEG_TOKEN_TARG;
@@ -915,7 +915,7 @@ static void manage_gss_spnego_client_request(enum squid_mode squid_mode,
/* We asked for a password and obviously got it :-) */
- opt_password = strndup(request.data, request.length);
+ opt_password = strndup((const char *)request.data, request.length);
if (opt_password == NULL) {
DEBUG(1, ("Out of memory\n"));
@@ -1115,8 +1115,8 @@ static BOOL check_auth_crap(void)
&opt_lm_response,
&opt_nt_response,
flags,
- lm_key,
- nt_key,
+ (unsigned char *)lm_key,
+ (unsigned char *)nt_key,
&error_string);
if (!NT_STATUS_IS_OK(nt_status)) {
@@ -1130,7 +1130,7 @@ static BOOL check_auth_crap(void)
if (request_lm_key
&& (memcmp(zeros, lm_key,
sizeof(lm_key)) != 0)) {
- hex_encode(lm_key,
+ hex_encode((const unsigned char *)lm_key,
sizeof(lm_key),
&hex_lm_key);
x_fprintf(x_stdout, "LM_KEY: %s\n", hex_lm_key);
@@ -1139,7 +1139,7 @@ static BOOL check_auth_crap(void)
if (request_nt_key
&& (memcmp(zeros, nt_key,
sizeof(nt_key)) != 0)) {
- hex_encode(nt_key,
+ hex_encode((const unsigned char *)nt_key,
sizeof(nt_key),
&hex_nt_key);
x_fprintf(x_stdout, "NT_KEY: %s\n", hex_nt_key);
@@ -1213,16 +1213,16 @@ static BOOL test_lm(void)
sizeof(lm_key)) != 0) {
DEBUG(1, ("LM Key does not match expectations!\n"));
DEBUG(1, ("lm_key:\n"));
- dump_data(1, lm_key, 8);
+ dump_data(1, (const char *)lm_key, 8);
DEBUG(1, ("expected:\n"));
- dump_data(1, lm_hash, 8);
+ dump_data(1, (const char *)lm_hash, 8);
}
if (memcmp(lm_hash, nt_key, 8) != 0) {
DEBUG(1, ("Session Key (first 8, lm hash) does not match expectations!\n"));
DEBUG(1, ("nt_key:\n"));
- dump_data(1, nt_key, 8);
+ dump_data(1, (const char *)nt_key, 8);
DEBUG(1, ("expected:\n"));
- dump_data(1, lm_hash, 8);
+ dump_data(1, (const char *)lm_hash, 8);
}
return True;
}
@@ -1285,18 +1285,18 @@ static BOOL test_lm_ntlm(void)
sizeof(lm_key)) != 0) {
DEBUG(1, ("LM Key does not match expectations!\n"));
DEBUG(1, ("lm_key:\n"));
- dump_data(1, lm_key, 8);
+ dump_data(1, (const char *)lm_key, 8);
DEBUG(1, ("expected:\n"));
- dump_data(1, lm_hash, 8);
+ dump_data(1, (const char *)lm_hash, 8);
pass = False;
}
if (memcmp(session_key.data, nt_key,
sizeof(nt_key)) != 0) {
DEBUG(1, ("NT Session Key does not match expectations!\n"));
DEBUG(1, ("nt_key:\n"));
- dump_data(1, nt_key, 16);
+ dump_data(1, (const char *)nt_key, 16);
DEBUG(1, ("expected:\n"));
- dump_data(1, session_key.data, session_key.length);
+ dump_data(1, (const char *)session_key.data, session_key.length);
pass = False;
}
return pass;
@@ -1328,10 +1328,10 @@ static BOOL test_ntlm(void)
flags |= WBFLAG_PAM_NTKEY;
SMBNTencrypt(opt_password,chall.data,nt_response.data);
- E_md4hash(opt_password, nt_hash);
- SMBsesskeygen_ntv1(nt_hash, NULL, session_key.data);
+ E_md4hash(opt_password, (unsigned char *)nt_hash);
+ SMBsesskeygen_ntv1((const unsigned char *)nt_hash, NULL, session_key.data);
- E_deshash(opt_password, lm_hash);
+ E_deshash(opt_password, (unsigned char *)lm_hash);
nt_status = contact_winbind_auth_crap(opt_username, opt_domain,
opt_workstation,
@@ -1339,8 +1339,8 @@ static BOOL test_ntlm(void)
NULL,
&nt_response,
flags,
- lm_key,
- nt_key,
+ (unsigned char *)lm_key,
+ (unsigned char *)nt_key,
&error_string);
data_blob_free(&nt_response);
@@ -1368,7 +1368,7 @@ static BOOL test_ntlm(void)
DEBUG(1, ("nt_key:\n"));
dump_data(1, nt_key, 16);
DEBUG(1, ("expected:\n"));
- dump_data(1, session_key.data, session_key.length);
+ dump_data(1, (const char *)session_key.data, session_key.length);
pass = False;
}
return pass;
@@ -1424,17 +1424,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, lm_key, 8);
+ dump_data(1, (const char *)lm_key, 8);
DEBUG(1, ("expected:\n"));
- dump_data(1, lm_hash, 8);
+ dump_data(1, (const char *)lm_hash, 8);
pass = False;
}
if (memcmp(lm_hash, nt_key, 8) != 0) {
DEBUG(1, ("Session Key (first 8 lm hash) does not match expectations!\n"));
DEBUG(1, ("nt_key:\n"));
- dump_data(1, nt_key, 16);
+ dump_data(1, (const char *)nt_key, 16);
DEBUG(1, ("expected:\n"));
- dump_data(1, lm_hash, 8);
+ dump_data(1, (const char *)lm_hash, 8);
pass = False;
}
return pass;
@@ -1466,10 +1466,10 @@ static BOOL test_ntlm_in_both(void)
flags |= WBFLAG_PAM_NTKEY;
SMBNTencrypt(opt_password,chall.data,nt_response.data);
- E_md4hash(opt_password, nt_hash);
- SMBsesskeygen_ntv1(nt_hash, NULL, session_key.data);
+ E_md4hash(opt_password, (unsigned char *)nt_hash);
+ SMBsesskeygen_ntv1((const unsigned char *)nt_hash, NULL, session_key.data);
- E_deshash(opt_password, lm_hash);
+ E_deshash(opt_password, (unsigned char *)lm_hash);
nt_status = contact_winbind_auth_crap(opt_username, opt_domain,
opt_workstation,
@@ -1477,8 +1477,8 @@ static BOOL test_ntlm_in_both(void)
&nt_response,
&nt_response,
flags,
- lm_key,
- nt_key,
+ (unsigned char *)lm_key,
+ (unsigned char *)nt_key,
&error_string);
data_blob_free(&nt_response);
@@ -1506,7 +1506,7 @@ static BOOL test_ntlm_in_both(void)
DEBUG(1, ("nt_key:\n"));
dump_data(1, nt_key, 16);
DEBUG(1, ("expected:\n"));
- dump_data(1, session_key.data, session_key.length);
+ dump_data(1, (const char *)session_key.data, session_key.length);
pass = False;
}
@@ -1568,9 +1568,9 @@ static BOOL test_ntlmv2(void)
sizeof(nt_key)) != 0) {
DEBUG(1, ("NT Session Key does not match expectations!\n"));
DEBUG(1, ("nt_key:\n"));
- dump_data(1, nt_key, 16);
+ dump_data(1, (const char *)nt_key, 16);
DEBUG(1, ("expected:\n"));
- dump_data(1, nt_session_key.data, nt_session_key.length);
+ dump_data(1, (const char *)nt_session_key.data, nt_session_key.length);
pass = False;
}
return pass;
@@ -1632,9 +1632,9 @@ static BOOL test_lmv2_ntlmv2(void)
sizeof(nt_key)) != 0) {
DEBUG(1, ("NT Session Key does not match expectations!\n"));
DEBUG(1, ("nt_key:\n"));
- dump_data(1, nt_key, 16);
+ dump_data(1, (const char *)nt_key, 16);
DEBUG(1, ("expected:\n"));
- dump_data(1, nt_session_key.data, nt_session_key.length);
+ dump_data(1, (const char *)nt_session_key.data, nt_session_key.length);
pass = False;
}
return pass;
@@ -1747,18 +1747,18 @@ static BOOL test_ntlm_broken(BOOL break_lm)
sizeof(lm_key)) != 0) {
DEBUG(1, ("LM Key does not match expectations!\n"));
DEBUG(1, ("lm_key:\n"));
- dump_data(1, lm_key, 8);
+ dump_data(1, (const char *)lm_key, 8);
DEBUG(1, ("expected:\n"));
- dump_data(1, lm_hash, 8);
+ dump_data(1, (const char *)lm_hash, 8);
pass = False;
}
if (memcmp(session_key.data, nt_key,
sizeof(nt_key)) != 0) {
DEBUG(1, ("NT Session Key does not match expectations!\n"));
DEBUG(1, ("nt_key:\n"));
- dump_data(1, nt_key, 16);
+ dump_data(1, (const char *)nt_key, 16);
DEBUG(1, ("expected:\n"));
- dump_data(1, session_key.data, session_key.length);
+ dump_data(1, (const char *)session_key.data, session_key.length);
pass = False;
}
return pass;
diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c
index 23df26d150..3230eb21fc 100644
--- a/source3/utils/profiles.c
+++ b/source3/utils/profiles.c
@@ -448,7 +448,7 @@ static int get_sid(DOM_SID *sid, const unsigned char *sid_str)
SIVAL(&sid->sub_auths[i], 0, auth);
i++;
- lstr = strchr(lstr + 1, '-');
+ lstr = (const unsigned char *)strchr(lstr + 1, '-');
}
return 1;