The branch, v4-23-test has been updated
       via  1bfd8466f65 ctdb: Fix ctdb startup with inconsistent cluster lock 
settings
       via  84a09551ff8 s3:printing: Load the shares for [printers] in 
samba-bgqd
       via  f420862c9eb docs-xml: Improve the samba-bgqd manpage
      from  15875ce6f0c smbd: Fix CID 1665417, UNUSED_VALUE in 
openat_pathref_fsp_dot()

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-23-test


- Log -----------------------------------------------------------------
commit 1bfd8466f653db2c1768cd53481fa9f0e8815b2f
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-23-test): Jule Anger <[email protected]>
    Autobuild-Date(v4-23-test): Fri Nov 21 16:52:41 UTC 2025 on atb-devel-224

commit 84a09551ff8cb5e86d4f85abe90c34233bdc63b0
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 f420862c9eb0ae021aa36f7485dedceb0e646da9
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 &lt;debug level&gt;</arg>
+               <arg choice="opt">--debug-stdout</arg>
+               <arg choice="opt">--configfile=&lt;configuration file&gt;</arg>
+               <arg choice="opt">--option=&lt;name&gt;=&lt;value&gt;</arg>
+               <arg choice="opt">-l|--log-basename &lt;log directory&gt;</arg>
+               <arg choice="opt">--ready-signal-fd &lt;fd&gt;</arg>
+               <arg choice="opt">--parent-watch-fd &lt;fd&gt;</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

Reply via email to