summaryrefslogtreecommitdiff
path: root/source3/libsmb/clientgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r--source3/libsmb/clientgen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 218ab67758..176be9948b 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -2938,6 +2938,7 @@ static int cli_init_redirect(struct cli_state *cli,
struct sockaddr_un sa;
fstring ip_name;
struct cli_state cli_redir;
+ fstring path;
pstring data;
uint32 len;
@@ -2945,6 +2946,8 @@ static int cli_init_redirect(struct cli_state *cli,
char *in = cli->inbuf;
char *out = cli->outbuf;
+ slprintf(path, sizeof(path)-1, "/tmp/smb-agent/smb.%d", getuid());
+
if (strequal(srv_name, "*SMBSERVER"))
{
fstrcpy(ip_name, "\\\\");
@@ -2962,8 +2965,7 @@ static int cli_init_redirect(struct cli_state *cli,
ZERO_STRUCT(sa);
sa.sun_family = AF_UNIX;
- safe_strcpy(sa.sun_path, "/tmp/smb-agent/smb.sock",
- sizeof(sa.sun_path)-1);
+ safe_strcpy(sa.sun_path, path, sizeof(sa.sun_path)-1);
DEBUG(10, ("socket open succeeded. file name: %s\n", sa.sun_path));