summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-12-03 18:16:08 +0000
committerLuke Leighton <lkcl@samba.org>1999-12-03 18:16:08 +0000
commit7d01f964ff3c1a11bd72d987312f9826fee1c124 (patch)
tree74a89a0a240cd6fd8389efd569e7ba9a3415018a /source3/rpc_client
parent69683dc27a8eab7a97f580050c71ab64f1d58987 (diff)
downloadsamba-7d01f964ff3c1a11bd72d987312f9826fee1c124.tar.gz
samba-7d01f964ff3c1a11bd72d987312f9826fee1c124.tar.bz2
samba-7d01f964ff3c1a11bd72d987312f9826fee1c124.zip
cool! a unix socket smb redirector. code based on smbfilter and
ideas from ssh-agent. the intent is to be able to share smb sessions using cli_net_use_add() across multiple processes, where one process knows the target server name, user name and domain, but not the smb password. (This used to be commit 294b653f2e9cdc1864ec638ae8b4300df25723cf)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_connect.c2
-rw-r--r--source3/rpc_client/cli_use.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_connect.c b/source3/rpc_client/cli_connect.c
index 6f63d5356f..147be96ba4 100644
--- a/source3/rpc_client/cli_connect.c
+++ b/source3/rpc_client/cli_connect.c
@@ -96,7 +96,7 @@ static struct cli_connection *cli_con_get(const char* srv_name,
con->pipe_name = strdup(pipe_name);
}
- con->cli = cli_net_use_add(srv_name, usr_creds);
+ con->cli = cli_net_use_add(srv_name, usr_creds, True);
if (con->cli == NULL)
{
diff --git a/source3/rpc_client/cli_use.c b/source3/rpc_client/cli_use.c
index 17458ffacd..31e3b69b2e 100644
--- a/source3/rpc_client/cli_use.c
+++ b/source3/rpc_client/cli_use.c
@@ -204,7 +204,8 @@ static struct cli_use *cli_use_get(const char* srv_name,
init client state
****************************************************************************/
struct cli_state *cli_net_use_add(const char* srv_name,
- const struct user_credentials *usr_creds)
+ const struct user_credentials *usr_creds,
+ BOOL redir)
{
struct nmb_name calling;
struct nmb_name called;
@@ -225,6 +226,7 @@ struct cli_state *cli_net_use_add(const char* srv_name,
*/
cli = cli_use_get(srv_name, usr_creds);
+ cli->cli->redirect = redir;
if (resolve_srv_name(srv_name, dest_host, &ip))
{