]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
4 years agolib-lua: Stop sharing lua states based on the script file name
Josef 'Jeff' Sipek [Fri, 11 Dec 2020 16:05:50 +0000 (11:05 -0500)] 
lib-lua: Stop sharing lua states based on the script file name

Instead of all instances of the same lua script sharing the same stack and
globals, make them completely separate instances.  Removing this
optimization will make support of yielding possible.

4 years agolib-lua: Use lua_register() instead of open-coding it
Josef 'Jeff' Sipek [Fri, 11 Dec 2020 16:22:44 +0000 (11:22 -0500)] 
lib-lua: Use lua_register() instead of open-coding it

4 years agoNEWS: Add NEWS for 2.3.11.3
Aki Tuomi [Wed, 29 Jul 2020 08:28:50 +0000 (11:28 +0300)] 
NEWS: Add NEWS for 2.3.11.3

4 years agoNEWS: Add NEWS for 2.3.11.2
Aki Tuomi [Tue, 28 Jul 2020 08:02:06 +0000 (11:02 +0300)] 
NEWS: Add NEWS for 2.3.11.2

4 years agoNEWS: Add news for 2.3.11
Aki Tuomi [Tue, 30 Jun 2020 08:50:26 +0000 (11:50 +0300)] 
NEWS: Add news for 2.3.11

4 years agoman: doveadm-proxy - Minor fixes to doveadm proxy kick
Timo Sirainen [Thu, 10 Dec 2020 18:31:28 +0000 (19:31 +0100)] 
man: doveadm-proxy - Minor fixes to doveadm proxy kick

4 years agolib: test-file-cache - Assert map is not null before memcmp
Aki Tuomi [Wed, 9 Dec 2020 07:43:42 +0000 (09:43 +0200)] 
lib: test-file-cache - Assert map is not null before memcmp

4 years agolib-mail: test-message-search - Assert ret
Aki Tuomi [Tue, 8 Dec 2020 07:51:30 +0000 (09:51 +0200)] 
lib-mail: test-message-search - Assert ret

Found by static analysis

4 years agolib-mail: test-message-search - Assert that found value is not NULL
Aki Tuomi [Tue, 8 Dec 2020 07:45:20 +0000 (09:45 +0200)] 
lib-mail: test-message-search - Assert that found value is not NULL

Satisfies static analysers

4 years agolib-mail: test-message-decoder - Assert ret
Aki Tuomi [Tue, 8 Dec 2020 07:42:13 +0000 (09:42 +0200)] 
lib-mail: test-message-decoder - Assert ret

Found by static analysis

4 years agolib-storage: Fix potential assert-crash when fetching body snippet
Timo Sirainen [Mon, 30 Nov 2020 20:10:28 +0000 (22:10 +0200)] 
lib-storage: Fix potential assert-crash when fetching body snippet

This happened only in a rather special condition. Added unit test to
reproduce it.

Fixes:
Panic: file message-part-data.c: line 28 (message_part_data_is_plain_7bit): assertion failed: (data != NULL)

4 years agolib-storage: Fix potential assert-crash when adding missing attachment flags
Timo Sirainen [Mon, 30 Nov 2020 18:37:46 +0000 (20:37 +0200)] 
lib-storage: Fix potential assert-crash when adding missing attachment flags

This happened only in a rather special condition. Added unit test to
reproduce it.

Fixes:
Panic: file index-mail-headers.c: line 298 (index_mail_parse_header): assertion failed: (part != NULL)

4 years agolib-dcrypt: istream-decrypt - Assert that max_buffer_size > 0
Timo Sirainen [Mon, 7 Dec 2020 11:09:50 +0000 (13:09 +0200)] 
lib-dcrypt: istream-decrypt - Assert that max_buffer_size > 0

Otherwise all reads return -2, which will just result in assert-crash in
i_stream_read().

4 years agolib: istream-error - Set max_buffer_size
Timo Sirainen [Mon, 7 Dec 2020 11:07:35 +0000 (13:07 +0200)] 
lib: istream-error - Set max_buffer_size

Although nothing is actually read from the stream, some filter istreams
don't behave properly with max_buffer_size=0. Currently at least
istream-decrypt returns -2 for reads instead of -1.

Fixes:
Panic: file istream.c: line 320 (i_stream_read_memarea): assertion failed: (_stream->skip != _stream->pos)

4 years agolib-storage: test_mail_storage_deinit() - Don't try to clear freed memory
Timo Sirainen [Mon, 7 Dec 2020 10:40:22 +0000 (12:40 +0200)] 
lib-storage: test_mail_storage_deinit() - Don't try to clear freed memory

ctx was already freed. Trying to memset() into it will just result in
writing to already freed memory.

4 years agolib-oauth2: test-oauth2-jwt - Add tests for HS384 and HS512
Aki Tuomi [Thu, 3 Dec 2020 14:37:55 +0000 (16:37 +0200)] 
lib-oauth2: test-oauth2-jwt - Add tests for HS384 and HS512

4 years agolib-oauth2: Fix whitespace in test-oauth2-jwt.c
Aki Tuomi [Wed, 2 Dec 2020 11:37:05 +0000 (13:37 +0200)] 
lib-oauth2: Fix whitespace in test-oauth2-jwt.c

4 years agolib: test-hmac - Add tests for hmac sha384
Aki Tuomi [Wed, 2 Dec 2020 12:54:05 +0000 (14:54 +0200)] 
lib: test-hmac - Add tests for hmac sha384

4 years agolib: test-hash-method - Add tests for sha2
Aki Tuomi [Wed, 2 Dec 2020 12:53:55 +0000 (14:53 +0200)] 
lib: test-hash-method - Add tests for sha2

4 years agolib: hash-method - Add sha384 support
Aki Tuomi [Wed, 2 Dec 2020 12:53:39 +0000 (14:53 +0200)] 
lib: hash-method - Add sha384 support

4 years agolib: Fix whitespace in sha2.c
Aki Tuomi [Wed, 2 Dec 2020 12:37:02 +0000 (14:37 +0200)] 
lib: Fix whitespace in sha2.c

4 years agolib: test-hmac - Add HMAC 512 test
Downtown Allday [Tue, 24 Nov 2020 15:20:05 +0000 (10:20 -0500)] 
lib: test-hmac - Add HMAC 512 test

4 years agolib: hmac - Support different hash algorithms
Aki Tuomi [Thu, 3 Dec 2020 14:33:06 +0000 (16:33 +0200)] 
lib: hmac - Support different hash algorithms

Code was hardcoded for MD4,MD5,SHA-1.

4 years agolib: hmac - Adjust HMAC_MAX_CONTEXT_SIZE to accommodate HMAC512
Downtown Allday [Tue, 24 Nov 2020 15:19:43 +0000 (10:19 -0500)] 
lib: hmac - Adjust HMAC_MAX_CONTEXT_SIZE to accommodate HMAC512

4 years agolib: hash-method - Add block size
Aki Tuomi [Thu, 3 Dec 2020 14:28:40 +0000 (16:28 +0200)] 
lib: hash-method - Add block size

This is needed for HMAC

4 years agolib: hash-method - Use named initializers
Aki Tuomi [Thu, 3 Dec 2020 14:24:52 +0000 (16:24 +0200)] 
lib: hash-method - Use named initializers

4 years agolib-oauth2: Remove unused include from oauth2.c.
Stephan Bosch [Fri, 5 Jun 2020 19:29:44 +0000 (21:29 +0200)] 
lib-oauth2: Remove unused include from oauth2.c.

4 years agolib-oauth2: Make oauth2_request_set_headers() static.
Stephan Bosch [Fri, 5 Jun 2020 19:16:58 +0000 (21:16 +0200)] 
lib-oauth2: Make oauth2_request_set_headers() static.

4 years agolib-oauth2: Rename oauth2_request_free_internal() to oauth2_request_free().
Stephan Bosch [Fri, 5 Jun 2020 19:13:39 +0000 (21:13 +0200)] 
lib-oauth2: Rename oauth2_request_free_internal() to oauth2_request_free().

And make it static.

4 years agolib-oauth2: Rename oauth2_parse_json() to oauth2_request_parse_json().
Stephan Bosch [Fri, 5 Jun 2020 19:06:30 +0000 (21:06 +0200)] 
lib-oauth2: Rename oauth2_parse_json() to oauth2_request_parse_json().

4 years agolib-oauth2: Move oauth2_request_set_headers() to oauth2-request.c.
Stephan Bosch [Fri, 5 Jun 2020 19:15:47 +0000 (21:15 +0200)] 
lib-oauth2: Move oauth2_request_set_headers() to oauth2-request.c.

4 years agolib-oauth2: Move oauth2_request_abort() to oauth2-request.c.
Stephan Bosch [Fri, 5 Jun 2020 19:11:20 +0000 (21:11 +0200)] 
lib-oauth2: Move oauth2_request_abort() to oauth2-request.c.

4 years agolib-oauth2: Move oauth2_request_free_internal() to oauth2-request.c.
Stephan Bosch [Fri, 5 Jun 2020 19:09:39 +0000 (21:09 +0200)] 
lib-oauth2: Move oauth2_request_free_internal() to oauth2-request.c.

4 years agolib-oauth2: Move oauth2_parse_json() to oauth2-request.c.
Stephan Bosch [Fri, 5 Jun 2020 19:00:03 +0000 (21:00 +0200)] 
lib-oauth2: Move oauth2_parse_json() to oauth2-request.c.

4 years agolib-oauth2: Reformat test-oauth2-jwt.c.
Stephan Bosch [Fri, 5 Jun 2020 18:51:34 +0000 (20:51 +0200)] 
lib-oauth2: Reformat test-oauth2-jwt.c.

4 years agolib-oauth2: Reformat oauth2-jwt.c.
Stephan Bosch [Fri, 5 Jun 2020 18:51:19 +0000 (20:51 +0200)] 
lib-oauth2: Reformat oauth2-jwt.c.

4 years agolib-oauth2: Reformat oauth2-key-cache.c.
Stephan Bosch [Fri, 5 Jun 2020 18:50:55 +0000 (20:50 +0200)] 
lib-oauth2: Reformat oauth2-key-cache.c.

4 years agolib-oauth2: Reformat oauth2-request.c.
Stephan Bosch [Fri, 5 Jun 2020 18:50:34 +0000 (20:50 +0200)] 
lib-oauth2: Reformat oauth2-request.c.

4 years agolib-oauth2: Reformat oauth2.c.
Stephan Bosch [Fri, 5 Jun 2020 18:49:34 +0000 (20:49 +0200)] 
lib-oauth2: Reformat oauth2.c.

4 years agolib-oauth2: Reformat oauth2-private.h.
Stephan Bosch [Fri, 5 Jun 2020 18:49:58 +0000 (20:49 +0200)] 
lib-oauth2: Reformat oauth2-private.h.

4 years agolib-oauth2: Reformat oauth2.h.
Stephan Bosch [Fri, 5 Jun 2020 18:49:09 +0000 (20:49 +0200)] 
lib-oauth2: Reformat oauth2.h.

4 years agoauth: db-oauth2 - Add consistent prefix for all error messages
Timo Sirainen [Tue, 26 May 2020 22:49:52 +0000 (01:49 +0300)] 
auth: db-oauth2 - Add consistent prefix for all error messages

4 years agoauth: db-oauth2 - Fix debug logging
Timo Sirainen [Tue, 26 May 2020 22:36:41 +0000 (01:36 +0300)] 
auth: db-oauth2 - Fix debug logging

Don't log a debug message when the callback is going to be logging
exactly the same message as info/error.

4 years agoauth: db-oauth2 - Call db_oauth2_lookup_continue_valid() after valid grant
Timo Sirainen [Tue, 26 May 2020 22:25:41 +0000 (01:25 +0300)] 
auth: db-oauth2 - Call db_oauth2_lookup_continue_valid() after valid grant

No need to check for error/validity again in db_oauth2_lookup_continue().

4 years agoauth: db-oauth2 - db_oauth2_lookup_continue() - Minor cleanup to avoid variables
Timo Sirainen [Tue, 26 May 2020 22:22:13 +0000 (01:22 +0300)] 
auth: db-oauth2 - db_oauth2_lookup_continue() - Minor cleanup to avoid variables

4 years agoauth: db-oauth2 - Split off db_oauth2_lookup_continue_valid()
Timo Sirainen [Tue, 26 May 2020 22:20:36 +0000 (01:20 +0300)] 
auth: db-oauth2 - Split off db_oauth2_lookup_continue_valid()

4 years agoauth: db-oauth2 - db_oauth2_lookup_passwd_grant() - Reorder error handling code flow
Timo Sirainen [Tue, 26 May 2020 22:03:44 +0000 (01:03 +0300)] 
auth: db-oauth2 - db_oauth2_lookup_passwd_grant() - Reorder error handling code flow

4 years agoauth: db-oauth2 - Improve "Internal error" message for grant lookups
Timo Sirainen [Tue, 26 May 2020 22:03:11 +0000 (01:03 +0300)] 
auth: db-oauth2 - Improve "Internal error" message for grant lookups

4 years agoauth: db-oauth2 - Add and use db_oauth2_field_find()
Timo Sirainen [Tue, 26 May 2020 21:59:49 +0000 (00:59 +0300)] 
auth: db-oauth2 - Add and use db_oauth2_field_find()

4 years agoauth: db-oauth2 - Don't set db_oauth2_request.token for grant lookups
Timo Sirainen [Tue, 26 May 2020 21:57:24 +0000 (00:57 +0300)] 
auth: db-oauth2 - Don't set db_oauth2_request.token for grant lookups

The grant lookup sets the token. There's no need to set it before that.

4 years agoauth: db-oauth2 - db_oauth2_lookup_passwd_grant() - Reorder code flow
Timo Sirainen [Tue, 26 May 2020 21:50:07 +0000 (00:50 +0300)] 
auth: db-oauth2 - db_oauth2_lookup_passwd_grant() - Reorder code flow

No behavioral changes.

4 years agoauth: db-oauth2 - Refactor "OAuth2 token missing from reply" code path
Timo Sirainen [Tue, 26 May 2020 21:44:16 +0000 (00:44 +0300)] 
auth: db-oauth2 - Refactor "OAuth2 token missing from reply" code path

It can be NULL only when coming from db_oauth2_lookup_passwd_grant(),
so handle it there.

4 years agoauth: db-oauth2 - db_oauth2_template_export() - Make var_expand() error handling...
Timo Sirainen [Tue, 26 May 2020 21:36:44 +0000 (00:36 +0300)] 
auth: db-oauth2 - db_oauth2_template_export() - Make var_expand() error handling consistent

Other var_expand() errors include the original string in the error message,
so this one should also.

4 years agolib-oauth2: Improve error message when server returns unexpected result
Timo Sirainen [Tue, 26 May 2020 21:30:45 +0000 (00:30 +0300)] 
lib-oauth2: Improve error message when server returns unexpected result

If the result isn't 2xx or 4xx, use the HTTP response message as the error
message.

4 years agolib-oauth2: Don't fail if oauth response payload is NULL
Timo Sirainen [Tue, 26 May 2020 21:27:15 +0000 (00:27 +0300)] 
lib-oauth2: Don't fail if oauth response payload is NULL

oauth2_parse_json() is happy with with empty payload (Content-Length: 0),
so it should be happy also when payload is NULL (Content-Length is missing).

4 years agolib-oauth2: Remove unused oauth2-passwd-grant.c
Timo Sirainen [Tue, 26 May 2020 21:21:24 +0000 (00:21 +0300)] 
lib-oauth2: Remove unused oauth2-passwd-grant.c

4 years agolib-oauth2, auth: Remove redundant oauth2_request_result.success
Timo Sirainen [Tue, 26 May 2020 21:19:42 +0000 (00:19 +0300)] 
lib-oauth2, auth: Remove redundant oauth2_request_result.success

success is the same as (error == NULL)

4 years agolib-oauth2: json_parsed_cb() - Remove redundant success parameter
Timo Sirainen [Tue, 26 May 2020 21:12:49 +0000 (00:12 +0300)] 
lib-oauth2: json_parsed_cb() - Remove redundant success parameter

success is the same as (error == NULL)

4 years agofs-compress: Use istream-decompress
Timo Sirainen [Thu, 1 Oct 2020 13:02:26 +0000 (16:02 +0300)] 
fs-compress: Use istream-decompress

4 years agolib-compression: Fix detecting if input is bzip2 compressed
Timo Sirainen [Thu, 1 Oct 2020 12:59:37 +0000 (15:59 +0300)] 
lib-compression: Fix detecting if input is bzip2 compressed

The detection was broken at least for empty bzip2 input.

4 years agolib-compression: Add istream-decompress
Timo Sirainen [Thu, 1 Oct 2020 12:36:08 +0000 (15:36 +0300)] 
lib-compression: Add istream-decompress

This stream detects the compression format and creates the proper istream
afterwards. This is more efficient than creating each compression istream
and using istream-try.

4 years agolib-storage: Add test-mail unit test
Timo Sirainen [Thu, 19 Nov 2020 15:50:22 +0000 (17:50 +0200)] 
lib-storage: Add test-mail unit test

Initially it just accesses the mail randomly.

4 years agomail-crypt: test-mail-crypt - Use test-mail-storage API
Timo Sirainen [Thu, 19 Nov 2020 13:56:17 +0000 (15:56 +0200)] 
mail-crypt: test-mail-crypt - Use test-mail-storage API

4 years agolib-storage: Add a public test-mail-storage-common.h API
Timo Sirainen [Thu, 19 Nov 2020 13:37:54 +0000 (15:37 +0200)] 
lib-storage: Add a public test-mail-storage-common.h API

Moved the public functions into test-mail-storage-common.c

4 years agolib-storage: test-mail-storage - Die on test_mail_init_user() failure
Timo Sirainen [Thu, 19 Nov 2020 14:13:53 +0000 (16:13 +0200)] 
lib-storage: test-mail-storage - Die on test_mail_init_user() failure

This way the caller won't need to do error handling. The errors were
being handled inconsistently.

4 years agolib-storage: test-mail-storage - Remove randomness from test home directory
Timo Sirainen [Thu, 19 Nov 2020 13:35:07 +0000 (15:35 +0200)] 
lib-storage: test-mail-storage - Remove randomness from test home directory

Also rename test_mail_storage_ctx.mail_home to home_root to better describe
it.

4 years agolib-storage: test-mail-storage - Change test_mail_init() to allocate the struct
Timo Sirainen [Thu, 19 Nov 2020 13:32:20 +0000 (15:32 +0200)] 
lib-storage: test-mail-storage - Change test_mail_init() to allocate the struct

4 years agolib-storage: test-mail-storage - Use settings struct for test_mail_init_user()
Timo Sirainen [Thu, 19 Nov 2020 13:29:01 +0000 (15:29 +0200)] 
lib-storage: test-mail-storage - Use settings struct for test_mail_init_user()

4 years agolib: i_stream_read() - Don't create empty snapshots
Timo Sirainen [Thu, 22 Oct 2020 09:22:40 +0000 (12:22 +0300)] 
lib: i_stream_read() - Don't create empty snapshots

This allows the read() implementation to read data into the existing
memarea. Otherwise a new memarea might have to be created because the old
one is referenced by the snapshot.

4 years agoimap: Process title wrongly shows connections are "corked"
Timo Sirainen [Thu, 29 Oct 2020 11:35:35 +0000 (13:35 +0200)] 
imap: Process title wrongly shows connections are "corked"

The flush callback in ostream-file always corks the connection, so the
process title needs to be delayed until it's no longer in that callback.
Add a 0-timeout to update the process title.

4 years agolib-lua: Rewrite arg checking macros to use STMT_{START,END}
Josef 'Jeff' Sipek [Wed, 25 Nov 2020 16:03:57 +0000 (11:03 -0500)] 
lib-lua: Rewrite arg checking macros to use STMT_{START,END}

This makes it safer to use.  Additionally, this commit adds some newlines to
the macro definition to make it more readable.

4 years agologin-proxy: Use persistent istream buffers
Timo Sirainen [Tue, 10 Nov 2020 14:10:05 +0000 (16:10 +0200)] 
login-proxy: Use persistent istream buffers

Constantly freeing and allocating the memory is a bit slow, but because
Dovecot allocates all memory with calloc() the memory cleaing is especially
slow. With this change proxying lots of data in a plaintext connection
takes about 50% less CPU. The downside is that it uses about 4 kB more
memory per istream (8 kB total, for both client and server connections),
but that shouldn't be too bad for proxies since they don't use much memory
otherwise.

4 years agolib-mail: test-istream-qp-decoder.c - Free input_data_limited
Martti Rannanjärvi [Wed, 2 Dec 2020 04:06:59 +0000 (06:06 +0200)] 
lib-mail: test-istream-qp-decoder.c - Free input_data_limited

4 years agolib-http: http-client-request - Fix payload assertions in http_client_request_send_mo...
Stephan Bosch [Tue, 1 Dec 2020 09:25:09 +0000 (10:25 +0100)] 
lib-http: http-client-request - Fix payload assertions in http_client_request_send_more().

When the request payload is finished, both req->payload_input and
req->payload_output could be NULL, so the assertions on those being not NULL
need to happen after the check for req->payload_finished.

This particularly causes problems with the
blocking http_client_request_send/finish_payload() API, which constantly
modifies req->payload_input and sets it to NULL to finish the output.

This caused a panic:

Panic: file http-client-request.c: line 1232 (http_client_request_send_more): assertion failed: (req->payload_input != NULL)

4 years agolib-http: test-http-payload - Add test for blocking client output payload.
Stephan Bosch [Wed, 4 Apr 2018 13:18:51 +0000 (15:18 +0200)] 
lib-http: test-http-payload - Add test for blocking client output payload.

4 years agolib-http: test-http-payload - Implement reference counting for client request.
Stephan Bosch [Wed, 4 Apr 2018 01:02:24 +0000 (03:02 +0200)] 
lib-http: test-http-payload - Implement reference counting for client request.

4 years agolib-http: Reformat http-client-request.c.
Stephan Bosch [Sat, 27 Jun 2020 16:48:40 +0000 (18:48 +0200)] 
lib-http: Reformat http-client-request.c.

4 years agonotify: Free notify_mail_txn when a plugin does not define mail_transaction_commit
Martti Rannanjärvi [Tue, 25 Feb 2020 11:08:21 +0000 (13:08 +0200)] 
notify: Free notify_mail_txn when a plugin does not define mail_transaction_commit

4 years agolib-mail: Add tests for message-size functions
Markus Valentin [Fri, 6 Nov 2020 10:47:18 +0000 (11:47 +0100)] 
lib-mail: Add tests for message-size functions

Integrate testing of header and body size to existing tests and add new
tests specifically for message-size.

4 years agolib-mail: Extend quoted-printable encoding tests
Markus Valentin [Mon, 9 Nov 2020 11:35:09 +0000 (12:35 +0100)] 
lib-mail: Extend quoted-printable encoding tests

4 years agolib-mail: Extend quoted-printable decoding tests
Markus Valentin [Wed, 4 Nov 2020 13:38:10 +0000 (14:38 +0100)] 
lib-mail: Extend quoted-printable decoding tests

4 years agolib-mail: qp-encoder: Ensure trailing white space is followed by printable
Markus Valentin [Thu, 19 Nov 2020 12:30:54 +0000 (13:30 +0100)] 
lib-mail: qp-encoder: Ensure trailing white space is followed by printable

In case a qp-encoded line ends with space or tab append a soft line
break to prevent white space being cut off by decoding instance.

4 years agolib-mail: test-message-parser - Convert to signed when calculating variance
Aki Tuomi [Thu, 19 Nov 2020 13:32:00 +0000 (15:32 +0200)] 
lib-mail: test-message-parser - Convert to signed when calculating variance

Satisfies runtime analyser, broken in 6b60e5ed490

4 years agolib-mail: message-decoder - Fix CTE parser to accept only syntaxically valid values
Aki Tuomi [Wed, 18 Nov 2020 07:43:07 +0000 (09:43 +0200)] 
lib-mail: message-decoder - Fix CTE parser to accept only syntaxically valid values

4 years agolib-mail: test-rfc822-parser - Add tests for content-type full parsing
Aki Tuomi [Tue, 17 Nov 2020 07:29:30 +0000 (09:29 +0200)] 
lib-mail: test-rfc822-parser - Add tests for content-type full parsing

4 years agolib-mail: message-decoder - Constify message_decoder_parse_cte parameter
Aki Tuomi [Wed, 18 Nov 2020 07:31:03 +0000 (09:31 +0200)] 
lib-mail: message-decoder - Constify message_decoder_parse_cte parameter

4 years agolib-mail: rfc822-parser - Fix content-type parser to accept only valid values
Aki Tuomi [Mon, 16 Nov 2020 14:20:30 +0000 (16:20 +0200)] 
lib-mail: rfc822-parser - Fix content-type parser to accept only valid values

4 years agoimap: Fix potential hang if client disconnects with pipelined ambiguous commands
Timo Sirainen [Thu, 29 Oct 2020 10:55:21 +0000 (12:55 +0200)] 
imap: Fix potential hang if client disconnects with pipelined ambiguous commands

For example if client pipelines FETCH+LOGOUT commands and disconnects during
a large FETCH output, the LOGOUT command is processed as waiting for
unambiguity. This code path however doesn't detect a client disconnection,
and input IO handler is removed so it can't detect it either. So the imap
process hangs.

4 years agoimap: Move disconnected-check inside client_continue_pending_input()
Timo Sirainen [Thu, 29 Oct 2020 10:52:16 +0000 (12:52 +0200)] 
imap: Move disconnected-check inside client_continue_pending_input()

This way all of its callers don't have to check if the client is
disconnected.

4 years agolib-storage: Update comments about mail_search_args_init() and refcount handling
Timo Sirainen [Thu, 19 Nov 2020 09:00:43 +0000 (11:00 +0200)] 
lib-storage: Update comments about mail_search_args_init() and refcount handling

4 years agodoveadm: Add timestamp prefixes for debug output
Siavash Tavakoli [Mon, 23 Nov 2020 12:17:52 +0000 (12:17 +0000)] 
doveadm: Add timestamp prefixes for debug output

But still allow overriding from env by setting LOG_STDERR_TIMESTAMP.

4 years agolib-dict: dict_iterate() - Fix segfault with DICT_ITERATE_FLAG_NO_VALUE
Timo Sirainen [Mon, 23 Nov 2020 16:15:57 +0000 (18:15 +0200)] 
lib-dict: dict_iterate() - Fix segfault with DICT_ITERATE_FLAG_NO_VALUE

Broken by cf0d196c2b373a37bc1ab4e10fde89fb61089f3c

4 years agodict-cdb: Fix to use new dict.iterate() API
Timo Sirainen [Mon, 23 Nov 2020 14:49:49 +0000 (16:49 +0200)] 
dict-cdb: Fix to use new dict.iterate() API

Forgot in 65b7f04f945781cd042f5ad2f6f104f532143ee7

4 years agom4: size_t_signed.m4 - use static assertion instead of run test
rofl0r [Fri, 22 Nov 2019 01:17:32 +0000 (01:17 +0000)] 
m4: size_t_signed.m4 - use static assertion instead of run test

a small step towards cross-compile-ability.

4 years agolib-index: Improve debug logging
Timo Sirainen [Mon, 10 Aug 2020 17:18:48 +0000 (20:18 +0300)] 
lib-index: Improve debug logging

4 years agolib-index: Handle rapidly rotating transaction logs without unnecessary fsck
Timo Sirainen [Mon, 10 Aug 2020 17:16:30 +0000 (20:16 +0300)] 
lib-index: Handle rapidly rotating transaction logs without unnecessary fsck

4 years agolib-index: mail_index_reopen_if_changed() - Add reopened_r parameter
Timo Sirainen [Mon, 10 Aug 2020 15:00:09 +0000 (18:00 +0300)] 
lib-index: mail_index_reopen_if_changed() - Add reopened_r parameter

4 years agolib-index: mail_index_sync_map() - Move corruption handling to caller
Timo Sirainen [Mon, 10 Aug 2020 14:53:08 +0000 (17:53 +0300)] 
lib-index: mail_index_sync_map() - Move corruption handling to caller

4 years agolib-index: mail_index_map_latest_sync() - Minor refactoring
Timo Sirainen [Mon, 10 Aug 2020 14:45:08 +0000 (17:45 +0300)] 
lib-index: mail_index_map_latest_sync() - Minor refactoring

4 years agolib-index: Split off mail_index_map_latest_sync()
Timo Sirainen [Mon, 10 Aug 2020 14:43:50 +0000 (17:43 +0300)] 
lib-index: Split off mail_index_map_latest_sync()