diff options
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_netlogon.c | 10 | ||||
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 20 |
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); |