]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
6 years agolib-dcrypt: Add tests for raw keys
Aki Tuomi [Mon, 19 Aug 2019 19:40:02 +0000 (22:40 +0300)] 
lib-dcrypt: Add tests for raw keys

6 years agolib-dcrypt: Implement raw key API using OpenSSL
Aki Tuomi [Mon, 19 Aug 2019 11:39:05 +0000 (14:39 +0300)] 
lib-dcrypt: Implement raw key API using OpenSSL

6 years agolib-dcrypt: Add API for dealing with raw keys
Aki Tuomi [Mon, 19 Aug 2019 11:20:47 +0000 (14:20 +0300)] 
lib-dcrypt: Add API for dealing with raw keys

6 years agolib-dcrypt: Fix i2d_ASN1_OBJECT usage
Aki Tuomi [Fri, 23 Aug 2019 16:39:16 +0000 (19:39 +0300)] 
lib-dcrypt: Fix i2d_ASN1_OBJECT usage

i2d_ASN1_OBJECT tells how much memory we need.

6 years agolib-dcrypt: Symbolize maximum OID length
Aki Tuomi [Fri, 23 Aug 2019 10:48:03 +0000 (13:48 +0300)] 
lib-dcrypt: Symbolize maximum OID length

6 years agolib-dcrypt: Use len instead of ln
Aki Tuomi [Fri, 23 Aug 2019 10:46:33 +0000 (13:46 +0300)] 
lib-dcrypt: Use len instead of ln

6 years agolib-http: Make http_client_request_delay_from_response() public
Timo Sirainen [Mon, 19 Aug 2019 09:11:59 +0000 (12:11 +0300)] 
lib-http: Make http_client_request_delay_from_response() public

6 years agopush-notification: Allow easy access to Message-ID header
Timo Sirainen [Fri, 16 Aug 2019 19:07:51 +0000 (22:07 +0300)] 
push-notification: Allow easy access to Message-ID header

6 years agolib-lda: mail-deliver - Emit events at start and finish of delivery.
Stephan Bosch [Tue, 12 Mar 2019 22:23:35 +0000 (23:23 +0100)] 
lib-lda: mail-deliver - Emit events at start and finish of delivery.

6 years agolib-lda: Replace i_warning() with e_warning().
Stephan Bosch [Sun, 10 Mar 2019 12:08:34 +0000 (13:08 +0100)] 
lib-lda: Replace i_warning() with e_warning().

6 years agolib-lda: Replace i_info() with e_info().
Stephan Bosch [Sun, 10 Mar 2019 12:01:08 +0000 (13:01 +0100)] 
lib-lda: Replace i_info() with e_info().

6 years agolib-lda: Replace i_error() with e_error().
Stephan Bosch [Sun, 10 Mar 2019 11:58:03 +0000 (12:58 +0100)] 
lib-lda: Replace i_error() with e_error().

6 years agolib-lda: mail-deliver - Add message fields to the deliver event.
Stephan Bosch [Sun, 10 Mar 2019 09:53:51 +0000 (10:53 +0100)] 
lib-lda: mail-deliver - Add message fields to the deliver event.

6 years agolib-lda: mail-deliver - Rename mail_deliver_cache to mail_deliver_fields.
Stephan Bosch [Sun, 10 Mar 2019 11:13:10 +0000 (12:13 +0100)] 
lib-lda: mail-deliver - Rename mail_deliver_cache to mail_deliver_fields.

Also make the fields public.

6 years agolda: Use LDA event as mail_*user's parent event.
Stephan Bosch [Mon, 4 Mar 2019 00:15:47 +0000 (01:15 +0100)] 
lda: Use LDA event as mail_*user's parent event.

6 years agolda: Add support for event API.
Stephan Bosch [Mon, 4 Mar 2019 00:12:55 +0000 (01:12 +0100)] 
lda: Add support for event API.

6 years agolda: Assign envelope fields in mail deliver context right away.
Stephan Bosch [Mon, 4 Mar 2019 00:08:21 +0000 (01:08 +0100)] 
lda: Assign envelope fields in mail deliver context right away.

6 years agolmtp: lmtp-local - Use recipient event for mail delivery.
Stephan Bosch [Sun, 3 Mar 2019 23:30:27 +0000 (00:30 +0100)] 
lmtp: lmtp-local - Use recipient event for mail delivery.

6 years agolib-lda: mail-deliver - Add support for event API.
Stephan Bosch [Sun, 3 Mar 2019 23:28:42 +0000 (00:28 +0100)] 
lib-lda: mail-deliver - Add support for event API.

6 years agolib-lda: Initialize/deinitialize mail_deliver_context in separate functions.
Stephan Bosch [Wed, 27 Mar 2019 00:25:57 +0000 (01:25 +0100)] 
lib-lda: Initialize/deinitialize mail_deliver_context in separate functions.

This changes the allocation of parsed SMTP addresses to initially use a
datastack pool rather than the mail_deliver context pool. This is necessary
because the context is created a bit later. Upon mail_deliver_init(), the
addresses are moved to the context pool.

6 years agolda: Move mail_deliver() invocation to a separate function.
Stephan Bosch [Sun, 31 Mar 2019 14:14:06 +0000 (16:14 +0200)] 
lda: Move mail_deliver() invocation to a separate function.

6 years agolib-lda: mail-deliver - Split the mail_deliver() function to perform post-delivery...
Stephan Bosch [Mon, 4 Mar 2019 00:19:05 +0000 (01:19 +0100)] 
lib-lda: mail-deliver - Split the mail_deliver() function to perform post-delivery cleanup in one place.

6 years agolib: str - Add str_replace().
Stephan Bosch [Thu, 14 Mar 2019 23:14:05 +0000 (00:14 +0100)] 
lib: str - Add str_replace().

6 years agolib: buffer - Add buffer_replace().
Stephan Bosch [Thu, 14 Mar 2019 22:55:00 +0000 (23:55 +0100)] 
lib: buffer - Add buffer_replace().

6 years agolib: buffer - Improve header comment for buffer_insert() and buffer_delete().
Stephan Bosch [Sun, 17 Mar 2019 23:52:37 +0000 (00:52 +0100)] 
lib: buffer - Improve header comment for buffer_insert() and buffer_delete().

6 years agolib: test-istream-base64-decoder - Make random test also test CRLF vs LF line endings...
Stephan Bosch [Thu, 5 Sep 2019 11:06:28 +0000 (13:06 +0200)] 
lib: test-istream-base64-decoder - Make random test also test CRLF vs LF line endings at random.

6 years agolib: test-istream-base64-decoder - Add explicit test cases for decoding the empty...
Stephan Bosch [Thu, 5 Sep 2019 09:50:04 +0000 (11:50 +0200)] 
lib: test-istream-base64-decoder - Add explicit test cases for decoding the empty string.

6 years agolib: test-base64 - Add explicit test cases for encoding/decoding the empty string.
Stephan Bosch [Thu, 5 Sep 2019 09:45:02 +0000 (11:45 +0200)] 
lib: test-base64 - Add explicit test cases for encoding/decoding the empty string.

6 years agolib: base64 - Add assertion preventing calling base64_encode_more() after base64_enco...
Stephan Bosch [Thu, 5 Sep 2019 00:31:58 +0000 (02:31 +0200)] 
lib: base64 - Add assertion preventing calling base64_encode_more() after base64_encode_finish().

6 years agolib: test-istream-base64-decoder - Reduce minimum random stream buffer size to 1.
Stephan Bosch [Wed, 4 Sep 2019 23:13:46 +0000 (01:13 +0200)] 
lib: test-istream-base64-decoder - Reduce minimum random stream buffer size to 1.

6 years agolib: test-istream-base64-decoder - Abort random test at first error and print parameters.
Stephan Bosch [Wed, 4 Sep 2019 23:11:53 +0000 (01:11 +0200)] 
lib: test-istream-base64-decoder - Abort random test at first error and print parameters.

6 years agolib: test-istream-base64-encoder - Fix test names.
Stephan Bosch [Wed, 4 Sep 2019 21:40:25 +0000 (23:40 +0200)] 
lib: test-istream-base64-encoder - Fix test names.

6 years agolib: test-base64 - Abort random test at first error and print parameters.
Stephan Bosch [Wed, 4 Sep 2019 21:37:11 +0000 (23:37 +0200)] 
lib: test-base64 - Abort random test at first error and print parameters.

6 years agolib: test-base64 - Test Base64 encoding with maximum line length of 1.
Stephan Bosch [Wed, 4 Sep 2019 21:16:24 +0000 (23:16 +0200)] 
lib: test-base64 - Test Base64 encoding with maximum line length of 1.

This corner case is a useful test for problems in the line encoding.

6 years agolib: test-base64 - Better check output of incrementally encoded random Base64.
Stephan Bosch [Wed, 4 Sep 2019 20:52:00 +0000 (22:52 +0200)] 
lib: test-base64 - Better check output of incrementally encoded random Base64.

Check whether it is equal to the same data encoded as a single block and whether
the length matches the base64_get_full_encoded_size() output.

6 years agolib: base64 - Fix incremental/streaming Base64 encoding with CRLF line endings.
Stephan Bosch [Wed, 4 Sep 2019 20:44:03 +0000 (22:44 +0200)] 
lib: base64 - Fix incremental/streaming Base64 encoding with CRLF line endings.

Line lengths became inconsistent due to a design error. The encoding itself
remained valid. The linefeed is no longer appended to the write buffer when the
destination buffer is full. Rather, a flag is set that makes the encoder emit
the linefeed immediately next time the encoder is called with more buffer
space. Appending it to the write buffer was wrong; it in fact needs to be
prepended and in that case a flag is more efficient.

6 years agolib: base64 - Restructure base64_encode_get_size().
Stephan Bosch [Wed, 4 Sep 2019 23:17:55 +0000 (01:17 +0200)] 
lib: base64 - Restructure base64_encode_get_size().

6 years agolib: base64 - Use unsigned size type for base64_get_full_encoded_size().
Stephan Bosch [Wed, 4 Sep 2019 20:23:25 +0000 (22:23 +0200)] 
lib: base64 - Use unsigned size type for base64_get_full_encoded_size().

Makes more sense.

6 years agolib: base64 - Truly fix dest buffer assertion in base64_decode_more().
Stephan Bosch [Wed, 4 Sep 2019 16:34:30 +0000 (18:34 +0200)] 
lib: base64 - Truly fix dest buffer assertion in base64_decode_more().

Previous fix was inadequate in the presence of padding at the end of input.

6 years agolib: test-istream-base64-decoder - Use unsigned int for bit field in random test.
Stephan Bosch [Thu, 5 Sep 2019 12:21:53 +0000 (14:21 +0200)] 
lib: test-istream-base64-decoder - Use unsigned int for bit field in random test.

6 years agolib: base64 - Fix dest buffer assertion in base64_decode_more().
Stephan Bosch [Wed, 4 Sep 2019 10:33:08 +0000 (12:33 +0200)] 
lib: base64 - Fix dest buffer assertion in base64_decode_more().

The assertion is supposed to trigger when the encoder hits the buffer size limit
unexpectedly (src_pos_r==NULL means that all should be encoded at once). It
triggered erroneously when the destination buffer had the exact size needed
for the encoded data.

6 years agolib: test-istream-base64-decoder - Add extensive random base64 stream I/O unit test.
Stephan Bosch [Tue, 3 Sep 2019 19:45:35 +0000 (21:45 +0200)] 
lib: test-istream-base64-decoder - Add extensive random base64 stream I/O unit test.

6 years agolib: istream-base64-encoder - Fix handling of error, EOF and stream buffer overflow...
Stephan Bosch [Tue, 3 Sep 2019 19:44:55 +0000 (21:44 +0200)] 
lib: istream-base64-encoder - Fix handling of error, EOF and stream buffer overflow conditions.

6 years agolib: istream-base64-decoder - Fix handling of error, EOF and stream buffer overflow...
Stephan Bosch [Tue, 3 Sep 2019 19:43:31 +0000 (21:43 +0200)] 
lib: istream-base64-decoder - Fix handling of error, EOF and stream buffer overflow conditions.

6 years agolib: base64 - Restructure encoder to always fill the output buffer as much as possible.
Stephan Bosch [Tue, 3 Sep 2019 16:37:57 +0000 (18:37 +0200)] 
lib: base64 - Restructure encoder to always fill the output buffer as much as possible.

This is not strictly required, but makes the encoder easier to use in streams
and less bug-prone in incremental encoding applications in general.

6 years agolib: base64 - Allow encoding line endings one octet at a time.
Stephan Bosch [Tue, 3 Sep 2019 16:15:57 +0000 (18:15 +0200)] 
lib: base64 - Allow encoding line endings one octet at a time.

6 years agolib: base64 - Add more w_buf_len assertions to encoder.
Stephan Bosch [Tue, 3 Sep 2019 19:10:55 +0000 (21:10 +0200)] 
lib: base64 - Add more w_buf_len assertions to encoder.

6 years agolib: base64 - Use sizeof() for determining the size of the encoder w_buf.
Stephan Bosch [Tue, 3 Sep 2019 19:04:20 +0000 (21:04 +0200)] 
lib: base64 - Use sizeof() for determining the size of the encoder w_buf.

6 years agolib: base64 - Fix base64_get_full_encoded_size() for size 0.
Stephan Bosch [Tue, 3 Sep 2019 10:22:16 +0000 (12:22 +0200)] 
lib: base64 - Fix base64_get_full_encoded_size() for size 0.

6 years agolib: istream-base64-decoder - Use i_stream_try_alloc() properly.
Stephan Bosch [Mon, 2 Sep 2019 20:48:30 +0000 (22:48 +0200)] 
lib: istream-base64-decoder - Use i_stream_try_alloc() properly.

6 years agolib: istream-base64-encoder - Use i_stream_try_alloc() properly.
Stephan Bosch [Mon, 2 Sep 2019 19:56:37 +0000 (21:56 +0200)] 
lib: istream-base64-encoder - Use i_stream_try_alloc() properly.

6 years agoimap: previews/snippets requested with lazy update the caching decision
Markus Valentin [Tue, 3 Sep 2019 12:38:17 +0000 (14:38 +0200)] 
imap: previews/snippets requested with lazy update the caching decision

If lazy is true set the lookup_abort to NOT_IN_CACHE_START_CACHING
which results in the snippet field becoming wanted for caching.

6 years agolib-storage: change caching decision for lazy requests in cache lookup
Markus Valentin [Tue, 3 Sep 2019 12:33:03 +0000 (14:33 +0200)] 
lib-storage: change caching decision for lazy requests in cache lookup

In case  lookup_abort is set to NOT_IN_CACHE_START_CACHING update the
cacheing decision for the requested field.

6 years agolib-storage: introduce MAIL_LOOKUP_ABORT_NOT_IN_CACHE_START_CACHING
Markus Valentin [Tue, 3 Sep 2019 12:30:15 +0000 (14:30 +0200)] 
lib-storage: introduce MAIL_LOOKUP_ABORT_NOT_IN_CACHE_START_CACHING

In some cases we would like to mark an field as to be cached but still
don't fetch it now. For this occasions this change introduces a new enum
value for mail_lookup_abort which allows to implement such a behaviour.

6 years agolib-index: move mail_cache_decision_add to public header
Markus Valentin [Tue, 3 Sep 2019 12:16:41 +0000 (14:16 +0200)] 
lib-index: move mail_cache_decision_add to public header

To allow other components to mark fields as to be cached move the
declaration from mail-cache-private.h to mail-cache.h.

6 years agolib-ssl-iostream: Remove problematic unit tests
Aki Tuomi [Mon, 2 Sep 2019 11:09:04 +0000 (14:09 +0300)] 
lib-ssl-iostream: Remove problematic unit tests

These unit tests are unreliable with new versions of openssl
present in ubuntu 18 and debian buster.

6 years agoauth: winbind - Make static analyzer happier
Timo Sirainen [Sun, 1 Sep 2019 17:50:05 +0000 (20:50 +0300)] 
auth: winbind - Make static analyzer happier

6 years agolib: base64 - Add high-level data and string encode functions with data stack buffer...
Stephan Bosch [Wed, 28 Aug 2019 21:21:31 +0000 (23:21 +0200)] 
lib: base64 - Add high-level data and string encode functions with data stack buffer output.

6 years agolib: base64 - Add flags and max_line_size parameters to the new high-level encode...
Stephan Bosch [Wed, 28 Aug 2019 22:42:14 +0000 (00:42 +0200)] 
lib: base64 - Add flags and max_line_size parameters to the new high-level encode functions.

Cannot change the API of existing functions.

6 years agolib: base64 - Add high-level data decode functions with data stack buffer output.
Stephan Bosch [Wed, 28 Aug 2019 22:04:54 +0000 (00:04 +0200)] 
lib: base64 - Add high-level data decode functions with data stack buffer output.

Similar functions accepting C string input already exist.

6 years agolib: base64 - Add flags parameters to the new high-level decode functions.
Stephan Bosch [Wed, 28 Aug 2019 21:34:54 +0000 (23:34 +0200)] 
lib: base64 - Add flags parameters to the new high-level decode functions.

Cannot change the API of existing functions.

6 years agolib: base64 - Add BASE64_DECODE_FLAG_IGNORE_PADDING.
Stephan Bosch [Tue, 27 Aug 2019 23:21:01 +0000 (01:21 +0200)] 
lib: base64 - Add BASE64_DECODE_FLAG_IGNORE_PADDING.

Makes padding optional rather than either disallowed or required.

6 years agolib: base64 - Reformat flag handling in base64_decode_more().
Stephan Bosch [Tue, 27 Aug 2019 18:46:42 +0000 (20:46 +0200)] 
lib: base64 - Reformat flag handling in base64_decode_more().

6 years agolib: base64 - Remove unused assignment.
Stephan Bosch [Tue, 27 Aug 2019 18:37:40 +0000 (20:37 +0200)] 
lib: base64 - Remove unused assignment.

Found by Clang scan-build.

6 years agolib: base64 - Add support for decoding without padding.
Stephan Bosch [Fri, 17 May 2019 08:17:19 +0000 (10:17 +0200)] 
lib: base64 - Add support for decoding without padding.

6 years agolib: base64 - Add support for encoding without padding.
Stephan Bosch [Wed, 15 May 2019 13:36:18 +0000 (15:36 +0200)] 
lib: base64 - Add support for encoding without padding.

6 years agolib: istream-base64-encoder - Use the new low-level incremental Base64 encoding API.
Stephan Bosch [Tue, 2 Apr 2019 18:45:54 +0000 (20:45 +0200)] 
lib: istream-base64-encoder - Use the new low-level incremental Base64 encoding API.

6 years agolib: base64 - Add support for adding line breaks to encoded output.
Stephan Bosch [Mon, 1 Apr 2019 23:49:57 +0000 (01:49 +0200)] 
lib: base64 - Add support for adding line breaks to encoded output.

6 years agolib: base64 - Add base64_get_full_encoded_size().
Stephan Bosch [Wed, 15 May 2019 08:09:01 +0000 (10:09 +0200)] 
lib: base64 - Add base64_get_full_encoded_size().

6 years agolib: base64 - Add decode flag for prohibiting whitespace.
Stephan Bosch [Sat, 30 Mar 2019 17:57:34 +0000 (18:57 +0100)] 
lib: base64 - Add decode flag for prohibiting whitespace.

6 years agolib: base64 - Deprecate src_pos_r parameter of base64_decode().
Stephan Bosch [Mon, 26 Aug 2019 11:09:30 +0000 (13:09 +0200)] 
lib: base64 - Deprecate src_pos_r parameter of base64_decode().

Only NULL pointer is allowed. This allows using the new incremental API
internally, thereby dropping the old decoder implementation.

6 years agolib: istream-base64-decoder - Use the new low-level incremental Base64 decoding API.
Stephan Bosch [Sat, 30 Mar 2019 18:12:39 +0000 (19:12 +0100)] 
lib: istream-base64-decoder - Use the new low-level incremental Base64 decoding API.

6 years agolib: base64 - Properly implemenent incremental decoding.
Stephan Bosch [Sat, 30 Mar 2019 18:08:10 +0000 (19:08 +0100)] 
lib: base64 - Properly implemenent incremental decoding.

6 years agolib: base64 - Properly implemenent incremental encoding.
Stephan Bosch [Sat, 16 Mar 2019 20:19:49 +0000 (21:19 +0100)] 
lib: base64 - Properly implemenent incremental encoding.

6 years agolib: buffer - Add buffer_get_avail_size().
Stephan Bosch [Sun, 31 Mar 2019 11:18:04 +0000 (13:18 +0200)] 
lib: buffer - Add buffer_get_avail_size().

This determines how much data can be added to buffer.

6 years agolib: istream-base64 - Add support for base64url encoding.
Stephan Bosch [Wed, 13 Feb 2019 18:36:52 +0000 (19:36 +0100)] 
lib: istream-base64 - Add support for base64url encoding.

6 years agolib: base64 - Add support for base64url encoding.
Stephan Bosch [Wed, 13 Feb 2019 16:55:31 +0000 (17:55 +0100)] 
lib: base64 - Add support for base64url encoding.

6 years agolib: base64 - Make code suitable for encoding/decoding different Base64 variants.
Stephan Bosch [Wed, 13 Feb 2019 18:00:11 +0000 (19:00 +0100)] 
lib: base64 - Make code suitable for encoding/decoding different Base64 variants.

6 years agolib: base64 - Add structural comments.
Stephan Bosch [Fri, 17 May 2019 08:09:11 +0000 (10:09 +0200)] 
lib: base64 - Add structural comments.

6 years agolib: base64.h - Move size macros.
Stephan Bosch [Wed, 13 Feb 2019 18:09:43 +0000 (19:09 +0100)] 
lib: base64.h - Move size macros.

6 years agolib: base64 - Make encoding table an explicit array.
Stephan Bosch [Wed, 13 Feb 2019 18:05:38 +0000 (19:05 +0100)] 
lib: base64 - Make encoding table an explicit array.

Before, it was a string constant.

6 years agolib: base64.c - Move mapping tables.
Stephan Bosch [Wed, 13 Feb 2019 18:03:02 +0000 (19:03 +0100)] 
lib: base64.c - Move mapping tables.

6 years agolib: test-base64 - Make sure base64_decode() won't allocate any extra space
Timo Sirainen [Tue, 28 May 2019 19:44:43 +0000 (22:44 +0300)] 
lib: test-base64 - Make sure base64_decode() won't allocate any extra space

I was just considering an optimization where it would, until I realized it
could break some existing code.

6 years agolib: test-base64 - Cleanup: Use more exact test_asserts
Timo Sirainen [Tue, 28 May 2019 09:57:24 +0000 (12:57 +0300)] 
lib: test-base64 - Cleanup: Use more exact test_asserts

This way it's easier to see why tests are failing.

6 years agolib: test-base64 - Cleanup: Use the same struct for test input and output
Timo Sirainen [Tue, 28 May 2019 09:51:09 +0000 (12:51 +0300)] 
lib: test-base64 - Cleanup: Use the same struct for test input and output

6 years agolib: test-base64 - Test MAX_BASE64_{EN,DE}CODED_SIZE() with existing tests
Josef 'Jeff' Sipek [Fri, 29 Mar 2019 07:59:09 +0000 (09:59 +0200)] 
lib: test-base64 - Test MAX_BASE64_{EN,DE}CODED_SIZE() with existing tests

6 years agolib: base64 - Change MAX_BASE64_DECODED_SIZE() to be more exact
Timo Sirainen [Tue, 28 May 2019 10:35:11 +0000 (13:35 +0300)] 
lib: base64 - Change MAX_BASE64_DECODED_SIZE() to be more exact

If the input has only full base64 blocks (is divisible by 4), there's no
need to add the extra +3.

6 years agolib: base64 - Simplify MAX_BASE64_ENCODED_SIZE() calculation
Josef 'Jeff' Sipek [Thu, 28 Mar 2019 09:25:41 +0000 (11:25 +0200)] 
lib: base64 - Simplify MAX_BASE64_ENCODED_SIZE() calculation

Rely on (X + (Y - 1)) / Y being the same as ceil(X / Y) when operating on
integers.

This has a couple of benefits over the previous expression:

 1) the size argument is evaluated only once
 2) the generated code is simpler (no conditional instructions)
 3) the generated code is smaller

The generated code shrinks in terms of both bytes and instruction count.
The following table lists the number of bytes (B) and instructions (I) used
by the code before and after this change on an assortment of architectures
when the input is not known at compile time.  Unless otherwise noted, the
results are based clang 6.0.1 output.

         | before  | after  |    delta
---------+---------+--------+-------------
aarch64  | 32B  8I | 24B 6I | -25%B -25%I
amd64    | 38B 10I | 25B 5I | -34%B -50%I
amd64 [1]| 43B 10I | 31B 6I | -28%B -40%I
armv7    | 36B  9I | 24B 6I | -33%B -33%I
i386     | 32B 12I | 20B 6I | -38%B -50%I
i386 [1] | 35B 11I | 25B 7I | -29%B -36%I
ppc32    | 44B 11I | 20B 5I | -55%B -55%I
ppc64    | 52B 13I | 32B 8I | -38%B -38%I
s390x    | 74B 16I | 26B 5I | -65%B -69%I
sparcv9  | 36B  9I | 12B 3I | -66%B -66%I

[1] gcc 8.2.0

6 years agolib: Fix updating timeouts after time moves backwards
Timo Sirainen [Sat, 17 Aug 2019 10:44:53 +0000 (13:44 +0300)] 
lib: Fix updating timeouts after time moves backwards

Broken by b258137d0e0618ae792e3606071a1715d26f107b

Fixes:
Panic: file ioloop.c: line 479 (timeout_get_wait_time): assertion failed: (ret > 0 && tv_r->tv_sec >= 0 && tv_r->tv_usec >= 0)

6 years agolib: timeval_add/sub_usecs() - Add assert to make sure negative values aren't used
Timo Sirainen [Sat, 17 Aug 2019 10:43:21 +0000 (13:43 +0300)] 
lib: timeval_add/sub_usecs() - Add assert to make sure negative values aren't used

The current code doesn't work correctly if negative values are used.
The code could of course be changed to handle them, but maybe assert is
better to catch bugs.

6 years agolib, lib-dcrypt: Fix unit tests to check i_stream_read() return value
Timo Sirainen [Sun, 18 Aug 2019 14:44:33 +0000 (17:44 +0300)] 
lib, lib-dcrypt: Fix unit tests to check i_stream_read() return value

6 years agocassandra: Fix crash due to race condition with threads
Timo Sirainen [Fri, 9 Aug 2019 09:19:17 +0000 (12:19 +0300)] 
cassandra: Fix crash due to race condition with threads

Broken by changes in 0a5a2b81c266c11c34ab36b20816909dc3e715ac

The crash could happen because driver_cassandra_future_callback() can be
called any time, even before returning from driver_cassandra_set_callback().
This could result in both cb->id and cb->to being set and using the cb
after it's already freed.

6 years agocassandra: Cleanup - Move code to cassandra_callback_detach()
Timo Sirainen [Fri, 9 Aug 2019 09:18:04 +0000 (12:18 +0300)] 
cassandra: Cleanup - Move code to cassandra_callback_detach()

6 years agolib-storage: Add mailbox_attribute_internal.iter()
Timo Sirainen [Wed, 14 Aug 2019 16:18:20 +0000 (19:18 +0300)] 
lib-storage: Add mailbox_attribute_internal.iter()

This mainly allows internal attributes with children to actually be able to
list the childrens' keys.

6 years agoimap: Only send NIL on GETMETADATA when query depth is 0
Martti Rannanjärvi [Fri, 9 Aug 2019 11:07:58 +0000 (14:07 +0300)] 
imap: Only send NIL on GETMETADATA when query depth is 0

6 years agoimap: GETMETADATA: Ignore MAIL_ERROR_NOTPOSSIBLE errors when using DEPTH parameter
Timo Sirainen [Wed, 7 Aug 2019 12:46:39 +0000 (15:46 +0300)] 
imap: GETMETADATA: Ignore MAIL_ERROR_NOTPOSSIBLE errors when using DEPTH parameter

This most likely means that imap_metadata=no, but the client still wants to
fetch recursively validated metadata entries. This should return in OK
instead of NO reply.

6 years agoauth: Do not unref policy payload too early
Aki Tuomi [Tue, 6 Aug 2019 05:44:18 +0000 (08:44 +0300)] 
auth: Do not unref policy payload too early

This can cause the context to be free'd too early leading
to crashes.

6 years agolib-imap-metadata: setting metadata literal value does not delete it
Markus Valentin [Fri, 2 Aug 2019 13:57:09 +0000 (15:57 +0200)] 
lib-imap-metadata: setting metadata literal value does not delete it

Only if value and value_stream are NULL the metadata can be unset.

6 years agolib-smtp: Fix encoding quoted localparts that end with "."
Timo Sirainen [Tue, 30 Jul 2019 11:15:11 +0000 (14:15 +0300)] 
lib-smtp: Fix encoding quoted localparts that end with "."

For example "user..@example.com" or "user..test.@example.com" resulted
in an extra '"' prefix.

6 years agolib-storage: Mark /private/specialuse attribute to be validated
Timo Sirainen [Mon, 29 Jul 2019 07:30:05 +0000 (10:30 +0300)] 
lib-storage: Mark /private/specialuse attribute to be validated