The branch, master has been updated
       via  cb227d6 s3:rpc_server: create lp_ncalrpc_dir() with 0755 before 
lp_ncalrpc_dir()/np with 0700
       via  e0624f7 Revert "s3-rpc_server: Force ncalrpc dir to be mode 755."
      from  352de0d Fix typos in LDAP schema files

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit cb227d6d1492247d8aff03807cac0b7266202a38
Author: Stefan Metzmacher <[email protected]>
Date:   Tue May 17 10:32:38 2011 +0200

    s3:rpc_server: create lp_ncalrpc_dir() with 0755 before lp_ncalrpc_dir()/np 
with 0700
    
    metze
    
    Autobuild-User: Stefan Metzmacher <[email protected]>
    Autobuild-Date: Tue May 17 13:01:14 CEST 2011 on sn-devel-104

commit e0624f773c1c6093fba351e859f411ee09a83c8f
Author: Stefan Metzmacher <[email protected]>
Date:   Tue May 17 10:31:14 2011 +0200

    Revert "s3-rpc_server: Force ncalrpc dir to be mode 755."
    
    This reverts commit a032c9c8fe8aff455407485169b9445860f89606.

-----------------------------------------------------------------------

Summary of changes:
 source3/rpc_server/rpc_server.c |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index b46c451..3f81a2f 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -261,13 +261,30 @@ 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"));
                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 +902,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",


-- 
Samba Shared Repository

Reply via email to