s3:s3compat Override default pipe forwarding for s3compat s3compat-for-review
authorAndrew Bartlett <abartlet@samba.org>
Thu, 3 Jun 2010 12:32:49 +0000 (22:32 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 12 Jul 2010 04:36:30 +0000 (14:36 +1000)
This allows s3compat to be run without smb.conf options being set.

source3/rpc_server/srv_pipe_hnd.c

index 9ed54a4e1047c484dccf33c0fdb84da6b4f53989..b8e8435cbcfaa218b6143d9ded4ba5cb8fc510b9 100644 (file)
@@ -937,9 +937,13 @@ static struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
                goto fail;
        }
 
+#ifdef ENABLE_S3COMPAT
+       socket_dir = s3compat_ncalrpc_dir();
+#else
        socket_dir = lp_parm_const_string(
                GLOBAL_SECTION_SNUM, "external_rpc_pipe", "socket_dir",
                get_dyn_NCALRPCDIR());
+#endif
        if (socket_dir == NULL) {
                DEBUG(0, ("externan_rpc_pipe:socket_dir not set\n"));
                goto fail;
@@ -1026,7 +1030,12 @@ NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
        const char **proxy_list;
        struct fake_file_handle *handle;
 
-       proxy_list = lp_parm_string_list(-1, "np", "proxy", NULL);
+#ifdef ENABLE_S3COMPAT
+       const char **default_proxy_list = s3compat_default_pipe_list();
+#else
+       const char **default_proxy_list = NULL;
+#endif
+       proxy_list = lp_parm_string_list(-1, "np", "proxy", default_proxy_list);
 
        handle = talloc(mem_ctx, struct fake_file_handle);
        if (handle == NULL) {