]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
5 years agolib: events - Use const event pointer for "get" functions
Timo Sirainen [Sun, 26 Apr 2020 17:15:39 +0000 (20:15 +0300)] 
lib: events - Use const event pointer for "get" functions

5 years agolib-storage: mail_user_init_fs_settings() - Use user's event as fs parent event
Timo Sirainen [Mon, 24 Aug 2020 12:00:39 +0000 (15:00 +0300)] 
lib-storage: mail_user_init_fs_settings() - Use user's event as fs parent event

5 years agoauth: test-mech - Fix type mismatch
Aki Tuomi [Thu, 13 Aug 2020 16:13:49 +0000 (19:13 +0300)] 
auth: test-mech - Fix type mismatch

5 years agoauth: test-mech - Fix APOP challenge format
Aki Tuomi [Thu, 13 Aug 2020 16:13:04 +0000 (19:13 +0300)] 
auth: test-mech - Fix APOP challenge format

5 years agosubmission: submission-backend-relay - Handle relay server replies consistently.
Stephan Bosch [Mon, 17 Aug 2020 16:06:14 +0000 (18:06 +0200)] 
submission: submission-backend-relay - Handle relay server replies consistently.

Initial connection setup errors were handled differently when the reply came
into the ready callback first.

5 years agolib-smtp: test-smtp-client-errors - Add test for server presenting invalid SSL certif...
Stephan Bosch [Wed, 11 Jul 2018 22:15:23 +0000 (00:15 +0200)] 
lib-smtp: test-smtp-client-errors - Add test for server presenting invalid SSL certificate.

5 years agolib-smtp: smtp-client-connection - If SSL connection gets lost, log the last SSL...
Stephan Bosch [Sat, 14 Jul 2018 11:16:05 +0000 (13:16 +0200)] 
lib-smtp: smtp-client-connection - If SSL connection gets lost, log the last SSL error.

5 years agolib-smtp: smtp-client-connection - Handle connection loss uniformly at a single location.
Stephan Bosch [Wed, 11 Jul 2018 22:15:31 +0000 (00:15 +0200)] 
lib-smtp: smtp-client-connection - Handle connection loss uniformly at a single location.

Also amend the logged error message with SSL information when relevant.

5 years agolib-smtp: smtp-client-connection - Properly log SSL handshake failure occuring during...
Stephan Bosch [Sat, 14 Jul 2018 10:19:07 +0000 (12:19 +0200)] 
lib-smtp: smtp-client-connection - Properly log SSL handshake failure occuring during input read as an error.

5 years agolib-smtp: smtp-client-connection - Restructure handling of immediate connection failure.
Stephan Bosch [Sat, 14 Jul 2018 09:35:20 +0000 (11:35 +0200)] 
lib-smtp: smtp-client-connection - Restructure handling of immediate connection failure.

The delayed error callback is now started at a single location, much like
lib-http/client deals with this situation.

5 years agomaster: Make sure a listener isn't added to a throttled service
Timo Sirainen [Mon, 4 May 2020 14:21:23 +0000 (17:21 +0300)] 
master: Make sure a listener isn't added to a throttled service

This fixes master process using 100% CPU in some situations when a service
is being throttled.

5 years agoauth: mech-gssapi - GSSAPI can contain NUL.
Paul G. Banks [Sun, 16 Aug 2020 09:57:36 +0000 (10:57 +0100)] 
auth: mech-gssapi - GSSAPI can contain NUL.

5 years agoimap: Add "mailbox" field to successful imap_client_unhibernated event
Timo Sirainen [Mon, 17 Aug 2020 16:16:01 +0000 (19:16 +0300)] 
imap: Add "mailbox" field to successful imap_client_unhibernated event

5 years agoimap-hibernate: Add "mailbox" field to events
Timo Sirainen [Mon, 17 Aug 2020 16:10:35 +0000 (19:10 +0300)] 
imap-hibernate: Add "mailbox" field to events

5 years agoimap, imap-hibernate: Track how long hibernation lasted
Timo Sirainen [Mon, 17 Aug 2020 12:33:23 +0000 (15:33 +0300)] 
imap, imap-hibernate: Track how long hibernation lasted

5 years agoimap-hibernate: Add imap_client_unhibernate_retried event
Timo Sirainen [Mon, 17 Aug 2020 12:39:19 +0000 (15:39 +0300)] 
imap-hibernate: Add imap_client_unhibernate_retried event

5 years agoimap-hibernate: Add imap_client_unhibernated event for errors
Timo Sirainen [Mon, 17 Aug 2020 11:03:53 +0000 (14:03 +0300)] 
imap-hibernate: Add imap_client_unhibernated event for errors

Successful unhibernation is logged by imap process.

5 years agoimap-hibernate: Handle unhibernation errors more consistently.
Timo Sirainen [Mon, 17 Aug 2020 10:55:18 +0000 (13:55 +0300)] 
imap-hibernate: Handle unhibernation errors more consistently.

Log an error with the exact reason, and just log "Failed to unhibernate
client" as the info-level disconnect reason.

5 years agoimap-hibernate: Fix error handling when unhibernation retry timeout is reached
Timo Sirainen [Mon, 17 Aug 2020 10:53:50 +0000 (13:53 +0300)] 
imap-hibernate: Fix error handling when unhibernation retry timeout is reached

An error message wasn't logged, and a wrong kind of message was logged in
the info line.

5 years agoimap-hibernate: Split off imap_move_has_reached_timeout()
Timo Sirainen [Mon, 17 Aug 2020 10:53:28 +0000 (13:53 +0300)] 
imap-hibernate: Split off imap_move_has_reached_timeout()

5 years agoimap: Add imap_client_unhibernated event
Timo Sirainen [Mon, 17 Aug 2020 12:06:42 +0000 (15:06 +0300)] 
imap: Add imap_client_unhibernated event

5 years agoimap: Send unhibernation OK reply to imap-hibernate only after creating client
Timo Sirainen [Mon, 17 Aug 2020 11:48:01 +0000 (14:48 +0300)] 
imap: Send unhibernation OK reply to imap-hibernate only after creating client

The following commit adds unhibernation event, which would be much more
difficult to implement for this error path without this change.

The OK reply is still sent before client_create_finish(), which is the part
that could be slow.

5 years agoimap: Set unhibernation IDLE state earlier
Timo Sirainen [Mon, 17 Aug 2020 11:55:55 +0000 (14:55 +0300)] 
imap: Set unhibernation IDLE state earlier

This simplifies the following changes.

5 years agoimap: Add imap_client_hibernated event
Timo Sirainen [Mon, 17 Aug 2020 10:34:35 +0000 (13:34 +0300)] 
imap: Add imap_client_hibernated event

5 years agoimap-hibernate: Log via imap_client.event or connection.event
Timo Sirainen [Mon, 17 Aug 2020 10:08:50 +0000 (13:08 +0300)] 
imap-hibernate: Log via imap_client.event or connection.event

5 years agoimap-hibernate: Add imap_client.event
Timo Sirainen [Mon, 17 Aug 2020 10:08:19 +0000 (13:08 +0300)] 
imap-hibernate: Add imap_client.event

5 years agoimap-hibernate: Preserve local_port and remote_port during hibernation
Timo Sirainen [Mon, 17 Aug 2020 10:07:49 +0000 (13:07 +0300)] 
imap-hibernate: Preserve local_port and remote_port during hibernation

5 years agoimap: Log ID and logout info lines via imap_client.event
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.

5 years agoimap: Log imap-master errors/debugs via connection.event
Timo Sirainen [Mon, 17 Aug 2020 09:45:08 +0000 (12:45 +0300)] 
imap: Log imap-master errors/debugs via connection.event

5 years agoimap: Log errors via imap_client.event when possible
Timo Sirainen [Mon, 17 Aug 2020 09:43:12 +0000 (12:43 +0300)] 
imap: Log errors via imap_client.event when possible

5 years agoimap: imap_hibernate_process_send() - Return error instead of logging it
Timo Sirainen [Mon, 17 Aug 2020 10:28:58 +0000 (13:28 +0300)] 
imap: imap_hibernate_process_send() - Return error instead of logging it

5 years agolib: Add str_to_timeval()
Timo Sirainen [Mon, 17 Aug 2020 12:28:00 +0000 (15:28 +0300)] 
lib: Add str_to_timeval()

5 years agodirector: Use director_connection.event wherever possible
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.

5 years agodirector: Avoid explicit log prefixes by logging via director_connection.event
Timo Sirainen [Thu, 20 Aug 2020 13:11:56 +0000 (16:11 +0300)] 
director: Avoid explicit log prefixes by logging via director_connection.event

5 years agodirector: Add director_connection.event
Timo Sirainen [Thu, 20 Aug 2020 13:07:00 +0000 (16:07 +0300)] 
director: Add director_connection.event

5 years agodirector: Add director_connection_set_name() change connection name
Timo Sirainen [Thu, 20 Aug 2020 13:05:23 +0000 (16:05 +0300)] 
director: Add director_connection_set_name() change connection name

5 years agodirector: Replace most of the i_error() logging with e_error()
Timo Sirainen [Thu, 31 Oct 2019 17:15:22 +0000 (19:15 +0200)] 
director: Replace most of the i_error() logging with e_error()

5 years agodirector: Replace i_warning() and i_info() logging with e_*()
Timo Sirainen [Thu, 31 Oct 2019 17:10:22 +0000 (19:10 +0200)] 
director: Replace i_warning() and i_info() logging with e_*()

5 years agodirector: Add auth_connection.dir
Timo Sirainen [Thu, 31 Oct 2019 17:17:28 +0000 (19:17 +0200)] 
director: Add auth_connection.dir

5 years agodirector: Add user_directory.director
Timo Sirainen [Thu, 31 Oct 2019 17:09:35 +0000 (19:09 +0200)] 
director: Add user_directory.director

5 years agodirector: Add mail_host_list.dir
Timo Sirainen [Thu, 31 Oct 2019 17:06:46 +0000 (19:06 +0200)] 
director: Add mail_host_list.dir

5 years agodirector: Remove dir_debug() and director_debug
Timo Sirainen [Thu, 31 Oct 2019 17:00:57 +0000 (19:00 +0200)] 
director: Remove dir_debug() and director_debug

5 years agodirector: director-request: Add event and replace dir_debug() with e_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()

5 years agodirector: Replace most of the 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()

5 years agodirector: Add struct director.event
Timo Sirainen [Thu, 31 Oct 2019 16:49:59 +0000 (18:49 +0200)] 
director: Add struct director.event

5 years agolib: Fix compilation with OpenSSL deprecated APIs disabled
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.

5 years agolib: Always use the representative when comparing event's categories
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.

5 years agolib: event-filter-parser - Use str_begins() to compare unit test error strings
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.

5 years agolib: event-filter-parser - YYERROR_VERBOSE has been deprecated since 2003
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.

5 years agolib: Add unit test for long log line splitting
Timo Sirainen [Thu, 13 Aug 2020 21:36:19 +0000 (00:36 +0300)] 
lib: Add unit test for long log line splitting

5 years agolib-index: Remove log prefix from cache events
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.

5 years agoglobal: Make sure event log prefixes are sanitized and not excessively 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.

5 years agolib: Fix sending log lines when prefix is larger than PIPE_BUF
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.

5 years agolog: log_connection_handshake() - Handle i_stream_read()'s -2 return value properly
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.

5 years agolog: Fix busy loop when a long line is logged
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.

5 years agoauth: test-mech - Add tests for RPA and NTLM bug
Aki Tuomi [Mon, 18 May 2020 10:08:45 +0000 (13:08 +0300)] 
auth: test-mech - Add tests for RPA and NTLM bug

5 years agolib-ntlm: Check buffer length on responses
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

5 years agoauth: mech-rpa - Fail on zero len buffer
Aki Tuomi [Wed, 6 May 2020 10:40:36 +0000 (13:40 +0300)] 
auth: mech-rpa - Fail on zero len buffer

5 years agolib-mail: Fix handling trailing "--" in MIME boundaries
Timo Sirainen [Thu, 2 Jul 2020 14:31:19 +0000 (17:31 +0300)] 
lib-mail: Fix handling trailing "--" in MIME boundaries

Broken by 5b8ec27fae941d06516c30476dcf4820c6d200ab

5 years agolib-mail: message-parser - Support limiting max number of MIME parts
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.

5 years agolib-mail: message-parser - Support limiting max number of nested MIME parts
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.

5 years agolib-mail, global: message_parser_init*() - Convert flags to settings structure
Timo Sirainen [Thu, 23 Apr 2020 13:50:56 +0000 (16:50 +0300)] 
lib-mail, global: message_parser_init*() - Convert flags to settings structure

5 years agolib-mail: message-parser - Don't use memory pool for parser
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.

5 years agolib-mail: message-parser - Add boundary_remove_until() helper function
Timo Sirainen [Thu, 23 Apr 2020 11:53:27 +0000 (14:53 +0300)] 
lib-mail: message-parser - Add boundary_remove_until() helper function

5 years agolib-mail: message-parser - Optimize boundary lookups when exact boundary is found
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.

5 years agolib-mail: message-parser - Truncate excessively long MIME 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.

5 years agolib-mail: message-parser - Minor code cleanup to finding the end of boundary line
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

5 years agolib-mail: message-parser - Optimize appending new part to linked list
Timo Sirainen [Thu, 23 Apr 2020 09:00:38 +0000 (12:00 +0300)] 
lib-mail: message-parser - Optimize appending new part to linked list

5 years agolib-mail: message-parser - Optimize updating children_count
Timo Sirainen [Thu, 23 Apr 2020 08:36:48 +0000 (11:36 +0300)] 
lib-mail: message-parser - Optimize updating children_count

5 years agolib-mail: message-parser - Change message_part_append() to do all work internally
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

5 years agolib-mail: message-parser - Add a message_part_finish() helper function
Timo Sirainen [Thu, 23 Apr 2020 08:33:31 +0000 (11:33 +0300)] 
lib-mail: message-parser - Add a message_part_finish() helper function

5 years agolib-mail: Move message_parser_init_from_parts() handling to its own file
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.

5 years agolib-mail: test-message-parser - Test that children_count is correct
Timo Sirainen [Thu, 23 Apr 2020 08:27:14 +0000 (11:27 +0300)] 
lib-mail: test-message-parser - Test that children_count is correct

5 years agolib-mail: test-message-parser - Add another test for boundary matching
Timo Sirainen [Thu, 23 Apr 2020 08:14:04 +0000 (11:14 +0300)] 
lib-mail: test-message-parser - Add another test for boundary matching

5 years agodict: Fix potential hang when iterating
Timo Sirainen [Wed, 12 Aug 2020 08:58:07 +0000 (11:58 +0300)] 
dict: Fix potential hang when iterating

Broken by 2937287a72cffa8c709c22ede838058d48b61778

5 years agolib: Clarify o_stream_set_flush_pending() comment related to corking
Timo Sirainen [Wed, 12 Aug 2020 08:57:26 +0000 (11:57 +0300)] 
lib: Clarify o_stream_set_flush_pending() comment related to corking

5 years agolib: When clearing signal handlers, ignore the signals instead of restoring defaults
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.

5 years agopop3-login: Fix the next command failing after unsuccessful AUTH
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.

5 years agolib-compression: zstd - Check version
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.

5 years agolib-compression: zstd - Repair error codes if necessary
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.

5 years agolib: Fix potential crash changing signal handlers after destroying ioloop
Timo Sirainen [Wed, 5 Aug 2020 11:35:52 +0000 (14:35 +0300)] 
lib: Fix potential crash changing signal handlers after destroying ioloop

5 years agolib-index: Set event name for "Recreated index"
sergey.kitov [Mon, 22 Jun 2020 12:30:49 +0000 (15:30 +0300)] 
lib-index: Set event name for "Recreated index"

5 years agoglobal: Rely on fs_deinit() automatically freeing parent fs
Josef 'Jeff' Sipek [Tue, 21 Jul 2020 17:32:19 +0000 (13:32 -0400)] 
global: Rely on fs_deinit() automatically freeing parent fs

5 years agolib-fs: Free parent fs generically
Josef 'Jeff' Sipek [Tue, 21 Jul 2020 16:55:27 +0000 (12:55 -0400)] 
lib-fs: Free parent fs generically

5 years agomail-crypt: Use container_of() instead of casts for fs code
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.

5 years agofs-compress: Use container_of() instead of casts
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.

5 years agolib-fs: sis - Use container_of() instead of casts
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.

5 years agolib-fs: sis-queue - Use container_of() instead of casts
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.

5 years agolib-fs: randomfail - Use container_of() instead of casts
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.

5 years agolib-fs: metawrap - Use container_of() instead of casts
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.

5 years agolib-fs: Add new deinit vfunc
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.

5 years agolib-fs: Rename deinit vfunc to free
Josef 'Jeff' Sipek [Fri, 17 Jul 2020 21:26:41 +0000 (17:26 -0400)] 
lib-fs: Rename deinit vfunc to free

5 years agolib, lib-master: Send updated event to stats if fields/categories change
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

5 years agostats: Allow clients to update existing events with UPDATE command
Timo Sirainen [Tue, 28 Apr 2020 15:48:07 +0000 (18:48 +0300)] 
stats: Allow clients to update existing events with UPDATE command

5 years agolib: event_import*() - Allow importing duplicate data without using more memory
Timo Sirainen [Tue, 28 Apr 2020 15:43:21 +0000 (18:43 +0300)] 
lib: event_import*() - Allow importing duplicate data without using more memory

5 years agolib-master: Properly compare unit test output strings with expected values
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.

5 years agoimap: cmd-notify - Do not try to notify for removable namespaces.
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

5 years agolib-storage: Add mail_namespace_is_removable() and use it.
Stephan Bosch [Mon, 6 Jul 2020 23:37:54 +0000 (01:37 +0200)] 
lib-storage: Add mail_namespace_is_removable() and use it.

5 years agolib-index: mail-index-view - Record caller source filename and line for mail_index_vi...
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

5 years agolib-fs: Set debug on event from settings
Josef 'Jeff' Sipek [Thu, 16 Jul 2020 20:30:00 +0000 (16:30 -0400)] 
lib-fs: Set debug on event from settings