summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_echo.c8
-rw-r--r--source3/rpc_parse/parse_net.c22
-rw-r--r--source3/rpc_parse/parse_prs.c16
-rw-r--r--source3/rpc_parse/parse_reg.c2
-rw-r--r--source3/rpc_parse/parse_samr.c12
-rw-r--r--source3/rpc_parse/parse_spoolss.c10
6 files changed, 39 insertions, 31 deletions
diff --git a/source3/rpc_parse/parse_echo.c b/source3/rpc_parse/parse_echo.c
index 67f9ad772e..4b1ff1f4d5 100644
--- a/source3/rpc_parse/parse_echo.c
+++ b/source3/rpc_parse/parse_echo.c
@@ -73,7 +73,7 @@ BOOL echo_io_q_echo_data(const char *desc, ECHO_Q_ECHO_DATA *q_d,
return False;
}
- if (!prs_uint8s(False, "data", ps, depth, q_d->data, q_d->size))
+ if (!prs_uint8s(False, "data", ps, depth, (unsigned char *)q_d->data, q_d->size))
return False;
return True;
@@ -92,7 +92,7 @@ BOOL echo_io_r_echo_data(const char *desc, ECHO_R_ECHO_DATA *q_d,
return False;
}
- if (!prs_uint8s(False, "data", ps, depth, q_d->data, q_d->size))
+ if (!prs_uint8s(False, "data", ps, depth, (unsigned char *)q_d->data, q_d->size))
return False;
return True;
@@ -120,7 +120,7 @@ BOOL echo_io_q_sink_data(const char *desc, ECHO_Q_SINK_DATA *q_d,
return False;
}
- if (!prs_uint8s(False, "data", ps, depth, q_d->data, q_d->size))
+ if (!prs_uint8s(False, "data", ps, depth, (unsigned char *)q_d->data, q_d->size))
return False;
return True;
@@ -159,7 +159,7 @@ BOOL echo_io_r_source_data(const char *desc, ECHO_R_SOURCE_DATA *q_d,
return False;
}
- if (!prs_uint8s(False, "data", ps, depth, q_d->data, q_d->size))
+ if (!prs_uint8s(False, "data", ps, depth, (unsigned char *)q_d->data, q_d->size))
return False;
return True;
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 804da707de..dd319df5a0 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -801,7 +801,7 @@ void init_q_srv_pwset(NET_Q_SRV_PWSET *q_s,
DEBUG(5,("init_q_srv_pwset\n"));
/* Process the new password. */
- cred_hash3( nt_cypher, hashed_mach_pwd, sess_key, 1);
+ cred_hash3( nt_cypher, hashed_mach_pwd, (const unsigned char *)sess_key, 1);
init_clnt_info(&q_s->clnt_id, logon_srv, acct_name, sec_chan, comp_name, cred);
@@ -2447,6 +2447,10 @@ static BOOL net_io_sam_policy_info(const char *desc, SAM_DELTA_POLICY *info,
return True;
}
+#if 0
+
+/* This function is pretty broken - see bug #334 */
+
/*******************************************************************
reads or writes a structure.
********************************************************************/
@@ -2495,6 +2499,12 @@ static BOOL net_io_sam_trustdoms_info(const char *desc, SAM_DELTA_TRUSTDOMS *inf
return True;
}
+#endif
+
+#if 0
+
+/* This function doesn't work - see bug #334 */
+
/*******************************************************************
reads or writes a structure.
********************************************************************/
@@ -2582,6 +2592,8 @@ static BOOL net_io_sam_secret_info(const char *desc, SAM_DELTA_SECRET *info,
return True;
}
+#endif
+
/*******************************************************************
reads or writes a structure.
********************************************************************/
@@ -2726,14 +2738,10 @@ static BOOL net_io_sam_delta_ctr(const char *desc, uint8 sess_key[16],
return False;
break;
- case SAM_DELTA_TRUST_DOMS:
- if (!net_io_sam_trustdoms_info("", &delta->trustdoms_info, ps, depth))
- return False;
- break;
+ /* These guys are implemented but broken */
+ case SAM_DELTA_TRUST_DOMS:
case SAM_DELTA_SECRET_INFO:
- if (!net_io_sam_secret_info("", &delta->secret_info, ps, depth))
- return False;
break;
/* These guys are not implemented yet */
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 11d8658b15..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));
@@ -1429,7 +1429,7 @@ static void netsec_get_sealing_key(struct netsec_auth_struct *a,
dump_data_pw("sess_kf0:\n", sess_kf0, sizeof(sess_kf0));
- /* MD5 of sess_kf0 and the high bytes of the sequence number */
+ /* MD5 of sess_kf0 and 4 zero bytes */
hmac_md5(sess_kf0, zeros, 0x4, digest2);
dump_data_pw("digest2:\n", digest2, sizeof(digest2));
@@ -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/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c
index b4d20bf2ba..bbf6e6a8e3 100644
--- a/source3/rpc_parse/parse_reg.c
+++ b/source3/rpc_parse/parse_reg.c
@@ -40,7 +40,7 @@ static uint32 reg_init_buffer2( BUFFER2 *buf2, REGISTRY_VALUE *val )
return 0;
real_size = regval_size(val);
- init_buffer2( buf2, (char*)regval_data_p(val), real_size );
+ init_buffer2( buf2, (unsigned char*)regval_data_p(val), real_size );
return real_size;
}
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index fce3195225..1fe9b3231f 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -183,9 +183,9 @@ BOOL samr_io_r_lookup_domain(const char *desc, SAMR_R_LOOKUP_DOMAIN * r_u,
reads or writes a structure.
********************************************************************/
-void init_samr_q_unknown_2d(SAMR_Q_UNKNOWN_2D * q_u, POLICY_HND *dom_pol, DOM_SID *sid)
+void init_samr_q_remove_user_foreign_domain(SAMR_Q_REMOVE_USER_FOREIGN_DOMAIN * q_u, POLICY_HND *dom_pol, DOM_SID *sid)
{
- DEBUG(5, ("samr_init_samr_q_unknown_2d\n"));
+ DEBUG(5, ("samr_init_samr_q_remove_user_foreign_domain\n"));
q_u->dom_pol = *dom_pol;
init_dom_sid2(&q_u->sid, sid);
@@ -195,13 +195,13 @@ void init_samr_q_unknown_2d(SAMR_Q_UNKNOWN_2D * q_u, POLICY_HND *dom_pol, DOM_SI
reads or writes a structure.
********************************************************************/
-BOOL samr_io_q_unknown_2d(const char *desc, SAMR_Q_UNKNOWN_2D * q_u,
+BOOL samr_io_q_remove_user_foreign_domain(const char *desc, SAMR_Q_REMOVE_USER_FOREIGN_DOMAIN * q_u,
prs_struct *ps, int depth)
{
if (q_u == NULL)
return False;
- prs_debug(ps, depth, desc, "samr_io_q_unknown_2d");
+ prs_debug(ps, depth, desc, "samr_io_q_remove_user_foreign_domain");
depth++;
if(!prs_align(ps))
@@ -223,13 +223,13 @@ BOOL samr_io_q_unknown_2d(const char *desc, SAMR_Q_UNKNOWN_2D * q_u,
reads or writes a structure.
********************************************************************/
-BOOL samr_io_r_unknown_2d(const char *desc, SAMR_R_UNKNOWN_2D * r_u,
+BOOL samr_io_r_remove_user_foreign_domain(const char *desc, SAMR_R_REMOVE_USER_FOREIGN_DOMAIN * r_u,
prs_struct *ps, int depth)
{
if (r_u == NULL)
return False;
- prs_debug(ps, depth, desc, "samr_io_r_unknown_2d");
+ prs_debug(ps, depth, desc, "samr_io_r_remove_user_foreign_domain");
depth++;
if(!prs_align(ps))
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 1a380c64d5..7ca9bccab4 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -1368,7 +1368,7 @@ BOOL spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u,
return False;
if (UNMARSHALLING(ps) && r_u->size) {
- r_u->data = prs_alloc_mem(ps, r_u->size);
+ r_u->data = (unsigned char *)prs_alloc_mem(ps, r_u->size);
if(!r_u->data)
return False;
}
@@ -6178,7 +6178,7 @@ BOOL make_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA *q_u, const POLICY_HND
init_unistr2(&q_u->value, value, strlen(value)+1);
q_u->max_len = q_u->real_len = data_size;
- q_u->data = data;
+ q_u->data = (unsigned char *)data;
return True;
}
@@ -6195,7 +6195,7 @@ BOOL make_spoolss_q_setprinterdataex(SPOOL_Q_SETPRINTERDATAEX *q_u, const POLICY
init_unistr2(&q_u->key, key, strlen(key)+1);
q_u->max_len = q_u->real_len = data_size;
- q_u->data = data;
+ q_u->data = (unsigned char *)data;
return True;
}
@@ -6990,7 +6990,7 @@ BOOL spoolss_io_r_getprinterdataex(const char *desc, SPOOL_R_GETPRINTERDATAEX *r
return False;
if (UNMARSHALLING(ps) && r_u->size) {
- r_u->data = prs_alloc_mem(ps, r_u->size);
+ r_u->data = (unsigned char *)prs_alloc_mem(ps, r_u->size);
if(!r_u->data)
return False;
}
@@ -7689,7 +7689,7 @@ BOOL make_spoolss_q_writeprinter(SPOOL_Q_WRITEPRINTER *q_u,
{
memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
q_u->buffer_size = q_u->buffer_size2 = data_size;
- q_u->buffer = data;
+ q_u->buffer = (unsigned char *)data;
return True;
}