summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-03-14 10:56:28 +0100
committerStefan Metzmacher <metze@samba.org>2012-03-14 13:44:41 +0100
commita3e2151edd8fb6a7df41ea508e6d222938fcfe0b (patch)
treeafeea161d0440fe6b48add4eabc010320557f540 /source3/smbd
parent800209aad5b07f9c61d7986971f42ff0f5ade78e (diff)
downloadsamba-a3e2151edd8fb6a7df41ea508e6d222938fcfe0b.tar.gz
samba-a3e2151edd8fb6a7df41ea508e6d222938fcfe0b.tar.bz2
samba-a3e2151edd8fb6a7df41ea508e6d222938fcfe0b.zip
s3:smbd: also create ncalrpc/np directory before forking rpc daemons
After the fixes to directory_create_or_exist(), this should not be needed anymore, but lets try to make autobuild reliable first. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Mar 14 13:44:41 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 22b6a7a134..aa3da1f743 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -988,6 +988,7 @@ extern void build_options(bool screen);
struct tevent_context *ev_ctx;
struct messaging_context *msg_ctx;
struct tevent_signal *se;
+ char *np_dir = NULL;
/*
* Do this before any other talloc operation
@@ -1351,6 +1352,18 @@ extern void build_options(bool screen);
return -1;
}
+ np_dir = talloc_asprintf(talloc_tos(), "%s/np", lp_ncalrpc_dir());
+ if (!np_dir) {
+ DEBUG(0, ("%s: Out of memory\n", __location__));
+ return -1;
+ }
+
+ if (!directory_create_or_exist(np_dir, geteuid(), 0700)) {
+ DEBUG(0, ("Failed to create pipe directory %s - %s\n",
+ np_dir, strerror(errno)));
+ return -1;
+ }
+
if (is_daemon && !interactive) {
if (rpc_epmapper_daemon() == RPC_DAEMON_FORK) {
start_epmd(ev_ctx, msg_ctx);