From: Jeremy Allison Date: Mon, 4 Oct 2021 21:39:03 +0000 (-0700) Subject: docs-xml: Add "rpc start on demand helpers", true by default. X-Git-Tag: tdb-1.4.6~363 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ffeb18b9a1aac87d5bcec09744c7c90f64fbdbd;p=thirdparty%2Fsamba.git 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 Reviewed-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- 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 @@ + + + + This global parameter determines if samba-dcerpcd + should be started on demand to service named pipe (np) DCE-RPC requests from + smbd or winbindd. This is the + normal case where no startup scripts have been modified to start + samba-dcerpcd as a daemon. + + + If samba-dcerpcd is started as a daemon + or via a system service manager such as systemd, this parameter + MUST be set to "no", otherwise samba-dcerpcd + will fail to start. + + + +yes + 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(); }