printing/bgqd: Disable systemd notifications
authorFeRD (Frank Dana) <ferdnyc@gmail.com>
Tue, 25 Jan 2022 03:14:31 +0000 (22:14 -0500)
committerJule Anger <janger@samba.org>
Sun, 30 Jan 2022 10:57:11 +0000 (10:57 +0000)
samba-bgqd daemon is started by existing Samba daemons. When running
under systemd, those daemons control systemd notifications and
samba-bgqd messages need to be silenced.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14947

Signed-off-by: FeRD (Frank Dana) <ferdnyc@gmail.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 36c861e25b1d9c5ce44bfcb46247e7e4747930c5)

source3/printing/samba-bgqd.c

index f21327fc6229fb75917d505caf79293ecaac5f39..59ed0cc40dbaa73e8b5e301693758fd3b7c6b8e5 100644 (file)
@@ -252,6 +252,9 @@ int main(int argc, const char *argv[])
 
        log_stdout = (debug_get_log_type() == DEBUG_STDOUT);
 
+       /* main process will notify systemd */
+       daemon_sd_notifications(false);
+
        if (!cmdline_daemon_cfg->fork) {
                daemon_status(progname, "Starting process ... ");
        } else {