summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-10-18 03:24:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:02 -0500
commit8d7c88667190fe286971ac4fffb64ee5bd9eeeb0 (patch)
treed5b2f0850d63a07e051c03a7abe1f10884598161 /source3/rpc_server
parentafca439d19e3d9e67b127d7060df630e2218bcb2 (diff)
downloadsamba-8d7c88667190fe286971ac4fffb64ee5bd9eeeb0.tar.gz
samba-8d7c88667190fe286971ac4fffb64ee5bd9eeeb0.tar.bz2
samba-8d7c88667190fe286971ac4fffb64ee5bd9eeeb0.zip
r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box. Jeremy. (This used to be commit d720867a788c735e56d53d63265255830ec21208)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_eventlog_lib.c6
-rw-r--r--source3/rpc_server/srv_netlog_nt.c4
-rw-r--r--source3/rpc_server/srv_pipe.c28
-rw-r--r--source3/rpc_server/srv_samr_nt.c15
4 files changed, 26 insertions, 27 deletions
diff --git a/source3/rpc_server/srv_eventlog_lib.c b/source3/rpc_server/srv_eventlog_lib.c
index 495ad8e58c..b21c2a2529 100644
--- a/source3/rpc_server/srv_eventlog_lib.c
+++ b/source3/rpc_server/srv_eventlog_lib.c
@@ -483,7 +483,7 @@ int write_eventlog_tdb( TDB_CONTEXT * the_tdb, Eventlog_entry * ee )
next_record = tdb_fetch_int32( the_tdb, EVT_NEXT_RECORD );
n_packed =
- tdb_pack( packed_ee, ee->record.length + MARGIN,
+ tdb_pack( (char *)packed_ee, ee->record.length + MARGIN,
"ddddddwwwwddddddBBdBBBd", ee->record.length,
ee->record.reserved1, next_record,
ee->record.time_generated, ee->record.time_written,
@@ -512,10 +512,10 @@ int write_eventlog_tdb( TDB_CONTEXT * the_tdb, Eventlog_entry * ee )
/* increment the record count */
kbuf.dsize = sizeof( int32 );
- kbuf.dptr = ( uint8 * ) & next_record;
+ kbuf.dptr = (char * ) & next_record;
ebuf.dsize = n_packed;
- ebuf.dptr = packed_ee;
+ ebuf.dptr = (char *)packed_ee;
if ( tdb_store( the_tdb, kbuf, ebuf, 0 ) ) {
/* DEBUG(1,("write_eventlog_tdb: Can't write record %d to eventlog\n",next_record)); */
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index 2dd8b821d8..f75ad6bba0 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -337,7 +337,7 @@ NTSTATUS _net_auth(pipes_struct *p, NET_Q_AUTH *q_u, NET_R_AUTH *r_u)
creds_server_init(p->dc,
&p->dc->clnt_chal, /* Stored client chal. */
&p->dc->srv_chal, /* Stored server chal. */
- p->dc->mach_pw,
+ (const char *)p->dc->mach_pw,
&srv_chal_out);
/* Check client credentials are valid. */
@@ -414,7 +414,7 @@ NTSTATUS _net_auth_2(pipes_struct *p, NET_Q_AUTH_2 *q_u, NET_R_AUTH_2 *r_u)
creds_server_init(p->dc,
&p->dc->clnt_chal, /* Stored client chal. */
&p->dc->srv_chal, /* Stored server chal. */
- p->dc->mach_pw,
+ (const char *)p->dc->mach_pw,
&srv_chal_out);
/* Check client credentials are valid. */
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 1ca5210842..b615080d34 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -173,7 +173,7 @@ static BOOL create_next_pdu_ntlmssp(pipes_struct *p)
/* Copy the sign/seal padding data. */
if (ss_padding_len) {
- unsigned char pad[8];
+ char pad[8];
memset(pad, '\0', 8);
if (!prs_copy_data_in(&outgoing_pdu, pad, ss_padding_len)) {
@@ -210,9 +210,9 @@ static BOOL create_next_pdu_ntlmssp(pipes_struct *p)
case PIPE_AUTH_LEVEL_PRIVACY:
/* Data portion is encrypted. */
status = ntlmssp_seal_packet(a->ntlmssp_state,
- prs_data_p(&outgoing_pdu) + RPC_HEADER_LEN + RPC_HDR_RESP_LEN,
+ (unsigned char *)prs_data_p(&outgoing_pdu) + RPC_HEADER_LEN + RPC_HDR_RESP_LEN,
data_len + ss_padding_len,
- prs_data_p(&outgoing_pdu),
+ (unsigned char *)prs_data_p(&outgoing_pdu),
(size_t)prs_offset(&outgoing_pdu),
&auth_blob);
if (!NT_STATUS_IS_OK(status)) {
@@ -224,9 +224,9 @@ static BOOL create_next_pdu_ntlmssp(pipes_struct *p)
case PIPE_AUTH_LEVEL_INTEGRITY:
/* Data is signed. */
status = ntlmssp_sign_packet(a->ntlmssp_state,
- prs_data_p(&outgoing_pdu) + RPC_HEADER_LEN + RPC_HDR_RESP_LEN,
+ (unsigned char *)prs_data_p(&outgoing_pdu) + RPC_HEADER_LEN + RPC_HDR_RESP_LEN,
data_len + ss_padding_len,
- prs_data_p(&outgoing_pdu),
+ (unsigned char *)prs_data_p(&outgoing_pdu),
(size_t)prs_offset(&outgoing_pdu),
&auth_blob);
if (!NT_STATUS_IS_OK(status)) {
@@ -241,7 +241,7 @@ static BOOL create_next_pdu_ntlmssp(pipes_struct *p)
}
/* Append the auth blob. */
- if (!prs_copy_data_in(&outgoing_pdu, auth_blob.data, NTLMSSP_SIG_SIZE)) {
+ if (!prs_copy_data_in(&outgoing_pdu, (char *)auth_blob.data, NTLMSSP_SIG_SIZE)) {
DEBUG(0,("create_next_pdu_ntlmssp: failed to add %u bytes auth blob.\n",
(unsigned int)NTLMSSP_SIG_SIZE));
data_blob_free(&auth_blob);
@@ -731,7 +731,7 @@ BOOL api_pipe_bind_auth3(pipes_struct *p, prs_struct *rpc_in_p)
blob = data_blob(NULL,p->hdr.auth_len);
- if (!prs_copy_data_out(blob.data, rpc_in_p, p->hdr.auth_len)) {
+ if (!prs_copy_data_out((char *)blob.data, rpc_in_p, p->hdr.auth_len)) {
DEBUG(0,("api_pipe_bind_auth3: Failed to pull %u bytes - the response blob.\n",
(unsigned int)p->hdr.auth_len ));
goto err;
@@ -1036,7 +1036,7 @@ static BOOL pipe_spnego_auth_bind_negotiate(pipes_struct *p, prs_struct *rpc_in_
/* Grab the SPNEGO blob. */
blob = data_blob(NULL,p->hdr.auth_len);
- if (!prs_copy_data_out(blob.data, rpc_in_p, p->hdr.auth_len)) {
+ if (!prs_copy_data_out((char *)blob.data, rpc_in_p, p->hdr.auth_len)) {
DEBUG(0,("pipe_spnego_auth_bind_negotiate: Failed to pull %u bytes - the SPNEGO auth header.\n",
(unsigned int)p->hdr.auth_len ));
goto err;
@@ -1103,7 +1103,7 @@ static BOOL pipe_spnego_auth_bind_negotiate(pipes_struct *p, prs_struct *rpc_in_
goto err;
}
- if (!prs_copy_data_in(pout_auth, response.data, response.length)) {
+ if (!prs_copy_data_in(pout_auth, (char *)response.data, response.length)) {
DEBUG(0,("pipe_spnego_auth_bind_negotiate: marshalling of data blob failed.\n"));
goto err;
}
@@ -1154,7 +1154,7 @@ static BOOL pipe_spnego_auth_bind_continue(pipes_struct *p, prs_struct *rpc_in_p
/* Grab the SPNEGO blob. */
spnego_blob = data_blob(NULL,p->hdr.auth_len);
- if (!prs_copy_data_out(spnego_blob.data, rpc_in_p, p->hdr.auth_len)) {
+ if (!prs_copy_data_out((char *)spnego_blob.data, rpc_in_p, p->hdr.auth_len)) {
DEBUG(0,("pipe_spnego_auth_bind_continue: Failed to pull %u bytes - the SPNEGO auth header.\n",
(unsigned int)p->hdr.auth_len ));
goto err;
@@ -1306,13 +1306,13 @@ static BOOL pipe_ntlmssp_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
/* Grab the NTLMSSP blob. */
blob = data_blob(NULL,p->hdr.auth_len);
- if (!prs_copy_data_out(blob.data, rpc_in_p, p->hdr.auth_len)) {
+ if (!prs_copy_data_out((char *)blob.data, rpc_in_p, p->hdr.auth_len)) {
DEBUG(0,("pipe_ntlmssp_auth_bind: Failed to pull %u bytes - the NTLM auth header.\n",
(unsigned int)p->hdr.auth_len ));
goto err;
}
- if (strncmp(blob.data, "NTLMSSP", 7) != 0) {
+ if (strncmp((char *)blob.data, "NTLMSSP", 7) != 0) {
DEBUG(0,("pipe_ntlmssp_auth_bind: Failed to read NTLMSSP in blob\n"));
goto err;
}
@@ -1341,7 +1341,7 @@ static BOOL pipe_ntlmssp_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
goto err;
}
- if (!prs_copy_data_in(pout_auth, response.data, response.length)) {
+ if (!prs_copy_data_in(pout_auth, (char *)response.data, response.length)) {
DEBUG(0,("pipe_ntlmssp_auth_bind: marshalling of data blob failed.\n"));
goto err;
}
@@ -1896,7 +1896,7 @@ BOOL api_pipe_ntlmssp_auth_process(pipes_struct *p, prs_struct *rpc_in,
return False;
}
- auth_blob.data = prs_data_p(rpc_in) + prs_offset(rpc_in);
+ auth_blob.data = (unsigned char *)prs_data_p(rpc_in) + prs_offset(rpc_in);
auth_blob.length = auth_len;
switch (p->auth.auth_level) {
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 26a691e9b4..45a77197ee 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -1688,9 +1688,9 @@ NTSTATUS _samr_query_usergroups(pipes_struct *p, SAMR_Q_QUERY_USERGROUPS *q_u, S
DOM_SID sid;
DOM_SID *sids;
DOM_GID *gids = NULL;
- int num_groups = 0;
+ size_t num_groups = 0;
gid_t *unix_gids;
- int i, num_gids;
+ size_t i, num_gids;
uint32 acc_granted;
BOOL ret;
NTSTATUS result;
@@ -2988,10 +2988,10 @@ NTSTATUS _samr_set_userinfo2(pipes_struct *p, SAMR_Q_SET_USERINFO2 *q_u, SAMR_R_
NTSTATUS _samr_query_useraliases(pipes_struct *p, SAMR_Q_QUERY_USERALIASES *q_u, SAMR_R_QUERY_USERALIASES *r_u)
{
- int num_alias_rids;
+ size_t num_alias_rids;
uint32 *alias_rids;
struct samr_info *info = NULL;
- int i;
+ size_t i;
NTSTATUS ntstatus1;
NTSTATUS ntstatus2;
@@ -3052,9 +3052,8 @@ NTSTATUS _samr_query_useraliases(pipes_struct *p, SAMR_Q_QUERY_USERALIASES *q_u,
NTSTATUS _samr_query_aliasmem(pipes_struct *p, SAMR_Q_QUERY_ALIASMEM *q_u, SAMR_R_QUERY_ALIASMEM *r_u)
{
- int i;
-
- int num_sids = 0;
+ size_t i;
+ size_t num_sids = 0;
DOM_SID2 *sid;
DOM_SID *sids=NULL;
@@ -3165,7 +3164,7 @@ NTSTATUS _samr_query_groupmem(pipes_struct *p, SAMR_Q_QUERY_GROUPMEM *q_u, SAMR_
{
DOM_SID group_sid;
fstring group_sid_str;
- int i, num_members;
+ size_t i, num_members;
uint32 *rid=NULL;
uint32 *attr=NULL;