summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-05-17 10:31:14 +0200
committerStefan Metzmacher <metze@samba.org>2011-05-17 11:57:23 +0200
commite0624f773c1c6093fba351e859f411ee09a83c8f (patch)
tree3d674331b666febbb1cd9877153e887b956e5195
parent352de0d3ed77c73897f23f4102d3f40fa4023539 (diff)
downloadsamba-e0624f773c1c6093fba351e859f411ee09a83c8f.tar.gz
samba-e0624f773c1c6093fba351e859f411ee09a83c8f.tar.bz2
samba-e0624f773c1c6093fba351e859f411ee09a83c8f.zip
Revert "s3-rpc_server: Force ncalrpc dir to be mode 755."
This reverts commit a032c9c8fe8aff455407485169b9445860f89606.
-rw-r--r--source3/rpc_server/rpc_server.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index b46c45194b..cb6fbf0b00 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -267,7 +267,13 @@ bool setup_named_pipe_socket(const char *pipe_name,
goto out;
}
- state->fd = create_pipe_sock(np_dir, pipe_name, 0755);
+ if (!directory_create_or_exist(np_dir, geteuid(), 0700)) {
+ DEBUG(0, ("Failed to create pipe directory %s - %s\n",
+ np_dir, strerror(errno)));
+ goto out;
+ }
+
+ state->fd = create_pipe_sock(np_dir, pipe_name, 0700);
if (state->fd == -1) {
DEBUG(0, ("Failed to create pipe socket! [%s/%s]\n",
np_dir, pipe_name));
@@ -885,6 +891,12 @@ bool setup_dcerpc_ncalrpc_socket(struct tevent_context *ev_ctx,
return false;
}
+ 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;
+ }
+
state->fd = create_pipe_sock(lp_ncalrpc_dir(), name, 0755);
if (state->fd == -1) {
DEBUG(0, ("Failed to create pipe socket! [%s/%s]\n",