summaryrefslogtreecommitdiffstats
path: root/source/rpc_client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-11-03 23:34:24 +0000
committerJeremy Allison <jra@samba.org>2001-11-03 23:34:24 +0000
commitee5e7ca547eff016818ba5c43b8ea0c9fa69b808 (patch)
tree2f375961e5581aeaf0e57e0e9a9ec8125cbcbbe9 /source/rpc_client
parent3bfb828cf70489165b46281bf03ea7074d3ba07d (diff)
downloadsamba-ee5e7ca547eff016818ba5c43b8ea0c9fa69b808.tar.gz
samba-ee5e7ca547eff016818ba5c43b8ea0c9fa69b808.tar.xz
samba-ee5e7ca547eff016818ba5c43b8ea0c9fa69b808.zip
Added NT_USER_TOKEN into server_info to fix extra groups problem.
Got "medieval on our ass" about const warnings (as many as I could :-). Jeremy.
Diffstat (limited to 'source/rpc_client')
-rw-r--r--source/rpc_client/cli_pipe.c14
-rw-r--r--source/rpc_client/cli_use.c2
-rw-r--r--source/rpc_client/ncacn_np_use.c9
3 files changed, 11 insertions, 14 deletions
diff --git a/source/rpc_client/cli_pipe.c b/source/rpc_client/cli_pipe.c
index 9251f879d2d..6eaab39bcc7 100644
--- a/source/rpc_client/cli_pipe.c
+++ b/source/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/source/rpc_client/cli_use.c b/source/rpc_client/cli_use.c
index acdfe46fda5..2809f8c69fd 100644
--- a/source/rpc_client/cli_use.c
+++ b/source/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/source/rpc_client/ncacn_np_use.c b/source/rpc_client/ncacn_np_use.c
index d903b40c144..137be635f7e 100644
--- a/source/rpc_client/ncacn_np_use.c
+++ b/source/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;