1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/source4/smbd
Alexander Bokovoy 3e27dc4847 daemons: report status to systemd even when running in foreground
When systemd launches samba services, the configuration we have in
systemd service files expects that the main process (/usr/sbin/*)
would use sd_notify() to report back its status. However, we only use
sd_notify() when running become_daemon().

As a result, samba/smbd/winbindd/nmbd processes never report back its
status and the status updates from other childs (smbd, winbindd, etc)
are not accepted as we now have implied NotifyAccess=main since commit
d1740fb3d5

This leads to a timeout and killing samba process by systemd. Situation
is reproducible in Fedora 33, for example.

Make sure that we have required status updates for all daemons in case
we aren't runnning in interactive mode.

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

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Oct 26 19:58:18 UTC 2020 on sn-devel-184
2020-10-26 19:58:17 +00:00
..
process_model.c source4/smbd: replace DEBUG( with DBG_ 2017-10-19 05:33:10 +02:00
process_model.h source4 smbd prefork: restart on non zero exit code 2018-11-23 08:25:19 +01:00
process_prefork.c s4-smbd: Make use of prctl_set_comment() 2020-02-27 03:42:35 +00:00
process_single.c source4 smbd prefork: restart on non zero exit code 2018-11-23 08:25:19 +01:00
process_standard.c lib/messaging: Move messages_dgm out of source3 2020-05-06 00:06:40 +00:00
server.c daemons: report status to systemd even when running in foreground 2020-10-26 19:58:17 +00:00
service_named_pipe.c source4/smbd: replace DEBUG( with DBG_ 2017-10-19 05:33:10 +02:00
service_stream.c source4 smbd prefork: restart on non zero exit code 2018-11-23 08:25:19 +01:00
service_stream.h source4/smbd: refactor the process model for prefork 2017-10-19 05:33:09 +02:00
service_task.c source4 smbd prefork: restart on non zero exit code 2018-11-23 08:25:19 +01:00
service_task.h source4/smbd: refactor the process model for prefork 2017-10-19 05:33:09 +02:00
service.c lib/util: remove extra safe_string.h file 2020-08-28 02:18:40 +00:00
service.h source4 smbd: pass instance number to post_fork 2018-11-07 17:55:09 +01:00
wscript_build source4/smbd: add a prefork process model. 2017-10-19 05:33:10 +02:00