summaryrefslogtreecommitdiff
path: root/source4/smbd/service_named_pipe.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
commit6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch)
tree850c71039563c16a5d563c47e7ba2ab645baf198 /source4/smbd/service_named_pipe.c
parent6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff)
parent2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff)
downloadsamba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source4/smbd/service_named_pipe.c')
-rw-r--r--source4/smbd/service_named_pipe.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/smbd/service_named_pipe.c b/source4/smbd/service_named_pipe.c
index 086a037b69..b000083eec 100644
--- a/source4/smbd/service_named_pipe.c
+++ b/source4/smbd/service_named_pipe.c
@@ -200,14 +200,21 @@ NTSTATUS tstream_setup_named_pipe(TALLOC_CTX *mem_ctx,
goto fail;
}
+ if (!directory_create_or_exist(lpcfg_ncalrpc_dir(lp_ctx), geteuid(), 0755)) {
+ status = map_nt_error_from_unix_common(errno);
+ DEBUG(0,(__location__ ": Failed to create ncalrpc pipe directory '%s' - %s\n",
+ lpcfg_ncalrpc_dir(lp_ctx), nt_errstr(status)));
+ goto fail;
+ }
+
dirname = talloc_asprintf(pipe_sock, "%s/np", lpcfg_ncalrpc_dir(lp_ctx));
if (dirname == NULL) {
goto fail;
}
if (!directory_create_or_exist(dirname, geteuid(), 0700)) {
- status = map_nt_error_from_unix(errno);
- DEBUG(0,(__location__ ": Failed to create stream pipe directory %s - %s\n",
+ status = map_nt_error_from_unix_common(errno);
+ DEBUG(0,(__location__ ": Failed to create stream pipe directory '%s' - %s\n",
dirname, nt_errstr(status)));
goto fail;
}