The Samba-Bugzilla – Attachment 6449 Details for
Bug 8141
wrong permissions on lp_ncalrpc_dir()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Backport Patches for v3-6-test
tmp.diff (text/plain), 3.28 KB, created by
Stefan Metzmacher
on 2011-05-17 11:51:50 UTC
(
hide
)
Description:
Backport Patches for v3-6-test
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2011-05-17 11:51:50 UTC
Size:
3.28 KB
patch
obsolete
>From 5c80f76fb2cfe78a036a9a033d0c33d69ca9ee76 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Sun, 8 May 2011 10:29:27 +0200 >Subject: [PATCH 1/2] ncalrpc: Force ncalrpc dir to be mode 755 in all users > >This allows this directory to be shared between Samba3 and Samba4 in a >Franky-style setup easily. > >Andrew Bartlett >(cherry picked from commit aae9353ecf56323b63da66aa84d8a0a4f219d94d) >--- > source3/rpc_server/rpc_server.c | 4 ++-- > source4/smbd/service_named_pipe.c | 7 +++++++ > 2 files changed, 9 insertions(+), 2 deletions(-) > >diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c >index 681898d..164e0d8 100644 >--- a/source3/rpc_server/rpc_server.c >+++ b/source3/rpc_server/rpc_server.c >@@ -889,13 +889,13 @@ bool setup_dcerpc_ncalrpc_socket(struct tevent_context *ev_ctx, > return false; > } > >- if (!directory_create_or_exist(lp_ncalrpc_dir(), geteuid(), 0700)) { >+ 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, 0700); >+ state->fd = create_pipe_sock(lp_ncalrpc_dir(), name, 0755); > if (state->fd == -1) { > DEBUG(0, ("Failed to create pipe socket! [%s/%s]\n", > lp_ncalrpc_dir(), name)); >diff --git a/source4/smbd/service_named_pipe.c b/source4/smbd/service_named_pipe.c >index 086a037..a1e013d 100644 >--- a/source4/smbd/service_named_pipe.c >+++ b/source4/smbd/service_named_pipe.c >@@ -200,6 +200,13 @@ 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(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; >-- >1.7.0.4 > > >From 30df00658ec36d40636394cd3a8f13e33344613b Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 17 May 2011 10:32:38 +0200 >Subject: [PATCH 2/2] 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 >(cherry picked from commit cb227d6d1492247d8aff03807cac0b7266202a38) >--- > source3/rpc_server/rpc_server.c | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) > >diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c >index 164e0d8..8ec55bb 100644 >--- a/source3/rpc_server/rpc_server.c >+++ b/source3/rpc_server/rpc_server.c >@@ -263,6 +263,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")); >-- >1.7.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
asn
:
review+
Actions:
View
Attachments on
bug 8141
: 6449