mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
clogd: fix descriptor leak when daemonzing
This commit is contained in:
parent
7b1315411f
commit
003f08c164
@ -1,5 +1,6 @@
|
||||
Version 2.02.100 -
|
||||
================================
|
||||
Fix clogd descriptor leak when daemonizing.
|
||||
Fix clvmd descriptor leak on restart.
|
||||
Add pipe_open/close() to replace less secure popen() glibc call.
|
||||
Fix metadata area offset/size overflow if it's >= 4g and while using lvmetad.
|
||||
|
@ -202,6 +202,12 @@ static void daemonize(void)
|
||||
(dup2(devnull, 2) < 0)) /* reopen stderr */
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
if ((devnull > STDERR_FILENO) && close(devnull)) {
|
||||
LOG_ERROR("Failed to close descriptor %d: %s",
|
||||
devnull, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
LOG_OPEN("cmirrord", LOG_PID, LOG_DAEMON);
|
||||
|
||||
(void) dm_prepare_selinux_context(CMIRRORD_PIDFILE, S_IFREG);
|
||||
|
Loading…
Reference in New Issue
Block a user