]> git.ipfire.org Git - thirdparty/samba.git/commit
debug: Set close-on-exec for the main log file FD
authorAndrew Bartlett <abartlet@samba.org>
Mon, 16 Feb 2015 02:59:11 +0000 (15:59 +1300)
committerKarolin Seeger <kseeger@samba.org>
Sun, 1 Mar 2015 20:29:09 +0000 (21:29 +0100)
commit38d6d2047ce8be04c73e510cda54b80ff644018d
tree9487b8b51fcc1188639ed0e1732925ee219c6fb5
parent3a1f881ff6685447210f1b74950cb41372cd43fe
debug: Set close-on-exec for the main log file FD

This does not change the properties of dup2() of the fd as STDERR, however this is closed
before we start smbd or winbindd as child processes.

This is needed otherwise the logfile remains open in the child process, and
logfile rotation can mean this old log remains on disk indefinatly.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11100
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Feb 16 11:42:47 CET 2015 on sn-devel-104

(cherry picked from commit 1d95b0afc3547a91f8558873ce58652c271ed9eb)
lib/util/debug.c
lib/util/wscript_build