summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-12-03 23:36:53 +0000
committerLuke Leighton <lkcl@samba.org>1999-12-03 23:36:53 +0000
commit0ca1f87930a57dfd2510b98443423d8a67cfa70b (patch)
tree3017e6ef3204c58314f8dae4a9042d963a5979fd /source3/rpc_client
parentc2a3b11b0738f57accafe19c84b682f761fa9631 (diff)
downloadsamba-0ca1f87930a57dfd2510b98443423d8a67cfa70b.tar.gz
samba-0ca1f87930a57dfd2510b98443423d8a67cfa70b.tar.bz2
samba-0ca1f87930a57dfd2510b98443423d8a67cfa70b.zip
argh! smb-agent redirection client reusage is a nightmare!
moved smb-agent over to a single-process model instead of fork() in order to reuse client connections. except, of course, you can't do a select() on the same socket connections! argh! (This used to be commit e9e5a34de8e8f9a69e817aceb8c16284334d4642)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_use.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source3/rpc_client/cli_use.c b/source3/rpc_client/cli_use.c
index 131edfeb5b..2072bfe957 100644
--- a/source3/rpc_client/cli_use.c
+++ b/source3/rpc_client/cli_use.c
@@ -159,6 +159,7 @@ static struct cli_use *cli_find(const char* srv_name,
if (!usr_creds->reuse &&
!pwd_compare(&usr_creds->pwd, &c->cli->usr.pwd))
{
+ DEBUG(100,("password doesn't match\n"));
continue;
}
if (usr_creds->domain[0] == 0)
@@ -223,7 +224,7 @@ struct cli_state *cli_net_use_add(const char* srv_name,
}
/* reuse an existing connection requested, and one was not found */
- if (usr_creds != NULL && usr_creds->reuse)
+ if (usr_creds != NULL && usr_creds->reuse && !redir)
{
return False;
}
@@ -290,7 +291,10 @@ BOOL cli_net_use_del(const char* srv_name,
sv_name = &sv_name[2];
}
- *connection_closed = False;
+ if (connection_closed != NULL)
+ {
+ *connection_closed = False;
+ }
for (i = 0; i < num_clis; i++)
{
@@ -322,7 +326,10 @@ BOOL cli_net_use_del(const char* srv_name,
{
cli_use_free(clis[i]);
clis[i] = NULL;
- *connection_closed = True;
+ if (connection_closed != NULL)
+ {
+ *connection_closed = True;
+ }
}
return True;
}