s4:samba: Allow samba daemon to run in foreground
commit39922b5a6fa830fcf507354ae6c0a30be0a077cc
authorAndreas Schneider <asn@samba.org>
Fri, 10 Nov 2017 08:18:18 +0000 (10 09:18 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 30 Nov 2017 13:11:02 +0000 (30 14:11 +0100)
treeed429c18b81de2ee83a93d2177c92059a77230eb
parent6182708d014e1c2b48eb3d5085eff23c35aba6b6
s4:samba: Allow samba daemon to run in foreground

We are passing the no_process_group to become_daemon() that setsid() is
not called. In case we are double forking, we run in SysV daemon mode,
setsid() should be called!

See:
https://www.freedesktop.org/software/systemd/man/daemon.html

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 8736013dc42c5755b75bbb2e843a290bcd545909)

Autobuild-User(v4-7-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-7-test): Thu Nov 30 14:11:02 CET 2017 on sn-devel-144
source3/smbd/server.c
source4/smbd/server.c