The branch, v4-22-test has been updated
via ac715e2e6b3 ctdb: Fix ctdb startup with inconsistent cluster lock
settings
via cbe63c136e1 s3:printing: Load the shares for [printers] in
samba-bgqd
via 9ab05f173f6 docs-xml: Improve the samba-bgqd manpage
from 593b3a43369 smbd: Fix CID 1665417, UNUSED_VALUE in
openat_pathref_fsp_dot()
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-22-test
- Log -----------------------------------------------------------------
commit ac715e2e6b3ddced2939d9976f30f44eb7c0a9fc
Author: Volker Lendecke <[email protected]>
Date: Tue Nov 18 10:31:01 2025 +0100
ctdb: Fix ctdb startup with inconsistent cluster lock settings
ctdb_shutdown_sequence() normally exits. When we end up here, it is
because we have received a reclock callback twice. We can't handle
that, we have already removed "state", which would be referenced deep
in run_start_recovery_event() returning here another time.
The bug is triggered since b84fbd7b3fedc998 introduced a nested event
loop, making ctdb_shutdown_sequence() return into
start_recovery_reclock_callback() due to multiple reclock checks being
triggered somehow (not sure exactly how, but we should not crash under
any circumstance).
Reproducer: Run one ctdb daemon with cluster lock set, try to start
another one without cluster lock set.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15950
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Martin Schwenke <[email protected]>
Autobuild-User(master): Martin Schwenke <[email protected]>
Autobuild-Date(master): Wed Nov 19 03:04:13 UTC 2025 on atb-devel-224
(cherry picked from commit 66ebdb917054f4841f583ee21f910a1869712b53)
Autobuild-User(v4-22-test): Jule Anger <[email protected]>
Autobuild-Date(v4-22-test): Fri Nov 21 14:35:43 UTC 2025 on atb-devel-224
commit cbe63c136e1b7c4db1b37583c9bfb2fc7ddcc3a5
Author: Andreas Schneider <[email protected]>
Date: Thu Oct 23 10:49:31 2025 +0200
s3:printing: Load the shares for [printers] in samba-bgqd
One of the main functions of bgqd is:
delete_and_reload_printers_full()
It isn't able to do its work, if we don't load the shares. Normally bgqd was
forked from smbd and this loaded the shares. But with the introduction of
samba-dcerpcd it is a standalone service now. As a standalone service it is
responsible to load the shares if it needs to work on them.
The following message is printed if delete_and_reload_printers_full() tries
to
do its job:
[2025/10/23 09:57:27, 7, pid=41935, effective(0, 0), real(0, 0)]
../../source3/param/loadparm.c:4419(lp_servicenumber)
lp_servicenumber: couldn't find printers
[2025/10/23 09:57:27, 7, pid=41935, effective(0, 0), real(0, 0)]
../../source3/param/loadparm.c:4419(lp_servicenumber)
lp_servicenumber: couldn't find printers
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15936
Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
(cherry picked from commit 327e60adf2e1e0c040bd32c748fbabc9e4a3593b)
commit 9ab05f173f6229f342899487e81fd0b9254dcc93
Author: Andreas Schneider <[email protected]>
Date: Thu Oct 23 11:00:38 2025 +0200
docs-xml: Improve the samba-bgqd manpage
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15809
Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
Autobuild-User(master): Andreas Schneider <[email protected]>
Autobuild-Date(master): Fri Nov 14 15:05:11 UTC 2025 on atb-devel-224
(cherry picked from commit 9322231f716237abba8627acda62c279c6a90f4f)
-----------------------------------------------------------------------
Summary of changes:
ctdb/server/ctdb_recover.c | 2 ++
docs-xml/manpages/samba-bgqd.8.xml | 37 +++++++++++++++++++++++++++++++------
source3/printing/queue_process.c | 3 +++
3 files changed, 36 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/server/ctdb_recover.c b/ctdb/server/ctdb_recover.c
index 5a40618487e..18dc250f5ce 100644
--- a/ctdb/server/ctdb_recover.c
+++ b/ctdb/server/ctdb_recover.c
@@ -977,6 +977,8 @@ static void start_recovery_reclock_callback(struct
ctdb_context *ctdb,
local == NULL ? "NULL" : local));
talloc_free(state);
ctdb_shutdown_sequence(ctdb, 1);
+ /* In case above returns due to duplicate shutdown */
+ return;
}
DEBUG(DEBUG_INFO,
("Recovery lock consistency check successful\n"));
diff --git a/docs-xml/manpages/samba-bgqd.8.xml
b/docs-xml/manpages/samba-bgqd.8.xml
index ef50a542a9e..9a16a2aaad0 100644
--- a/docs-xml/manpages/samba-bgqd.8.xml
+++ b/docs-xml/manpages/samba-bgqd.8.xml
@@ -14,28 +14,53 @@
<refnamediv>
<refname>samba-bgqd</refname>
<refpurpose>This is an internal helper program performing
- asynchronous printing-related jobs.</refpurpose>
+ asynchronous printing-related tasks</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>samba-bgqd</command>
+ <arg choice="opt">-D|--daemon</arg>
+ <arg choice="opt">-i|--interactive</arg>
+ <arg choice="opt">-F|--foreground</arg>
+ <arg choice="opt">--no-process-group</arg>
+ <arg choice="opt">-d <debug level></arg>
+ <arg choice="opt">--debug-stdout</arg>
+ <arg choice="opt">--configfile=<configuration file></arg>
+ <arg choice="opt">--option=<name>=<value></arg>
+ <arg choice="opt">-l|--log-basename <log directory></arg>
+ <arg choice="opt">--ready-signal-fd <fd></arg>
+ <arg choice="opt">--parent-watch-fd <fd></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
- <para>This tool is part of the
+ <para>This program is part of the
<citerefentry><refentrytitle>samba</refentrytitle>
<manvolnum>7</manvolnum></citerefentry> suite.</para>
- <para>samba-bgqd is an helper program to be spawned by smbd or
- spoolssd to perform jobs like updating the printer list or
- other management tasks asynchronously on demand. It is not
- intended to be called by users or administrators.</para>
+ <para><command>samba-bgqd</command> is not intended to be invoked
+ directly by users.</para>
+
+ <para>Likewise, while <command>samba-bgqd</command> is also not
+ intended to be run manually by system administrators, on systems with a
+ large number of printers configured via CUPS, it is recommended to run
+ <command>samba-bgqd</command> as a systemd service to improve
+ performance and responsiveness of printing operations.</para>
</refsect1>
+<refsect1>
+ <title>SEE ALSO</title>
+
+ <para>
+ <citerefentry><refentrytitle>smbd</refentrytitle>
+ <manvolnum>8</manvolnum></citerefentry>, and
+ <citerefentry><refentrytitle>smb.conf</refentrytitle>
+ <manvolnum>5</manvolnum></citerefentry>.
+ </para>
+</refsect1>
<refsect1>
<title>AUTHOR</title>
diff --git a/source3/printing/queue_process.c b/source3/printing/queue_process.c
index 0f95bd736f2..51eafa31572 100644
--- a/source3/printing/queue_process.c
+++ b/source3/printing/queue_process.c
@@ -265,6 +265,7 @@ static void bq_smb_conf_updated(struct messaging_context
*msg_ctx,
DEBUG(10,("smb_conf_updated: Got message saying smb.conf was "
"updated. Reloading.\n"));
change_to_root_user();
+ lp_load_with_shares(get_dyn_CONFIGFILE());
pcap_cache_reload(state->ev, msg_ctx, reload_pcap_change_notify);
printing_subsystem_queue_tasks(state);
}
@@ -322,6 +323,8 @@ struct bq_state *register_printing_bq_handlers(
goto fail_free_handlers;
}
+ /* Load shares, needed for [printers] */
+ lp_load_with_shares(get_dyn_CONFIGFILE());
/* Initialize the printcap cache as soon as the daemon starts. */
pcap_cache_reload(state->ev, state->msg, reload_pcap_change_notify);
--
Samba Shared Repository