summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_pipe.c14
-rw-r--r--source3/rpc_client/cli_use.c2
-rw-r--r--source3/rpc_client/ncacn_np_use.c9
3 files changed, 11 insertions, 14 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 9251f879d2..6eaab39bcc 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -896,7 +896,7 @@ BOOL rpc_api_pipe_req(struct cli_state *cli, uint8 op_num,
Set the handle state.
****************************************************************************/
-static BOOL rpc_pipe_set_hnd_state(struct cli_state *cli, char *pipe_name, uint16 device_state)
+static BOOL rpc_pipe_set_hnd_state(struct cli_state *cli, const char *pipe_name, uint16 device_state)
{
BOOL state_set = False;
char param[2];
@@ -940,7 +940,7 @@ static BOOL rpc_pipe_set_hnd_state(struct cli_state *cli, char *pipe_name, uint1
check the rpc bind acknowledge response
****************************************************************************/
-static BOOL valid_pipe_name(char *pipe_name, RPC_IFACE *abstract, RPC_IFACE *transfer)
+static BOOL valid_pipe_name(const char *pipe_name, RPC_IFACE *abstract, RPC_IFACE *transfer)
{
int pipe_idx = 0;
@@ -970,7 +970,7 @@ static BOOL valid_pipe_name(char *pipe_name, RPC_IFACE *abstract, RPC_IFACE *tra
check the rpc bind acknowledge response
****************************************************************************/
-static BOOL check_bind_response(RPC_HDR_BA *hdr_ba, char *pipe_name, RPC_IFACE *transfer)
+static BOOL check_bind_response(RPC_HDR_BA *hdr_ba, const char *pipe_name, RPC_IFACE *transfer)
{
int i = 0;
@@ -1104,7 +1104,7 @@ static BOOL rpc_send_auth_reply(struct cli_state *cli, prs_struct *rdata, uint32
Do an rpc bind.
****************************************************************************/
-BOOL rpc_pipe_bind(struct cli_state *cli, char *pipe_name, char *my_name)
+BOOL rpc_pipe_bind(struct cli_state *cli, const char *pipe_name, char *my_name)
{
RPC_IFACE abstract;
RPC_IFACE transfer;
@@ -1189,16 +1189,16 @@ void cli_nt_set_ntlmssp_flgs(struct cli_state *cli, uint32 ntlmssp_flgs)
Open a session.
****************************************************************************/
-BOOL cli_nt_session_open(struct cli_state *cli, char *pipe_name)
+BOOL cli_nt_session_open(struct cli_state *cli, const char *pipe_name)
{
int fnum;
SMB_ASSERT(cli->nt_pipe_fnum == 0);
if (cli->capabilities & CAP_NT_SMBS) {
- if ((fnum = cli_nt_create(cli, &(pipe_name[5]), DESIRED_ACCESS_PIPE)) == -1) {
+ if ((fnum = cli_nt_create(cli, &pipe_name[5], DESIRED_ACCESS_PIPE)) == -1) {
DEBUG(0,("cli_nt_session_open: cli_nt_create failed on pipe %s to machine %s. Error was %s\n",
- &(pipe_name[5]), cli->desthost, cli_errstr(cli)));
+ &pipe_name[5], cli->desthost, cli_errstr(cli)));
return False;
}
diff --git a/source3/rpc_client/cli_use.c b/source3/rpc_client/cli_use.c
index acdfe46fda..2809f8c69f 100644
--- a/source3/rpc_client/cli_use.c
+++ b/source3/rpc_client/cli_use.c
@@ -170,7 +170,7 @@ static struct cli_use *cli_find(const char *srv_name,
{
continue;
}
- if (!reuse && !pwd_compare((struct pwd_info *)&usr_creds->pwd, &c->cli->pwd))
+ if (!reuse && !pwd_compare(&usr_creds->pwd, &c->cli->pwd))
{
DEBUG(100, ("password doesn't match\n"));
continue;
diff --git a/source3/rpc_client/ncacn_np_use.c b/source3/rpc_client/ncacn_np_use.c
index d903b40c14..137be635f7 100644
--- a/source3/rpc_client/ncacn_np_use.c
+++ b/source3/rpc_client/ncacn_np_use.c
@@ -74,7 +74,7 @@ static BOOL ncacn_np_establish_connection(struct ncacn_np *cli,
return False;
}
/* if (!cli_nt_session_open(cli->smb, pipe_name, &cli->fnum)) by JERRY */
- if (!cli_nt_session_open(cli->smb, (char *)pipe_name))
+ if (!cli_nt_session_open(cli->smb, pipe_name))
{
cli_net_use_del(srv_name, ntc, False, NULL);
return False;
@@ -328,19 +328,16 @@ static struct ncacn_np_use *ncacn_np_find(const char *srv_name,
continue;
}
if (!reuse
- && !pwd_compare((struct pwd_info *)&usr_creds->pwd, &c->cli->smb->pwd))
+ && !pwd_compare(&usr_creds->pwd, &c->cli->smb->pwd))
{
DEBUG(100, ("password doesn't match\n"));
continue;
}
if (usr_creds->domain[0] == 0)
- {
return c;
- }
+
if (strequal(usr_creds->domain, c->cli->smb->domain))
- {
return c;
- }
}
return NULL;