summaryrefslogtreecommitdiff
path: root/source3/rpc_client
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_client
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_client')
-rw-r--r--source3/rpc_client/cli_netlogon.c10
-rw-r--r--source3/rpc_client/cli_pipe.c20
2 files changed, 15 insertions, 15 deletions
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index 88b6c792eb..968c2182be 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -255,7 +255,7 @@ NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli,
const char *server_name,
const char *domain,
const char *machine_account,
- const char machine_pwd[16],
+ const unsigned char machine_pwd[16],
uint32 sec_chan_type,
uint32 *neg_flags_inout)
{
@@ -435,8 +435,8 @@ NTSTATUS rpccli_netlogon_sam_sync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
creds_client_step(cli->dc, &clnt_creds);
- prs_set_session_key(&qbuf, cli->dc->sess_key);
- prs_set_session_key(&rbuf, cli->dc->sess_key);
+ prs_set_session_key(&qbuf, (const char *)cli->dc->sess_key);
+ prs_set_session_key(&rbuf, (const char *)cli->dc->sess_key);
init_net_q_sam_sync(&q, cli->dc->remote_machine, global_myname(),
&clnt_creds, &ret_creds, database_id, next_rid);
@@ -564,7 +564,7 @@ NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli,
0, /* param_ctrl */
0xdead, 0xbeef, /* LUID? */
username, clnt_name_slash,
- cli->dc->sess_key, lm_owf_user_pwd,
+ (const char *)cli->dc->sess_key, lm_owf_user_pwd,
nt_owf_user_pwd);
break;
@@ -740,7 +740,7 @@ LSA Server Password Set.
****************************************************************************/
NTSTATUS rpccli_net_srv_pwset(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- const char *machine_name, uint8 hashed_mach_pwd[16])
+ const char *machine_name, const uint8 hashed_mach_pwd[16])
{
prs_struct rbuf;
prs_struct qbuf;
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 3b411272c3..e1e502794c 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -250,7 +250,7 @@ static NTSTATUS cli_pipe_verify_ntlmssp(struct rpc_pipe_client *cli, RPC_HDR *pr
data = (unsigned char *)(prs_data_p(current_pdu) + RPC_HEADER_LEN + RPC_HDR_RESP_LEN);
data_len = (size_t)(prhdr->frag_len - RPC_HEADER_LEN - RPC_HDR_RESP_LEN - RPC_HDR_AUTH_LEN - auth_len);
- full_packet_data = prs_data_p(current_pdu);
+ full_packet_data = (unsigned char *)prs_data_p(current_pdu);
full_packet_data_len = prhdr->frag_len - auth_len;
/* Pull the auth header and the following data into a blob. */
@@ -265,7 +265,7 @@ static NTSTATUS cli_pipe_verify_ntlmssp(struct rpc_pipe_client *cli, RPC_HDR *pr
return NT_STATUS_BUFFER_TOO_SMALL;
}
- auth_blob.data = prs_data_p(current_pdu) + prs_offset(current_pdu);
+ auth_blob.data = (unsigned char *)prs_data_p(current_pdu) + prs_offset(current_pdu);
auth_blob.length = auth_len;
switch (cli->auth.auth_level) {
@@ -1143,7 +1143,7 @@ static NTSTATUS create_bind_or_alt_ctx_internal(uint8 pkt_type,
if(auth_len != 0) {
if (ss_padding_len) {
- unsigned char pad[8];
+ char pad[8];
memset(pad, '\0', 8);
if (!prs_copy_data_in(rpc_out, pad, ss_padding_len)) {
DEBUG(0,("create_bind_or_alt_ctx_internal: failed to marshall padding.\n"));
@@ -1272,9 +1272,9 @@ static NTSTATUS add_ntlmssp_auth_footer(struct rpc_pipe_client *cli,
case PIPE_AUTH_LEVEL_PRIVACY:
/* Data portion is encrypted. */
status = ntlmssp_seal_packet(cli->auth.a_u.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_and_pad_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)) {
@@ -1286,9 +1286,9 @@ static NTSTATUS add_ntlmssp_auth_footer(struct rpc_pipe_client *cli,
case PIPE_AUTH_LEVEL_INTEGRITY:
/* Data is signed. */
status = ntlmssp_sign_packet(cli->auth.a_u.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_and_pad_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)) {
@@ -1306,7 +1306,7 @@ static NTSTATUS add_ntlmssp_auth_footer(struct rpc_pipe_client *cli,
/* Finally marshall the blob. */
- if (!prs_copy_data_in(outgoing_pdu, auth_blob.data, NTLMSSP_SIG_SIZE)) {
+ if (!prs_copy_data_in(outgoing_pdu, (const char *)auth_blob.data, NTLMSSP_SIG_SIZE)) {
DEBUG(0,("add_ntlmssp_auth_footer: failed to add %u bytes auth blob.\n",
(unsigned int)NTLMSSP_SIG_SIZE));
data_blob_free(&auth_blob);
@@ -2391,7 +2391,7 @@ static struct rpc_pipe_client *get_schannel_session_key(struct cli_state *cli,
uint32 neg_flags = NETLOGON_NEG_AUTH2_FLAGS|NETLOGON_NEG_SCHANNEL;
struct rpc_pipe_client *netlogon_pipe = NULL;
uint32 sec_chan_type = 0;
- char machine_pwd[16];
+ unsigned char machine_pwd[16];
fstring machine_account;
netlogon_pipe = cli_rpc_pipe_open_noauth(cli, PI_NETLOGON, perr);
@@ -2513,7 +2513,7 @@ static struct rpc_pipe_client *get_schannel_session_key_auth_ntlmssp(struct cli_
uint32 neg_flags = NETLOGON_NEG_AUTH2_FLAGS|NETLOGON_NEG_SCHANNEL;
struct rpc_pipe_client *netlogon_pipe = NULL;
uint32 sec_chan_type = 0;
- char machine_pwd[16];
+ unsigned char machine_pwd[16];
fstring machine_account;
netlogon_pipe = cli_rpc_pipe_open_spnego_ntlmssp(cli, PI_NETLOGON, PIPE_AUTH_LEVEL_PRIVACY, domain, username, password, perr);