]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
4 years agolib: unichar - Change uni_utf8_char_bytes to accept unsigned char
Aki Tuomi [Thu, 20 Aug 2020 05:57:35 +0000 (08:57 +0300)] 
lib: unichar - Change uni_utf8_char_bytes to accept unsigned char

4 years agolib-index: Use SIZE_MAX with str_sanitize
Aki Tuomi [Tue, 1 Sep 2020 06:57:04 +0000 (09:57 +0300)] 
lib-index: Use SIZE_MAX with str_sanitize

4 years agoauth: password-scheme - Use UINT_MAX when calling password_generate_otp
Aki Tuomi [Tue, 1 Sep 2020 06:57:23 +0000 (09:57 +0300)] 
auth: password-scheme - Use UINT_MAX when calling password_generate_otp

4 years agolib: mempool-allocfree - Do not use PTR_OFFSET with negative offset
Aki Tuomi [Tue, 1 Sep 2020 08:54:50 +0000 (11:54 +0300)] 
lib: mempool-allocfree - Do not use PTR_OFFSET with negative offset

Avoids undefined behaviour sanitization error.

4 years agolib-fts: test-fts-tokenizer - Change test_chars to unsigned char
Aki Tuomi [Tue, 1 Sep 2020 08:56:42 +0000 (11:56 +0300)] 
lib-fts: test-fts-tokenizer - Change test_chars to unsigned char

4 years agolib: str - Ensure str_append_c gets unsigned char parameter
Aki Tuomi [Thu, 20 Aug 2020 06:46:24 +0000 (09:46 +0300)] 
lib: str - Ensure str_append_c gets unsigned char parameter

4 years agolib: seq-range-array - Assert-crash if array becomes 0..(uint32_t)-1
Timo Sirainen [Thu, 1 Oct 2020 08:37:24 +0000 (11:37 +0300)] 
lib: seq-range-array - Assert-crash if array becomes 0..(uint32_t)-1

4 years agolib: seq_range_array_add() - Reorder code flow
Timo Sirainen [Thu, 1 Oct 2020 08:19:33 +0000 (11:19 +0300)] 
lib: seq_range_array_add() - Reorder code flow

4 years agolib: seq-range-array - Split off seq_range_array_add_slow_path()
Timo Sirainen [Thu, 1 Oct 2020 08:18:04 +0000 (11:18 +0300)] 
lib: seq-range-array - Split off seq_range_array_add_slow_path()

4 years agolib: seq-range-array - Use seq_range_length() internally
Timo Sirainen [Thu, 1 Oct 2020 08:04:56 +0000 (11:04 +0300)] 
lib: seq-range-array - Use seq_range_length() internally

4 years agolib: seq_range_length() - Use const pointer
Timo Sirainen [Thu, 1 Oct 2020 08:04:36 +0000 (11:04 +0300)] 
lib: seq_range_length() - Use const pointer

4 years agodoc: Include dovecot-oauth2.conf.ext in dist tarball
Martti Rannanjärvi [Tue, 20 Oct 2020 12:02:24 +0000 (15:02 +0300)] 
doc: Include dovecot-oauth2.conf.ext in dist tarball

4 years agodoveadm-server: Fix STARTTLS support.
Stephan Bosch [Mon, 12 Oct 2020 21:29:02 +0000 (23:29 +0200)] 
doveadm-server: Fix STARTTLS support.

4 years agolib-master: master-service-ssl - Make context initialization error more useful.
Stephan Bosch [Tue, 13 Oct 2020 20:56:25 +0000 (22:56 +0200)] 
lib-master: master-service-ssl - Make context initialization error more useful.

This improves the error in case SSL is disabled; other causes still yield a
rather unhelpful error message.

4 years agolib: ostream-multiplex - Fix dead assignment by adding an assertion on the result.
Stephan Bosch [Mon, 12 Oct 2020 21:18:09 +0000 (23:18 +0200)] 
lib: ostream-multiplex - Fix dead assignment by adding an assertion on the result.

Found by Clang scan-build.

4 years agoglobal: Fix dead assignments in expressions.
Stephan Bosch [Tue, 6 Oct 2020 22:06:08 +0000 (00:06 +0200)] 
global: Fix dead assignments in expressions.

Found by Clang scan-build.

4 years agoman: Update doveadm-search-query.7
raphael-walther [Thu, 8 Oct 2020 11:48:45 +0000 (13:48 +0200)] 
man: Update doveadm-search-query.7

TEXT searches also from headers, not just body.

4 years agodirector: Fix error message when director_username_hash expansion fails
jonmoesli [Wed, 7 Oct 2020 15:48:06 +0000 (17:48 +0200)] 
director: Fix error message when director_username_hash expansion fails

4 years agolib-storage: Fix potential assert-crash when adding missing attachment keywords
Timo Sirainen [Fri, 9 Oct 2020 11:58:54 +0000 (14:58 +0300)] 
lib-storage: Fix potential assert-crash when adding missing attachment keywords

Broken by aab71c35259f542d9ba46b4b5b24eff0016b802e

Fixes:
Panic: file index-mail.c: line 1241 (index_mail_parse_body): assertion failed: (data->parser_ctx != NULL)

4 years agolib: json-parser - Fix skipping strings with non-blocking input
Timo Sirainen [Thu, 8 Oct 2020 07:41:52 +0000 (10:41 +0300)] 
lib: json-parser - Fix skipping strings with non-blocking input

The skipping could have accessed memory outside the allocated string.
This might have resulted in a crash, or caused JSON parsing to fail.

4 years agolib-mail: test-message-header-decode - Add random encode/decode tests for 8 bit data.
Stephan Bosch [Wed, 16 Sep 2020 03:06:12 +0000 (05:06 +0200)] 
lib-mail: test-message-header-decode - Add random encode/decode tests for 8 bit data.

This also tests handling of (broken) UTF-8 input.

4 years agolib-mail: test-message-header-encode - Add tests for broken UTF-8 in input.
Stephan Bosch [Wed, 16 Sep 2020 02:31:58 +0000 (04:31 +0200)] 
lib-mail: test-message-header-encode - Add tests for broken UTF-8 in input.

4 years agolib-mail: test-message-header-encode - Check maximum line length with long printable...
Stephan Bosch [Thu, 17 Sep 2020 10:17:44 +0000 (12:17 +0200)] 
lib-mail: test-message-header-encode - Check maximum line length with long printable text and whitespace.

4 years agolib-mail: message-header-encode - Update function descriptions.
Stephan Bosch [Wed, 16 Sep 2020 23:26:13 +0000 (01:26 +0200)] 
lib-mail: message-header-encode - Update function descriptions.

4 years agolib-mail: Properly handle bad UTF-8 in message_header_encode_b().
Stephan Bosch [Wed, 16 Sep 2020 01:21:30 +0000 (03:21 +0200)] 
lib-mail: Properly handle bad UTF-8 in message_header_encode_b().

Broken characters are substituted with a replacement character.

4 years agolib-mail: Properly handle bad UTF-8 in message_header_encode_q().
Stephan Bosch [Wed, 16 Sep 2020 01:19:34 +0000 (03:19 +0200)] 
lib-mail: Properly handle bad UTF-8 in message_header_encode_q().

Broken characters are substituted with a replacement character.

4 years agolib-mail: message-header-encode - Return immediately when len == 0 in message_header_...
Stephan Bosch [Wed, 16 Sep 2020 01:10:12 +0000 (03:10 +0200)] 
lib-mail: message-header-encode - Return immediately when len == 0 in message_header_encode_b/q().

Just to make sure. This shouldn't happen in the first place.

4 years agolib-mail: message-header-encode - Use size_t for length/size variables and parameters.
Stephan Bosch [Wed, 16 Sep 2020 01:05:30 +0000 (03:05 +0200)] 
lib-mail: message-header-encode - Use size_t for length/size variables and parameters.

4 years agolib-mail: message-header-encode - Fix encoding of 0x7F byte for Q encoding.
Stephan Bosch [Wed, 16 Sep 2020 23:33:52 +0000 (01:33 +0200)] 
lib-mail: message-header-encode - Fix encoding of 0x7F byte for Q encoding.

It was not escaped.

4 years agolib-mail: test-message-header-decode - Use test_assert_idx().
Stephan Bosch [Wed, 16 Sep 2020 23:41:41 +0000 (01:41 +0200)] 
lib-mail: test-message-header-decode - Use test_assert_idx().

4 years agolib-mail: test-message-header-decode - Avoid generating random bytes that are never...
Stephan Bosch [Wed, 16 Sep 2020 16:28:43 +0000 (18:28 +0200)] 
lib-mail: test-message-header-decode - Avoid generating random bytes that are never used.

4 years agolib-mail: test-message-header-decode - Use test_assert_strcmp().
Stephan Bosch [Thu, 17 Sep 2020 10:24:40 +0000 (12:24 +0200)] 
lib-mail: test-message-header-decode - Use test_assert_strcmp().

4 years agolib-mail: test-message-header-encode - Use test_assert_strcmp().
Stephan Bosch [Thu, 17 Sep 2020 10:23:06 +0000 (12:23 +0200)] 
lib-mail: test-message-header-encode - Use test_assert_strcmp().

4 years agolib: base64 - Add base64_encode_get_full_space().
Stephan Bosch [Tue, 15 Sep 2020 23:03:53 +0000 (01:03 +0200)] 
lib: base64 - Add base64_encode_get_full_space().

This translates the space in the destination buffer to the number of bytes that
can be encoded at most to complete the full base64 encoding, including padding
and newlines if configured.

4 years agolib: base64 - Fix return value of base64_encode_more().
Stephan Bosch [Tue, 15 Sep 2020 23:02:22 +0000 (01:02 +0200)] 
lib: base64 - Fix return value of base64_encode_more().

It didn't properly return TRUE when all input data was consumed.

4 years agolib: test-base64 - Add test for base64_encode_get_size() in random lowlevel streaming...
Stephan Bosch [Wed, 16 Sep 2020 21:19:19 +0000 (23:19 +0200)] 
lib: test-base64 - Add test for base64_encode_get_size() in random lowlevel streaming tests.

4 years agolib: test-base64 - Abort random lowlevel test case early when something failed already.
Stephan Bosch [Wed, 16 Sep 2020 21:20:32 +0000 (23:20 +0200)] 
lib: test-base64 - Abort random lowlevel test case early when something failed already.

4 years agolib: unichar - Add length definitions for replacement and ellipsis characters.
Stephan Bosch [Tue, 15 Sep 2020 22:37:45 +0000 (00:37 +0200)] 
lib: unichar - Add length definitions for replacement and ellipsis characters.

4 years agolib: json-parser - Fix parsing \uXXXX in non-blocking input
Timo Sirainen [Wed, 6 May 2020 10:15:34 +0000 (13:15 +0300)] 
lib: json-parser - Fix parsing \uXXXX in non-blocking input

If it was in the istream's read boundary it resulted as parsing error.

4 years agolib: json-parser - Fix error message for invalid escape sequence
Timo Sirainen [Wed, 6 May 2020 10:01:41 +0000 (13:01 +0300)] 
lib: json-parser - Fix error message for invalid escape sequence

4 years agolib: json-parser - Don't allocate errors from data stack
Timo Sirainen [Wed, 6 May 2020 09:54:13 +0000 (12:54 +0300)] 
lib: json-parser - Don't allocate errors from data stack

There's no guarantee that the json-parser's life time is within the same
data stack frame.

4 years agolib: json-parser - Fail if strings contain NULs
Timo Sirainen [Wed, 6 May 2020 09:38:22 +0000 (12:38 +0300)] 
lib: json-parser - Fail if strings contain NULs

Previous behavior was to just truncate the string, which could be worse than
failing entirely.

4 years agolib-http: test-http-client-errors - Add unit test for host idle timeout.
Stephan Bosch [Tue, 22 Sep 2020 23:59:27 +0000 (01:59 +0200)] 
lib-http: test-http-client-errors - Add unit test for host idle timeout.

This test involves retrying a request that failed host lookup, which used to
cause the request to be erroneously aborted.

4 years agolib-http: http-client-host - Prevent erroneously starting host idle timeout during...
Stephan Bosch [Sun, 20 Sep 2020 23:14:20 +0000 (01:14 +0200)] 
lib-http: http-client-host - Prevent erroneously starting host idle timeout during request retry.

During request retry the request is first dropped from and subsequently added to
the queue. Dropping a request from the queue can start the host idle timeout
when it is the very last one. The timeout was not removed later on anymore when
the request was submitted again, because it was added prematurely (before
dropping the request).

4 years agolib-http: http-client-host - Fix determination of whether host is idle.
Stephan Bosch [Sun, 20 Sep 2020 21:16:00 +0000 (23:16 +0200)] 
lib-http: http-client-host - Fix determination of whether host is idle.

4 years agolib-http: http-client-host - Make sure DNS lookup is performed when host has no IPs.
Stephan Bosch [Tue, 22 Sep 2020 20:12:27 +0000 (22:12 +0200)] 
lib-http: http-client-host - Make sure DNS lookup is performed when host has no IPs.

This fixes at least one panic:

Panic: file ./http-client-private.h: line 679 (http_client_host_get_ip): assertion failed: (idx < host->shared->ips_count)

4 years agoauth: Fix potential read buffer overflow in PLAIN mechanism
Timo Sirainen [Wed, 26 Aug 2020 08:31:01 +0000 (11:31 +0300)] 
auth: Fix potential read buffer overflow in PLAIN mechanism

The overflow could have crashed the auth process in theory, although
practically it doesn't seem to happen.

4 years agoauth: test-mech - Allocate test input explicitly
Timo Sirainen [Wed, 26 Aug 2020 08:42:02 +0000 (11:42 +0300)] 
auth: test-mech - Allocate test input explicitly

This way valgrind will catch if there are read buffer overflows.

4 years agolib-index: Fix DEBUG assert to not trigger on transaction resets
Timo Sirainen [Wed, 1 Apr 2020 14:22:04 +0000 (17:22 +0300)] 
lib-index: Fix DEBUG assert to not trigger on transaction resets

Fixes a crash in test-mail-index when compiled --with-devel-checks:

Panic: file mail-index-transaction.c: line 211 (mail_index_transaction_commit_real): assertion failed: (expected_highest_modseq == log->head->sync_highest_modseq)

4 years agologin-common: Include the proxy's source address in log messages
Josef 'Jeff' Sipek [Thu, 17 Sep 2020 19:43:02 +0000 (15:43 -0400)] 
login-common: Include the proxy's source address in log messages

4 years agologin-common: Move common client info logging into a helper function
Josef 'Jeff' Sipek [Thu, 17 Sep 2020 19:42:52 +0000 (15:42 -0400)] 
login-common: Move common client info logging into a helper function

4 years agologin-common: Add login_proxy_get_source_host() to get the local proxy hostname
Josef 'Jeff' Sipek [Thu, 17 Sep 2020 18:19:46 +0000 (14:19 -0400)] 
login-common: Add login_proxy_get_source_host() to get the local proxy hostname

4 years agologin-common: Heap allocate login source IPs array to avoid use-after-free
Josef 'Jeff' Sipek [Thu, 17 Sep 2020 14:45:44 +0000 (10:45 -0400)] 
login-common: Heap allocate login source IPs array to avoid use-after-free

By default, the service init code runs with a temporary datastack frame that
gets freed at the end of initialization to get rid of any temporary
allocations made during init before the long-running part of the process
executes.

4 years agoman: update doveadm-proxy man page with kick -h option.
sergey.kitov [Fri, 18 Sep 2020 11:55:27 +0000 (14:55 +0300)] 
man: update doveadm-proxy man page with kick -h option.

4 years agodoveadm: Implement proxy kick -h <host>
sergey.kitov [Tue, 15 Sep 2020 12:52:24 +0000 (15:52 +0300)] 
doveadm: Implement proxy kick -h <host>

4 years agologin-common: Implement kicking all user at backend host.
sergey.kitov [Tue, 15 Sep 2020 12:51:26 +0000 (15:51 +0300)] 
login-common: Implement kicking all user at backend host.

4 years agologin-common: change want_kick signature from (struct *client, ...) to (struct *login...
sergey.kitov [Thu, 17 Sep 2020 10:51:36 +0000 (13:51 +0300)] 
login-common: change want_kick signature from (struct *client, ...) to (struct *login_proxy, ...)

4 years agologin-common: Put proxy looping on stack in login_proxy_cmd_kick_full()
sergey.kitov [Fri, 25 Sep 2020 07:43:39 +0000 (10:43 +0300)] 
login-common: Put proxy looping on stack in login_proxy_cmd_kick_full()

4 years agolib-smtp: smtp-server-connection - Ignore replied command for pipeline limit calculation.
Stephan Bosch [Wed, 24 Jun 2020 09:20:25 +0000 (11:20 +0200)] 
lib-smtp: smtp-server-connection - Ignore replied command for pipeline limit calculation.

This prevents failed commands with payload from blocking the input pipeline. This caused a hang before.

4 years agolib-smtp: smtp-server-connection - Use connection settings for command pipeline limit.
Stephan Bosch [Wed, 24 Jun 2020 09:15:55 +0000 (11:15 +0200)] 
lib-smtp: smtp-server-connection - Use connection settings for command pipeline limit.

It used the top-level server settings before.

4 years agolib-smtp: smtp-server-connection - Move pipeline limit check to separate function.
Stephan Bosch [Wed, 24 Jun 2020 09:13:59 +0000 (11:13 +0200)] 
lib-smtp: smtp-server-connection - Move pipeline limit check to separate function.

4 years agolib-smtp: smtp-server-command - Always end input lock/capture upon reply submission.
Stephan Bosch [Wed, 24 Jun 2020 08:45:38 +0000 (10:45 +0200)] 
lib-smtp: smtp-server-command - Always end input lock/capture upon reply submission.

4 years agolib-smtp: smtp-server-command - Reliably end input capture in smtp_server_command_inp...
Stephan Bosch [Wed, 24 Jun 2020 08:42:17 +0000 (10:42 +0200)] 
lib-smtp: smtp-server-command - Reliably end input capture in smtp_server_command_input_unlock().

4 years agolib-storage: Rename mail_attachment_detection_options=add-flags-on-save to add-flags
Timo Sirainen [Thu, 17 Sep 2020 10:09:54 +0000 (13:09 +0300)] 
lib-storage: Rename mail_attachment_detection_options=add-flags-on-save to add-flags

Keep add-flags-on-save for backwards compatibility.

4 years agolib-storage: Try to add missing attachment flags when opening mail stream
Timo Sirainen [Thu, 3 Sep 2020 22:58:58 +0000 (01:58 +0300)] 
lib-storage: Try to add missing attachment flags when opening mail stream

Since the message body is being opened in any case, it's pretty inexpensive
to add missing attachment flags. Do this only when
mail_attachment_detection_options has add-flags-on-save but no
no-flags-on-fetch.

4 years agolib-storage: Try to add missing attachment flags when fetching MIME parts or BODYSTRU...
Timo Sirainen [Thu, 10 Sep 2020 13:38:11 +0000 (16:38 +0300)] 
lib-storage: Try to add missing attachment flags when fetching MIME parts or BODYSTRUCTURE

This happens only if both mime.parts and imap.bodystructure are already in
cache and mail_attachment_detection_options has add-flags-on-save but no
no-flags-on-fetch. The no-flags-on-fetch option may be removed in a future
release once it's known that it's not causing any unexpected performance
issues.

4 years agolib-storage: index_mail_get_cached_bodystructure() - Reorder the if statements
Timo Sirainen [Thu, 10 Sep 2020 13:36:14 +0000 (16:36 +0300)] 
lib-storage: index_mail_get_cached_bodystructure() - Reorder the if statements

Simplifies the following commit.

4 years agolib-storage: Avoid initializing stream multiple times recursively
Timo Sirainen [Thu, 10 Sep 2020 13:32:35 +0000 (16:32 +0300)] 
lib-storage: Avoid initializing stream multiple times recursively

This fixes the situation where stream opening causes it to be re-opened by
index_mail_parse_headers(). There are some other more rare situations, but
they're in error handling code paths.

4 years agolib-storage: Avoid caching size.physical unless it's explicitly asked for
Timo Sirainen [Thu, 10 Sep 2020 13:21:17 +0000 (16:21 +0300)] 
lib-storage: Avoid caching size.physical unless it's explicitly asked for

It's internally requested in a few places, but only as an optimization if
it happens to exist. It's not important enough that it should affect
caching decisions.

This change becomes more important after the following changes, which cause
size.physical to be added unnecessarily when filling out attachment flags.

4 years agolib-http: http-client-host - Do not prematurely reset ips_count to zero.
Stephan Bosch [Tue, 22 Sep 2020 18:00:17 +0000 (20:00 +0200)] 
lib-http: http-client-host - Do not prematurely reset ips_count to zero.

It causes problems with existing connection attempts.

Panic was:

Panic: file http-client-queue.c: line 215 (http_client_queue_is_last_connect_ip): assertion failed: (queue->ips_connect_idx < ips_count)

4 years agolib-http: http-client-host - Log debug message for failed DNS lookup.
Stephan Bosch [Wed, 23 Sep 2020 00:04:20 +0000 (02:04 +0200)] 
lib-http: http-client-host - Log debug message for failed DNS lookup.

If the host has no requests, nothing is logged about the failure otherwise.

4 years agolib-http: http-client-host - Move DNS lookup success handling to a common function.
Stephan Bosch [Tue, 22 Sep 2020 17:58:59 +0000 (19:58 +0200)] 
lib-http: http-client-host - Move DNS lookup success handling to a common function.

4 years agolib-http: Reformat http-client-host.c.
Stephan Bosch [Sun, 20 Sep 2020 22:38:11 +0000 (00:38 +0200)] 
lib-http: Reformat http-client-host.c.

4 years agolib-mail: html2text - Fix buffer out-of-bounds access
ihsinme [Mon, 28 Sep 2020 19:26:27 +0000 (15:26 -0400)] 
lib-mail: html2text - Fix buffer out-of-bounds access

The passed in buffer size is at least 1 byte shorter than the actual buffer
size, therefore there is no chance of a crash.

4 years agodict-sql: Fix crash if dict iteration is destroyed early
Timo Sirainen [Fri, 14 Aug 2020 21:56:36 +0000 (00:56 +0300)] 
dict-sql: Fix crash if dict iteration is destroyed early

If the iteration callback is still called after the iterator is freed, the
callback accesses freed memory and crashes.

4 years agolib-smtp: test-smtp-command-parser - Add tests for input ending in partial UTF-8...
Stephan Bosch [Fri, 11 Sep 2020 22:20:51 +0000 (00:20 +0200)] 
lib-smtp: test-smtp-command-parser - Add tests for input ending in partial UTF-8 sequences.

4 years agolib-smtp: test-smtp-command-parser - Test parsing commands from input that comes...
Stephan Bosch [Fri, 11 Sep 2020 22:19:14 +0000 (00:19 +0200)] 
lib-smtp: test-smtp-command-parser - Test parsing commands from input that comes in gradually.

4 years agolib-smtp: smtp-command-parser - Fix parameter parsing not to fail on particular unico...
Stephan Bosch [Fri, 11 Sep 2020 22:15:35 +0000 (00:15 +0200)] 
lib-smtp: smtp-command-parser - Fix parameter parsing not to fail on particular unicode code points.

Unicode code points were sometimes erroneously checked as ASCII characters.

4 years agolib-smtp: smtp-command-parser - Fix read past buffer limit while parsing UTF-8 character.
Stephan Bosch [Fri, 11 Sep 2020 19:53:06 +0000 (21:53 +0200)] 
lib-smtp: smtp-command-parser - Fix read past buffer limit while parsing UTF-8 character.

The buffer limit was specified as (buf->pos - buf->end) rather than (buf->end -
buf->pos). Since at most a valid UTF-8 character can be read beyond the buffer
size, this bug didn't cause noticeable effects, nor does it present an attack
surface.

4 years agolib-smtp: Reformat test-smtp-command-parser.c.
Stephan Bosch [Fri, 11 Sep 2020 21:54:29 +0000 (23:54 +0200)] 
lib-smtp: Reformat test-smtp-command-parser.c.

4 years agolib-smtp: Reformat smtp-command-parser.c.
Stephan Bosch [Fri, 11 Sep 2020 20:57:58 +0000 (22:57 +0200)] 
lib-smtp: Reformat smtp-command-parser.c.

4 years agolib-mail: message_parser_init_from_parts() - Fix crash if MIME boundaries don't end
Timo Sirainen [Mon, 31 Aug 2020 17:38:42 +0000 (20:38 +0300)] 
lib-mail: message_parser_init_from_parts() - Fix crash if MIME boundaries don't end

If the last "boundary--" doens't exist, the parsing assert-crashed at
deinit. This mainly happened when searching mails.

Fixes:
Panic: file message-parser.c: line 175 (message_part_finish): assertion failed: (ctx->nested_parts_count > 0)

4 years agoacl: Ignore acl_object_list_deinit() error when copying ACLs from parent
Timo Sirainen [Fri, 28 Aug 2020 15:35:00 +0000 (18:35 +0300)] 
acl: Ignore acl_object_list_deinit() error when copying ACLs from parent

There's already a FIXME, and this makes static analyzer happier.

4 years agodirector: Explicitly ignore array_bsearch_insert_pos() return value
Timo Sirainen [Thu, 13 Aug 2020 08:38:07 +0000 (11:38 +0300)] 
director: Explicitly ignore array_bsearch_insert_pos() return value

Makes static analyzers happier.

4 years agolib: test-istream - Check or explicitly ignore i_stream_read() return value
Timo Sirainen [Thu, 13 Aug 2020 08:29:38 +0000 (11:29 +0300)] 
lib: test-istream - Check or explicitly ignore i_stream_read() return value

Makes static analyzers happier.

4 years agolib-ssl-iostream: Fix error message with invalid ciphersuites
Timo Sirainen [Wed, 12 Aug 2020 08:05:55 +0000 (11:05 +0300)] 
lib-ssl-iostream: Fix error message with invalid ciphersuites

The error message contained curve_list's value, not ciphersuites' value.

4 years agolib-compression: test-compression - Fix memory leak
Timo Sirainen [Mon, 14 Sep 2020 14:44:58 +0000 (17:44 +0300)] 
lib-compression: test-compression - Fix memory leak

5 years agolib: Add a comment about o_stream_create_buffer()
Timo Sirainen [Mon, 14 Sep 2020 07:37:16 +0000 (10:37 +0300)] 
lib: Add a comment about o_stream_create_buffer()

5 years agolib: ostream-buffer - Revert returning 0 as used buffer size
Timo Sirainen [Mon, 14 Sep 2020 07:28:41 +0000 (10:28 +0300)] 
lib: ostream-buffer - Revert returning 0 as used buffer size

This change broke at least one external plugin that assumed the original
behavior. Safer to just revert this change.

Reverts 48083d9e7fdbe257b0be33043ecf0ca87489eef9

5 years agolib-compression: test-compression - Convert from ostream-buffer to iostream-temp
Timo Sirainen [Mon, 14 Sep 2020 07:27:26 +0000 (10:27 +0300)] 
lib-compression: test-compression - Convert from ostream-buffer to iostream-temp

Using ostream-buffer required 48083d9e7fdbe257b0be33043ecf0ca87489eef9
change, but this broke some code that assumed the original behavior.

5 years agolib-compression: test-compression - Use datastack in test
Aki Tuomi [Fri, 11 Sep 2020 20:28:47 +0000 (23:28 +0300)] 
lib-compression: test-compression - Use datastack in test

Plugs a memory leak.

Broken in 60b4040ba498ce7b19fc8b189d327cc606856f07

5 years agolib-fs: test-fs-async - Fix to work properly after previous changes
Timo Sirainen [Fri, 11 Sep 2020 11:29:14 +0000 (14:29 +0300)] 
lib-fs: test-fs-async - Fix to work properly after previous changes

It's an async test, so it should expect that the fs actually behaves
asynchronously.

5 years agolib-dict: dict_switch_ioloop() - Move also failure timeout
Timo Sirainen [Fri, 11 Sep 2020 11:28:11 +0000 (14:28 +0300)] 
lib-dict: dict_switch_ioloop() - Move also failure timeout

Forgotten in 178bb676ea1dd380789d3587bf5e64fd85a29d7a

5 years agostats: event exporter - Use category exporting helper to avoid duplicates (tabtext)
Josef 'Jeff' Sipek [Fri, 21 Aug 2020 18:31:12 +0000 (14:31 -0400)] 
stats: event exporter - Use category exporting helper to avoid duplicates (tabtext)

5 years agostats: event exporter - Use category exporting helper to avoid duplicates (json)
Josef 'Jeff' Sipek [Fri, 21 Aug 2020 18:23:50 +0000 (14:23 -0400)] 
stats: event exporter - Use category exporting helper to avoid duplicates (json)

5 years agostats: Add helper to append category names without duplicates
Josef 'Jeff' Sipek [Fri, 21 Aug 2020 18:23:14 +0000 (14:23 -0400)] 
stats: Add helper to append category names without duplicates

5 years agolib: net_listen|connect_unix() - Use consistent error handling for too long paths
Timo Sirainen [Fri, 28 Aug 2020 15:36:47 +0000 (18:36 +0300)] 
lib: net_listen|connect_unix() - Use consistent error handling for too long paths

The errno should be the same for both functions. Prefer ENAMETOOLONG if it
exists on the OS, otherwise fallback to EOVERFLOW.

5 years agolib-dict: dict - Keep track of next commit in dict_wait
Aki Tuomi [Fri, 11 Sep 2020 05:22:11 +0000 (08:22 +0300)] 
lib-dict: dict - Keep track of next commit in dict_wait

Satisfies static analyser, broken in
178bb676ea1dd380789d3587bf5e64fd85a29d7a

5 years agolib-dict: dict - Ensure there are no commits during deinit
Aki Tuomi [Thu, 10 Sep 2020 14:56:49 +0000 (17:56 +0300)] 
lib-dict: dict - Ensure there are no commits during deinit

5 years agolib-dict: dict - Allow calling callback immediately
Aki Tuomi [Thu, 10 Sep 2020 14:43:06 +0000 (17:43 +0300)] 
lib-dict: dict - Allow calling callback immediately

Make callback calls the next callback immediately,
instead of adding a timeout that calls the callback.

Forgotten in 178bb676ea1dd380789d3587bf5e64fd85a29d7a