1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3-rpc_server: Added new parametric option 'rpc_server'

Signed-off-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Andreas Schneider 2010-09-14 13:37:46 +02:00
parent 738c843e99
commit 34225c93af
2 changed files with 63 additions and 1 deletions

View File

@ -0,0 +1,46 @@
<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>

View File

@ -458,7 +458,7 @@ static struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
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;
@ -544,8 +544,10 @@ NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
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);
@ -554,7 +556,21 @@ NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
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,