s3:s3compat Override default pipe forwarding for s3compat
authorAndrew Bartlett <abartlet@samba.org>
Thu, 3 Jun 2010 12:32:49 +0000 (22:32 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 8 Jun 2010 01:52:18 +0000 (11:52 +1000)
This allows s3compat to be run without smb.conf options being set.

source3/rpc_server/srv_pipe_hnd.c

index e0fa861781d70dbd99fb2e1c5e7f97430348ce51..8544bade8f1c0d43646f4f0953021bb4917a4787 100644 (file)
@@ -866,9 +866,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;
@@ -949,7 +953,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) {