]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Mon, 17 Aug 2020 10:07:49 +0000 (13:07 +0300)]
imap-hibernate: Preserve local_port and remote_port during hibernation
Timo Sirainen [Mon, 17 Aug 2020 09:47:53 +0000 (12:47 +0300)]
imap: Log ID and logout info lines via imap_client.event
This doesn't change the logging output at all.
Timo Sirainen [Mon, 17 Aug 2020 09:45:08 +0000 (12:45 +0300)]
imap: Log imap-master errors/debugs via connection.event
Timo Sirainen [Mon, 17 Aug 2020 09:43:12 +0000 (12:43 +0300)]
imap: Log errors via imap_client.event when possible
Timo Sirainen [Mon, 17 Aug 2020 10:28:58 +0000 (13:28 +0300)]
imap: imap_hibernate_process_send() - Return error instead of logging it
Timo Sirainen [Mon, 17 Aug 2020 12:28:00 +0000 (15:28 +0300)]
lib: Add str_to_timeval()
Timo Sirainen [Thu, 20 Aug 2020 13:17:48 +0000 (16:17 +0300)]
director: Use director_connection.event wherever possible
This adds the "director(name): " log prefix to many log messages where it
didn't previously exist. The director name is now sometimes duplicated in
the log messages, but maybe that's good for clarity.
Timo Sirainen [Thu, 20 Aug 2020 13:11:56 +0000 (16:11 +0300)]
director: Avoid explicit log prefixes by logging via director_connection.event
Timo Sirainen [Thu, 20 Aug 2020 13:07:00 +0000 (16:07 +0300)]
director: Add director_connection.event
Timo Sirainen [Thu, 20 Aug 2020 13:05:23 +0000 (16:05 +0300)]
director: Add director_connection_set_name() change connection name
Timo Sirainen [Thu, 31 Oct 2019 17:15:22 +0000 (19:15 +0200)]
director: Replace most of the i_error() logging with e_error()
Timo Sirainen [Thu, 31 Oct 2019 17:10:22 +0000 (19:10 +0200)]
director: Replace i_warning() and i_info() logging with e_*()
Timo Sirainen [Thu, 31 Oct 2019 17:17:28 +0000 (19:17 +0200)]
director: Add auth_connection.dir
Timo Sirainen [Thu, 31 Oct 2019 17:09:35 +0000 (19:09 +0200)]
director: Add user_directory.director
Timo Sirainen [Thu, 31 Oct 2019 17:06:46 +0000 (19:06 +0200)]
director: Add mail_host_list.dir
Timo Sirainen [Thu, 31 Oct 2019 17:00:57 +0000 (19:00 +0200)]
director: Remove dir_debug() and director_debug
Timo Sirainen [Thu, 31 Oct 2019 16:59:57 +0000 (18:59 +0200)]
director: director-request: Add event and replace dir_debug() with e_debug()
Timo Sirainen [Thu, 31 Oct 2019 16:56:56 +0000 (18:56 +0200)]
director: Replace most of the dir_debug() with e_debug()
Timo Sirainen [Thu, 31 Oct 2019 16:49:59 +0000 (18:49 +0200)]
director: Add struct director.event
Rosen Penev [Thu, 8 Nov 2018 00:51:49 +0000 (16:51 -0800)]
lib: Fix compilation with OpenSSL deprecated APIs disabled
OpenSSL with no deprecated APIs does not implicitly include header files.
Josef 'Jeff' Sipek [Fri, 7 Aug 2020 15:11:21 +0000 (11:11 -0400)]
lib: Always use the representative when comparing event's categories
We need to be consistent about using the representative category pointer.
Otherwise, we may end up with duplicates in an event's categories array.
Since an event's categories are conceptually a set, it is reasonable to
write event using code that assumes no duplicates. If duplicates are
present, it may lead to incorrect behavior or even crashes.
Josef 'Jeff' Sipek [Fri, 14 Aug 2020 14:25:33 +0000 (10:25 -0400)]
lib: event-filter-parser - Use str_begins() to compare unit test error strings
Different versions of bison generate slightly different error strings, but
they always begin the same way. So, instead of comparing them let's only
compare the beginning.
Josef 'Jeff' Sipek [Fri, 14 Aug 2020 13:26:12 +0000 (09:26 -0400)]
lib: event-filter-parser - YYERROR_VERBOSE has been deprecated since 2003
The proper way to enable verbose error messages is to use the parse.error
define.
Timo Sirainen [Thu, 13 Aug 2020 21:36:19 +0000 (00:36 +0300)]
lib: Add unit test for long log line splitting
Timo Sirainen [Thu, 13 Aug 2020 19:49:43 +0000 (22:49 +0300)]
lib-index: Remove log prefix from cache events
Index events don't have a prefix either. The parent event likely already
contains the mailbox name, which should be enough. It's especially bad
using the full filesystem path in the event prefix, because it could be
very long.
Timo Sirainen [Thu, 13 Aug 2020 19:47:02 +0000 (22:47 +0300)]
global: Make sure event log prefixes are sanitized and not excessively long
It doesn't make sense to allow log prefixes to grow to kilobytes long,
especially from user-given input.
Timo Sirainen [Thu, 13 Aug 2020 19:18:41 +0000 (22:18 +0300)]
lib: Fix sending log lines when prefix is larger than PIPE_BUF
This caused the log line to be sent repeatedly to the log process, possibly
causing hundreds of duplicate log lines.
Timo Sirainen [Thu, 13 Aug 2020 19:08:48 +0000 (22:08 +0300)]
log: log_connection_handshake() - Handle i_stream_read()'s -2 return value properly
Although this shouldn't happen anymore after the previous change.
Timo Sirainen [Thu, 13 Aug 2020 16:26:23 +0000 (19:26 +0300)]
log: Fix busy loop when a long line is logged
If the line exceeded PIPE_MAX (4 kB usually), the process got into a busy
loop. It would still break out of it every 100ms and maybe handle some
other services' logging, but the service that logged the long line would
be stuck. This resulted in all those service processes also hanging because
they were waiting to be able to write to log.
Aki Tuomi [Mon, 18 May 2020 10:08:45 +0000 (13:08 +0300)]
auth: test-mech - Add tests for RPA and NTLM bug
Aki Tuomi [Mon, 18 May 2020 09:33:39 +0000 (12:33 +0300)]
lib-ntlm: Check buffer length on responses
Add missing check for buffer length.
If this is not checked, it is possible to send message which
causes read past buffer bug.
Broken in
c7480644202e5451fbed448508ea29a25cffc99c
Aki Tuomi [Wed, 6 May 2020 10:40:36 +0000 (13:40 +0300)]
auth: mech-rpa - Fail on zero len buffer
Timo Sirainen [Thu, 2 Jul 2020 14:31:19 +0000 (17:31 +0300)]
lib-mail: Fix handling trailing "--" in MIME boundaries
Broken by
5b8ec27fae941d06516c30476dcf4820c6d200ab
Timo Sirainen [Thu, 23 Apr 2020 14:09:33 +0000 (17:09 +0300)]
lib-mail: message-parser - Support limiting max number of MIME parts
The default is to allow 10000 MIME parts. When it's reached, no more
MIME boundary lines will be recognized, so the rest of the mail belongs
to the last added MIME part.
Timo Sirainen [Thu, 23 Apr 2020 13:59:40 +0000 (16:59 +0300)]
lib-mail: message-parser - Support limiting max number of nested MIME parts
The default is to allow 100 nested MIME parts. When the limit is reached,
the innermost MIME part's body contains all the rest of the inner bodies
until a parent MIME part is reached.
Timo Sirainen [Thu, 23 Apr 2020 13:50:56 +0000 (16:50 +0300)]
lib-mail, global: message_parser_init*() - Convert flags to settings structure
Timo Sirainen [Thu, 23 Apr 2020 12:00:57 +0000 (15:00 +0300)]
lib-mail: message-parser - Don't use memory pool for parser
This reduces memory usage when parsing many MIME parts where boundaries are
being added and removed constantly.
Timo Sirainen [Thu, 23 Apr 2020 11:53:27 +0000 (14:53 +0300)]
lib-mail: message-parser - Add boundary_remove_until() helper function
Timo Sirainen [Thu, 23 Apr 2020 10:06:02 +0000 (13:06 +0300)]
lib-mail: message-parser - Optimize boundary lookups when exact boundary is found
When an exact boundary is found, there's no need to continue looking for
more boundaries.
Timo Sirainen [Thu, 23 Apr 2020 09:53:12 +0000 (12:53 +0300)]
lib-mail: message-parser - Truncate excessively long MIME boundaries
RFC 2046 requires that the boundaries are a maximum of 70 characters
(excluding the "--" prefix and suffix). We allow 80 characters for a bit of
extra safety. Anything longer than that is truncated and treated the same
as if it was just 80 characters.
Timo Sirainen [Thu, 23 Apr 2020 09:10:07 +0000 (12:10 +0300)]
lib-mail: message-parser - Minor code cleanup to finding the end of boundary line
Timo Sirainen [Thu, 23 Apr 2020 09:00:38 +0000 (12:00 +0300)]
lib-mail: message-parser - Optimize appending new part to linked list
Timo Sirainen [Thu, 23 Apr 2020 08:36:48 +0000 (11:36 +0300)]
lib-mail: message-parser - Optimize updating children_count
Timo Sirainen [Thu, 23 Apr 2020 08:34:22 +0000 (11:34 +0300)]
lib-mail: message-parser - Change message_part_append() to do all work internally
Timo Sirainen [Thu, 23 Apr 2020 08:33:31 +0000 (11:33 +0300)]
lib-mail: message-parser - Add a message_part_finish() helper function
Timo Sirainen [Thu, 23 Apr 2020 08:47:18 +0000 (11:47 +0300)]
lib-mail: Move message_parser_init_from_parts() handling to its own file
This helps to see what code they have in common.
Timo Sirainen [Thu, 23 Apr 2020 08:27:14 +0000 (11:27 +0300)]
lib-mail: test-message-parser - Test that children_count is correct
Timo Sirainen [Thu, 23 Apr 2020 08:14:04 +0000 (11:14 +0300)]
lib-mail: test-message-parser - Add another test for boundary matching
Timo Sirainen [Wed, 12 Aug 2020 08:58:07 +0000 (11:58 +0300)]
dict: Fix potential hang when iterating
Broken by
2937287a72cffa8c709c22ede838058d48b61778
Timo Sirainen [Wed, 12 Aug 2020 08:57:26 +0000 (11:57 +0300)]
lib: Clarify o_stream_set_flush_pending() comment related to corking
Timo Sirainen [Thu, 6 Aug 2020 14:46:07 +0000 (17:46 +0300)]
lib: When clearing signal handlers, ignore the signals instead of restoring defaults
This is mainly happening in while the process is shutting down. Getting a
signal at a time when the normal signal handlers are gone isn't something
that is expected. It's better to just ignore the signal and let the process
to finish shutting down normally instead of getting killed.
This should also fix some unit tests where the child processes were
sometimes dying with SIGTERM due to these race conditions.
Timo Sirainen [Mon, 3 Aug 2020 10:21:14 +0000 (13:21 +0300)]
pop3-login: Fix the next command failing after unsuccessful AUTH
If the AUTH command failed (e.g. bad password or proxying failure), the
next command was still processed as AUTH command. For example:
auth plain .
-ERR [AUTH] Invalid base64 data in initial response
quit
-ERR [AUTH] Unsupported authentication mechanism.
Aki Tuomi [Tue, 4 Aug 2020 09:37:45 +0000 (12:37 +0300)]
lib-compression: zstd - Check version
If we are using older than 1.3.1 we emit warning if there is
library mismatch. This is because error codes will break.
Aki Tuomi [Tue, 4 Aug 2020 09:35:39 +0000 (12:35 +0300)]
lib-compression: zstd - Repair error codes if necessary
libzstd version numbers were pinned on 1.3.1, if we are
compiled against version before that, and runtime is
newer, we need to repair version numbers.
A horrible hack that only allows using 1.3.1+ with old
code.
Timo Sirainen [Wed, 5 Aug 2020 11:35:52 +0000 (14:35 +0300)]
lib: Fix potential crash changing signal handlers after destroying ioloop
sergey.kitov [Mon, 22 Jun 2020 12:30:49 +0000 (15:30 +0300)]
lib-index: Set event name for "Recreated index"
Josef 'Jeff' Sipek [Tue, 21 Jul 2020 17:32:19 +0000 (13:32 -0400)]
global: Rely on fs_deinit() automatically freeing parent fs
Josef 'Jeff' Sipek [Tue, 21 Jul 2020 16:55:27 +0000 (12:55 -0400)]
lib-fs: Free parent fs generically
Josef 'Jeff' Sipek [Tue, 21 Jul 2020 17:24:15 +0000 (13:24 -0400)]
mail-crypt: Use container_of() instead of casts for fs code
Being more explicit not only makes the code more explict, it makes it safer.
Josef 'Jeff' Sipek [Tue, 21 Jul 2020 17:22:06 +0000 (13:22 -0400)]
fs-compress: Use container_of() instead of casts
Being more explicit not only makes the code more explict, it makes it safer.
Josef 'Jeff' Sipek [Tue, 21 Jul 2020 17:18:41 +0000 (13:18 -0400)]
lib-fs: sis - Use container_of() instead of casts
Being more explicit not only makes the code more explict, it makes it safer.
Josef 'Jeff' Sipek [Tue, 21 Jul 2020 17:16:34 +0000 (13:16 -0400)]
lib-fs: sis-queue - Use container_of() instead of casts
Being more explicit not only makes the code more explict, it makes it safer.
Josef 'Jeff' Sipek [Tue, 21 Jul 2020 17:13:20 +0000 (13:13 -0400)]
lib-fs: randomfail - Use container_of() instead of casts
Being more explicit not only makes the code more explict, it makes it safer.
Josef 'Jeff' Sipek [Tue, 21 Jul 2020 17:05:34 +0000 (13:05 -0400)]
lib-fs: metawrap - Use container_of() instead of casts
Being more explicit not only makes the code more explict, it makes it safer.
Josef 'Jeff' Sipek [Fri, 17 Jul 2020 21:43:08 +0000 (17:43 -0400)]
lib-fs: Add new deinit vfunc
This is useful for tidying up anything just before freeing the struct fs.
For example, flushing dirty data in a write-back cache.
Josef 'Jeff' Sipek [Fri, 17 Jul 2020 21:26:41 +0000 (17:26 -0400)]
lib-fs: Rename deinit vfunc to free
Timo Sirainen [Sun, 26 Apr 2020 19:27:52 +0000 (22:27 +0300)]
lib, lib-master: Send updated event to stats if fields/categories change
Based on code by Jeff Sipek
Timo Sirainen [Tue, 28 Apr 2020 15:48:07 +0000 (18:48 +0300)]
stats: Allow clients to update existing events with UPDATE command
Timo Sirainen [Tue, 28 Apr 2020 15:43:21 +0000 (18:43 +0300)]
lib: event_import*() - Allow importing duplicate data without using more memory
Josef 'Jeff' Sipek [Mon, 27 Jul 2020 15:15:42 +0000 (11:15 -0400)]
lib-master: Properly compare unit test output strings with expected values
The I_MIN() mean that only the prefix was getting compared.
Stephan Bosch [Sun, 5 Jul 2020 10:16:06 +0000 (12:16 +0200)]
imap: cmd-notify - Do not try to notify for removable namespaces.
It is not going to work anyway and it will cause a crash when the IMAP sync code
subsequently drops those namespaces as part of mail_user_drop_useless_namespaces().
This does not drop the earlier created mailbox_list_notify object, causing its
mailbox list index view object to remain open. This causes the following panic:
Panic: Leaked view for index <path>/dovecot.list.index: Opened in mailbox-list-index-notify.c:142
Stephan Bosch [Mon, 6 Jul 2020 23:37:54 +0000 (01:37 +0200)]
lib-storage: Add mail_namespace_is_removable() and use it.
Stephan Bosch [Sun, 5 Jul 2020 10:47:05 +0000 (12:47 +0200)]
lib-index: mail-index-view - Record caller source filename and line for mail_index_view_clone/dup_private().
Before, this was only recorded for mail_index_view_open(), which caused the view
leak panic to show a useless source location, e.g.:
Panic: Leaked view for index <path>: Opened in (null):0
Josef 'Jeff' Sipek [Thu, 16 Jul 2020 20:30:00 +0000 (16:30 -0400)]
lib-fs: Set debug on event from settings
Stephan Bosch [Mon, 29 Jun 2020 09:56:02 +0000 (11:56 +0200)]
imap: cmd-notify - Fix segfault ocurring upon NOTIFY error.
The client_send_line() function in imap_client_notify_more() uses notify_ns to
obtain access to client struct, while that is available as a direct function
parameter. And notify_ns is invalid at the end of the for loop, so dereferencing
it causes a segmentation fault.
Aki Tuomi [Fri, 31 Jul 2020 15:39:54 +0000 (18:39 +0300)]
lib-compression: test-compression - Do not fail on missing handlers
Aki Tuomi [Fri, 31 Jul 2020 06:51:35 +0000 (09:51 +0300)]
lib-compression: Fix support for older libzstd
Aki Tuomi [Fri, 31 Jul 2020 06:51:16 +0000 (09:51 +0300)]
lib-compression: test-compression - Ensure compression handler is found by file extension
Timo Sirainen [Wed, 10 Jun 2020 12:53:41 +0000 (15:53 +0300)]
fs-compress: Try all compression formats when decompressing
Not just the specified compression format.
Timo Sirainen [Wed, 10 Jun 2020 12:48:06 +0000 (15:48 +0300)]
fs-compress: Rename compress_fs.handler to compress_handler
Aki Tuomi [Mon, 6 Jul 2020 11:54:48 +0000 (14:54 +0300)]
lib-compression: test-compression - Add test for tiny invalid data
Ensure compression handlers return EINVAL when reading
less than header size data.
Aki Tuomi [Mon, 6 Jul 2020 16:55:10 +0000 (19:55 +0300)]
lib-compression: istream-xz - Fix header reading
If file was smaller than xz magic size, we would get
EPIPE instead of EINVAL.
Aki Tuomi [Mon, 6 Jul 2020 12:42:26 +0000 (15:42 +0300)]
lib-compression: istream-zstd - Fix header reading
If file was smaller than zstd magic size, we would get
EPIPE instead of EINVAL.
Aki Tuomi [Mon, 6 Jul 2020 12:41:28 +0000 (15:41 +0300)]
lib-compression: istream-zlib - Fix header reading
If data size was 0 it would give EPIPE instead of EINVAL
Aki Tuomi [Mon, 6 Jul 2020 16:16:50 +0000 (19:16 +0300)]
lib-compression: istream-lz4 - Fix header reading
If data size was smaller than header size, lz4 reading would
return -1 without error indicating EOF instead of EINVAL.
Broken in
c1a43c6098f0caf11e8a2c1889227ec3969e410e
Aki Tuomi [Mon, 6 Jul 2020 07:12:39 +0000 (10:12 +0300)]
lib-compression: ostream-zstd - Remove o_stream_zstd_error
It has only one private caller.
Aki Tuomi [Mon, 6 Jul 2020 07:11:51 +0000 (10:11 +0300)]
lib-compression: ostream-zstd - Fix error handling
The error code handling in ZSTD was wrong, because zstd returns
error codes as large unsigned numbers which need to be retrieved
with helper function.
Aki Tuomi [Mon, 6 Jul 2020 07:10:00 +0000 (10:10 +0300)]
lib-compression: istream-zstd - Remove i_stream_zstd_error
It has only one private caller.
Aki Tuomi [Fri, 3 Jul 2020 06:45:09 +0000 (09:45 +0300)]
lib-compression: Fix error handling for zstd
The error code handling in ZSTD was wrong, because zstd returns
error codes as large unsigned numbers which need to be retrieved
with helper function.
Markus Valentin [Mon, 6 Jul 2020 09:48:13 +0000 (11:48 +0200)]
lib-compression: Add "unsupported" compression
This new compression is only used for testing purposes.
Markus Valentin [Tue, 30 Jun 2020 12:28:03 +0000 (14:28 +0200)]
lib-compression: Change compression_lookup_handler_from_ext return value
In order to improve the error handling for
compression_lookup_handler_from_ext calls return an integer rather then
a pointer to struct compression_handler.
Markus Valentin [Tue, 30 Jun 2020 12:21:22 +0000 (14:21 +0200)]
lib-compression: Change compression_lookup_handler return value
In order to improve the error handling for compression_lookup_handler
calls return an integer rather then a pointer to struct
compression_handler.
This change also prevents crashes when trying to use a compression
format that isn't compiled in.
Timo Sirainen [Wed, 29 Jul 2020 07:40:17 +0000 (10:40 +0300)]
pop3: Fix assert-crash when using pop3_deleted_flag
Broken by
6d18044e1408ce98aa8ef145a9f85895829a7bc7
Fixes:
Panic: file seq-range-array.c: line 472 (seq_range_array_invert): assertion failed: (range[count-1].seq2 <= max_seq)
Timo Sirainen [Wed, 15 Jul 2020 09:42:59 +0000 (12:42 +0300)]
pop3-login: Fix handling commands that are sent in multiple IP packets
This happened especially if the commands were long, like XCLIENT.
This got broken by recent pop3-login changes.
Aki Tuomi [Fri, 10 Jul 2020 08:00:14 +0000 (11:00 +0300)]
lib-test: Rename s1, s2 to _temp_s1, _temp_s2 in test_assert_strcmp_idx
Some test code uses s1 and s2 as variable names.
Broken in
449539dc52070bebde3ae7babe96e6e272dd7101
Aki Tuomi [Thu, 9 Jul 2020 06:38:37 +0000 (09:38 +0300)]
pop3-login: Use struct client authenticating member
This is what should be used instead of introducing our own.
Broken in
6c55437036b3de11804eb68f66d84cb164c33d63
Aki Tuomi [Thu, 9 Jul 2020 06:39:48 +0000 (09:39 +0300)]
pop3-login: Consume line after mech probe
Otherwise we read next line empty and that causes -ERR.
Broken in
6c55437036b3de11804eb68f66d84cb164c33d63
Aki Tuomi [Wed, 8 Jul 2020 07:59:48 +0000 (10:59 +0300)]
lib: istream - Do not attempt read past end in i_stream_next_line_finish
Aki Tuomi [Wed, 8 Jul 2020 09:58:56 +0000 (12:58 +0300)]
lib-test: test_assert_strcmp_idx - Avoid double evaluation
Aki Tuomi [Wed, 8 Jul 2020 05:55:31 +0000 (08:55 +0300)]
pop3-login: Read command more carefully
Ensure we don't consume '\n' or '\0' when reading command, but
that we consume '\r' otherwise i_stream_read_next_line won't work properly.