]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
docs-xml: Add "rpc start on demand helpers", true by default.
authorJeremy Allison <jra@samba.org>
Mon, 4 Oct 2021 21:39:03 +0000 (14:39 -0700)
committerVolker Lendecke <vl@samba.org>
Fri, 10 Dec 2021 14:02:30 +0000 (14:02 +0000)
If "true" allow smbd and winbindd to spawn samba-dcerpcd
as a named pipe helper. Allows upgrade without any change
to smb.conf. If samba-dcerpcd is run as a daemon this
must be set to "false".

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
docs-xml/smbdotconf/rpc/rpcstartondemandhelpers.xml [new file with mode: 0644]
lib/param/loadparm.c
source3/param/loadparm.c

diff --git a/docs-xml/smbdotconf/rpc/rpcstartondemandhelpers.xml b/docs-xml/smbdotconf/rpc/rpcstartondemandhelpers.xml
new file mode 100644 (file)
index 0000000..5f97381
--- /dev/null
@@ -0,0 +1,22 @@
+<samba:parameter name="rpc start on demand helpers"
+                 context="G"
+                 type="boolean"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+       <para>
+               This global parameter determines if <command>samba-dcerpcd</command>
+               should be started on demand to service named pipe (np) DCE-RPC requests from
+               <command>smbd</command> or <command>winbindd</command>. This is the
+               normal case where no startup scripts have been modified to start
+               <command>samba-dcerpcd</command> as a daemon.
+       </para>
+       <para>
+               If <command>samba-dcerpcd</command> is started as a daemon
+               or via a system service manager such as systemd, this parameter
+               MUST be set to "no", otherwise <command>samba-dcerpcd</command>
+               will fail to start.
+       </para>
+</description>
+
+<value type="default">yes</value>
+</samba:parameter>
index a26dabb9fcae89bed3bf4d437c1e3ac67602c250..cae763b44ea4e8c90826fb47bda2528004d6c5d6 100644 (file)
@@ -2999,6 +2999,10 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
                                  "min domain uid",
                                  "1000");
 
+       lpcfg_do_global_parameter(lp_ctx,
+                                 "rpc start on demand helpers",
+                                 "yes");
+
        for (i = 0; parm_table[i].label; i++) {
                if (!(lp_ctx->flags[i] & FLAG_CMDLINE)) {
                        lp_ctx->flags[i] |= FLAG_DEFAULT;
index 5c784400e483928fe12d8796aab9244a05c34ec3..a366870d1fe919f8677e486d24bc87dcf1c5adc6 100644 (file)
@@ -980,6 +980,12 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
 
        Globals.min_domain_uid = 1000;
 
+       /*
+        * By default allow smbd and winbindd to start samba-dcerpcd as
+        * a named-pipe helper.
+        */
+       Globals.rpc_start_on_demand_helpers = true;
+
        /* Now put back the settings that were set with lp_set_cmdline() */
        apply_lp_set_cmdline();
 }