summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-05-17 10:32:38 +0200
committerStefan Metzmacher <metze@samba.org>2011-05-17 13:01:14 +0200
commitcb227d6d1492247d8aff03807cac0b7266202a38 (patch)
tree58d19ecf0c6dd4589147247b4ba225bba11e7ee9 /source3/rpc_server
parente0624f773c1c6093fba351e859f411ee09a83c8f (diff)
downloadsamba-cb227d6d1492247d8aff03807cac0b7266202a38.tar.gz
samba-cb227d6d1492247d8aff03807cac0b7266202a38.tar.bz2
samba-cb227d6d1492247d8aff03807cac0b7266202a38.zip
s3:rpc_server: create lp_ncalrpc_dir() with 0755 before lp_ncalrpc_dir()/np with 0700
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue May 17 13:01:14 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/rpc_server.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index cb6fbf0b00..3f81a2ff38 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -261,6 +261,17 @@ bool setup_named_pipe_socket(const char *pipe_name,
}
state->fd = -1;
+ /*
+ * As lp_ncalrpc_dir() should have 0755, but
+ * lp_ncalrpc_dir()/np should have 0700, we need to
+ * create lp_ncalrpc_dir() first.
+ */
+ if (!directory_create_or_exist(lp_ncalrpc_dir(), geteuid(), 0755)) {
+ DEBUG(0, ("Failed to create pipe directory %s - %s\n",
+ lp_ncalrpc_dir(), strerror(errno)));
+ goto out;
+ }
+
np_dir = talloc_asprintf(state, "%s/np", lp_ncalrpc_dir());
if (!np_dir) {
DEBUG(0, ("Out of memory\n"));