summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2021-10-04 14:39:03 -0700
committerVolker Lendecke <vl@samba.org>2021-12-10 14:02:30 +0000
commit8ffeb18b9a1aac87d5bcec09744c7c90f64fbdbd (patch)
tree6c9261e5bb16802adf5bb55ae967dbc03497e42b
parenta697814eba925c0a1d7bea8210181adf370436be (diff)
downloadsamba-8ffeb18b9a1aac87d5bcec09744c7c90f64fbdbd.tar.gz
docs-xml: Add "rpc start on demand helpers", true by default.
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>
-rw-r--r--docs-xml/smbdotconf/rpc/rpcstartondemandhelpers.xml22
-rw-r--r--lib/param/loadparm.c4
-rw-r--r--source3/param/loadparm.c6
3 files changed, 32 insertions, 0 deletions
diff --git a/docs-xml/smbdotconf/rpc/rpcstartondemandhelpers.xml b/docs-xml/smbdotconf/rpc/rpcstartondemandhelpers.xml
new file mode 100644
index 00000000000..5f973819f25
--- /dev/null
+++ b/docs-xml/smbdotconf/rpc/rpcstartondemandhelpers.xml
@@ -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>
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index a26dabb9fca..cae763b44ea 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -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;
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 5c784400e48..a366870d1fe 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -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();
}