]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib: Fix losing log prefix or IP change when log process is busy
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 21 Feb 2022 11:39:02 +0000 (12:39 +0100)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 22 Feb 2022 13:55:26 +0000 (14:55 +0100)
commit1bf39637149445df5fa76fe48a75ce7fa36a540b
tree9f44069eab278743fba9034d8536c506ee0d58f8
parent3e8befe6b55e95b777a7da52f446f169bfbb7253
lib: Fix losing log prefix or IP change when log process is busy

The fd for writing to log process is non-blocking. When sending options
to log process, it was done with write_full(), which stopped whenever
EAGAIN was returned. This error was simply ignored, and the logging code
thought that the prefix was successfully changed (or the IP was sent).

This mainly caused a problem when processes were reused and log process
was busy. The prefix update could have failed, and the following logging
would be using the previous session's log prefix, i.e. log lines could have
been logged for the wrong user/session.

Broken by 9372e48b702a3af5705785e08fbf47b0e37f2047
src/lib/failures.c