summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/server.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index d396289e0d..a9762e0b52 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1197,6 +1197,15 @@ extern void build_options(bool screen);
return -1;
}
+ /* This MUST be done before start_epmd() because otherwise
+ * start_epmd() forks and races against dcesrv_ep_setup() to
+ * call directory_create_or_exist() */
+ 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)));
+ return -1;
+ }
+
if (is_daemon && !interactive) {
enum rpc_service_mode_e epm_mode = rpc_epmapper_mode();