--- /dev/null
+<samba:parameter name="rpc_server"
+ context="G"
+ type="string"
+ advanced="1" print="1"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>
+ Defines what kind of rpc server to use for a named pipe.
+ The rpc_server prefix must be followed by the pipe name, and a value.
+ </para>
+
+ <para>
+ Three possible values are currently supported:
+ <command moreinfo="none">embedded</command>
+ <command moreinfo="none">daemon</command>
+ <command moreinfo="none">external</command>
+ </para>
+
+ <para>
+ The classic method is to run every pipe as an internal function
+ <emphasis>embedded</emphasis> in smbd.
+ </para>
+
+ <para>
+ An alternative method is to fork a <emphasis>daemon</emphasis>
+ early on at smbd startup time. this is supported only for selected
+ pipes.
+ </para>
+
+ <para>
+ Choosing the <emphasis>external</emphasis> option allows to run a
+ completely indipendent (3rd party) server capable of interfacing
+ with samba via the MS-RPC intrerface over named pipes.
+ </para>
+
+ <para>
+ Currently only the spoolss pipe can be configured in
+ <emphasis>daemon</emphasis> mode like this:
+ <programlisting>
+ rpc_server:spoolss = daemon
+ </programlisting>
+ </para>
+</description>
+
+<value type="default">none</value>
+</samba:parameter>
socket_dir = lp_parm_const_string(
GLOBAL_SECTION_SNUM, "external_rpc_pipe", "socket_dir",
- get_dyn_NCALRPCDIR());
+ lp_ncalrpc_dir());
if (socket_dir == NULL) {
DEBUG(0, ("externan_rpc_pipe:socket_dir not set\n"));
goto fail;
struct messaging_context *msg_ctx,
struct fake_file_handle **phandle)
{
+ const char *rpcsrv_type;
const char **proxy_list;
struct fake_file_handle *handle;
+ bool external = false;
proxy_list = lp_parm_string_list(-1, "np", "proxy", NULL);
return NT_STATUS_NO_MEMORY;
}
+ /* Check what is the server type for this pipe.
+ Defaults to "embedded" */
+ rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "rpc_server", name,
+ "embedded");
+ if (StrCaseCmp(rpcsrv_type, "embedded") != 0) {
+ external = true;
+ }
+
+ /* Still support the old method for defining external servers */
if ((proxy_list != NULL) && str_list_check_ci(proxy_list, name)) {
+ external = true;
+ }
+
+ if (external) {
struct np_proxy_state *p;
p = make_external_rpc_pipe_p(handle, name,