]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
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()

4 years agolib-index: mail_index_sync_map() - Always return -1 on I/O failures
Timo Sirainen [Mon, 10 Aug 2020 14:33:07 +0000 (17:33 +0300)] 
lib-index: mail_index_sync_map() - Always return -1 on I/O failures

Even though with force=FALSE in theory it would be possible to work around
it, but more likely it will just cause another I/O error. This simplifies
the code for the following changes.

4 years agolib-index: Move calling mail_index_sync_map_want_index_reopen() to mail_index_map()
Timo Sirainen [Mon, 10 Aug 2020 14:31:27 +0000 (17:31 +0300)] 
lib-index: Move calling mail_index_sync_map_want_index_reopen() to mail_index_map()

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

4 years agolib-index: mail_transaction_log_indexid_changed() - Clarify refcount handling
Timo Sirainen [Mon, 10 Aug 2020 17:02:22 +0000 (20:02 +0300)] 
lib-index: mail_transaction_log_indexid_changed() - Clarify refcount handling

Although the old code worked as well, it wasn't so obvious since the
behavior was slightly different when the log->head had extra references.
Clarify the behavior by always unreferencing after the new log file is
created.

4 years agolib-index: mail_transaction_log_file_free() - Assert that refcount=0
Timo Sirainen [Mon, 10 Aug 2020 17:09:41 +0000 (20:09 +0300)] 
lib-index: mail_transaction_log_file_free() - Assert that refcount=0

4 years agolib-index: mail_index_write() - Make sure index is rewritten after log rotation
Timo Sirainen [Mon, 10 Aug 2020 16:59:36 +0000 (19:59 +0300)] 
lib-index: mail_index_write() - Make sure index is rewritten after log rotation

Otherwise the index will point to .log.2 file, which could become deleted
before the index is rewritten again.

4 years agolib-index: mail_transaction_log_view_set() - Make sure log files aren't freed too...
Timo Sirainen [Mon, 10 Aug 2020 16:54:55 +0000 (19:54 +0300)] 
lib-index: mail_transaction_log_view_set() - Make sure log files aren't freed too early

It's possible that mail_transaction_log_find_file() frees one of the files
that are already in the linked list. Avoid it by referencing the file
immediately when it's added to the list.

4 years agolib-index: test-mail-transaction-log-view - Move test_transaction_log_file_add()
Timo Sirainen [Thu, 12 Nov 2020 16:01:18 +0000 (18:01 +0200)] 
lib-index: test-mail-transaction-log-view - Move test_transaction_log_file_add()

4 years agolib-index: mail_transaction_log_view_set() - Return -1 only on I/O error
Timo Sirainen [Mon, 10 Aug 2020 14:12:32 +0000 (17:12 +0300)] 
lib-index: mail_transaction_log_view_set() - Return -1 only on I/O error

The callers that care about the difference:

 * mail_index_sync_map() already assumes that -1 means I/O error
 * mail_index_sync_set_log_view() handles 0 by logging an error and fscking
   the index, which is likely better than just returning failure.
 * view_sync_set_log_view_range()'s caller handles 0 by rebuilding the
   missing changes in memory. So returning 0 makes it work better.
 * dsync_log_set() and mailbox_get_expunges_init() have fallbacks for
   handling 0, while -1 would just return an error.

4 years agolib-index: mail_transaction_log_file_get_highest_modseq_at() - Separate I/O errors...
Timo Sirainen [Mon, 10 Aug 2020 14:06:05 +0000 (17:06 +0300)] 
lib-index: mail_transaction_log_file_get_highest_modseq_at() - Separate I/O errors from corruption

4 years agolib: Add data_stack_get_used_size()
Timo Sirainen [Fri, 13 Nov 2020 17:30:29 +0000 (19:30 +0200)] 
lib: Add data_stack_get_used_size()

Mainly for debugging purposes.

4 years agodoveadm dict iter: Support printing multiple values
Timo Sirainen [Tue, 17 Nov 2020 15:26:28 +0000 (17:26 +0200)] 
doveadm dict iter: Support printing multiple values

4 years agodict-sql: Support dict_iterate_values()
Timo Sirainen [Tue, 17 Nov 2020 12:41:31 +0000 (14:41 +0200)] 
dict-sql: Support dict_iterate_values()

4 years agodict, dict-client: Support dict_iterate_values()
Timo Sirainen [Tue, 17 Nov 2020 12:24:57 +0000 (14:24 +0200)] 
dict, dict-client: Support dict_iterate_values()

This doesn't change the dict client protocol in an incompatible way, so it's
possible to mix old/new client/server.

4 years agolib-dict: Add dict_iterate_values()
Timo Sirainen [Tue, 17 Nov 2020 12:20:40 +0000 (14:20 +0200)] 
lib-dict: Add dict_iterate_values()

4 years agolib-dict: Change dict.iterate() API to support returning multiple values
Timo Sirainen [Tue, 17 Nov 2020 12:09:30 +0000 (14:09 +0200)] 
lib-dict: Change dict.iterate() API to support returning multiple values

This requires changes to all dict drivers.

4 years agolib-dict: dict_iterate() - Always return NULL if DICT_ITERATE_FLAG_NO_VALUE is used
Timo Sirainen [Tue, 17 Nov 2020 12:30:27 +0000 (14:30 +0200)] 
lib-dict: dict_iterate() - Always return NULL if DICT_ITERATE_FLAG_NO_VALUE is used

This way it behaves more consistently across backends.

4 years agodoveadm: mail: doveadm_mail_failed_error() - Set specific exit code for MAIL_ERROR_INUSE
Markus Valentin [Fri, 20 Nov 2020 11:52:47 +0000 (12:52 +0100)] 
doveadm: mail: doveadm_mail_failed_error() - Set specific exit code for MAIL_ERROR_INUSE

Set exit code DOVEADM_EX_NOTPOSSIBLE in case MAIL_ERROR_INUSE is set via
doveadm_mail_failed_error(). This exit code is used to indicate that a
operation cannot be done because another session prevents it.

4 years agodoveadm: When sending server logs to client, make sure ioloop isn't set to NULL
Timo Sirainen [Fri, 20 Nov 2020 10:15:18 +0000 (12:15 +0200)] 
doveadm: When sending server logs to client, make sure ioloop isn't set to NULL

This could have happened if there was any logging done outside command
handling. For example a doveadm command used http-client, which has a
timeout that triggers logging only after the command is finished.

Fixes segfault and:
Panic: file http-client.c: line 642 (http_client_context_close): assertion failed: (cctx->clients_list == NULL)

4 years agolib-lua: Don't add system libs to libdovecot_lua_la_DEPENDENCIES
Josef 'Jeff' Sipek [Fri, 20 Nov 2020 17:23:21 +0000 (12:23 -0500)] 
lib-lua: Don't add system libs to libdovecot_lua_la_DEPENDENCIES

This confuses the build system, causing it to think that it needs to build
those.  This manifests itself as:

make: *** No rule to make target '-L/usr/lib/x86_64-linux-gnu', needed by 'libdovecot-lua.la'.  Stop.

4 years agoimap: Fix memory leak in get_expunges_fallback()
sergey.kitov [Thu, 19 Nov 2020 20:07:37 +0000 (22:07 +0200)] 
imap: Fix memory leak in get_expunges_fallback()

4 years agolib: test-file-cache - Use memcmp
Aki Tuomi [Fri, 11 Sep 2020 13:06:46 +0000 (16:06 +0300)] 
lib: test-file-cache - Use memcmp

Data is not null-terminated, so use memcmp.

4 years agolib: test-file-cache - Assert map value
Aki Tuomi [Fri, 11 Sep 2020 11:11:55 +0000 (14:11 +0300)] 
lib: test-file-cache - Assert map value

Satisfies static analyser

4 years agolib: event-filter-parser - Test simple but invalid input
Josef 'Jeff' Sipek [Thu, 12 Nov 2020 19:15:54 +0000 (14:15 -0500)] 
lib: event-filter-parser - Test simple but invalid input

4 years agolib: event-filter - Do not assert that there in no output on error
Josef 'Jeff' Sipek [Thu, 12 Nov 2020 18:49:49 +0000 (13:49 -0500)] 
lib: event-filter - Do not assert that there in no output on error

When the input is a simple (but invalid) expression (e.g., a=b=c) the output
variable may be set.  This is perfectly fine.

The assertion (and the associated failure) come from when event filter
parsing was switched to the new filter syntax
(fcba1d530737813de11d9d730d5db6496e2e574b).

4 years agostats: openmetrics - Include submetric name only when present
Josef 'Jeff' Sipek [Mon, 19 Oct 2020 17:47:10 +0000 (13:47 -0400)] 
stats: openmetrics - Include submetric name only when present

Otherwise we SIGSEGV.

4 years agodsync: Fix UID renumbering when GUIDs aren't used
Timo Sirainen [Tue, 10 Nov 2020 22:11:35 +0000 (00:11 +0200)] 
dsync: Fix UID renumbering when GUIDs aren't used

Mails that have local UIDs won't be in import_uids hash table, so they're
not otherwise being iterated at the end and checked if they need
renumbering.

4 years agodsync: Incremental sync sometimes missed messages when GUIDs weren't available
Timo Sirainen [Tue, 10 Nov 2020 17:57:26 +0000 (19:57 +0200)] 
dsync: Incremental sync sometimes missed messages when GUIDs weren't available

GUIDs aren't available when using imapc, so this affected migrations.

4 years ago.gitignore: Ignore coverage and temp files
Aki Tuomi [Mon, 9 Nov 2020 07:04:36 +0000 (09:04 +0200)] 
.gitignore: Ignore coverage and temp files

4 years agolib-mail: test-message-part-serialize - Add tests
Aki Tuomi [Thu, 5 Nov 2020 10:08:38 +0000 (12:08 +0200)] 
lib-mail: test-message-part-serialize - Add tests

4 years agolib-mail: test-message-header-parser - Validate header value
Aki Tuomi [Wed, 4 Nov 2020 13:10:04 +0000 (15:10 +0200)] 
lib-mail: test-message-header-parser - Validate header value

4 years agolib-mail: test-message-header-parser - Test NUL bytes in header
Aki Tuomi [Wed, 4 Nov 2020 13:09:45 +0000 (15:09 +0200)] 
lib-mail: test-message-header-parser - Test NUL bytes in header

4 years agolib-mail: test-message-header-decode - Add more tests
Aki Tuomi [Wed, 4 Nov 2020 10:35:16 +0000 (12:35 +0200)] 
lib-mail: test-message-header-decode - Add more tests

4 years agolib-mail: test-message-header-decode - Use libcharset
Aki Tuomi [Wed, 4 Nov 2020 10:34:57 +0000 (12:34 +0200)] 
lib-mail: test-message-header-decode - Use libcharset

Otherwise we can only test utf-8

4 years agolib-mail: test-message-search - Add more message searching tests
Aki Tuomi [Tue, 3 Nov 2020 13:17:45 +0000 (15:17 +0200)] 
lib-mail: test-message-search - Add more message searching tests

4 years agolib-mail: test-mail-user-hash - Add tests for mail_user_hash
Aki Tuomi [Mon, 2 Nov 2020 18:59:18 +0000 (20:59 +0200)] 
lib-mail: test-mail-user-hash - Add tests for mail_user_hash

4 years agolib-mail: test-message-decoder - Add charset conversion test
Aki Tuomi [Mon, 2 Nov 2020 18:06:28 +0000 (20:06 +0200)] 
lib-mail: test-message-decoder - Add charset conversion test

4 years agolib-mail: test-message-decoder - Test Content-Transfer-Encoding
Aki Tuomi [Mon, 2 Nov 2020 16:38:32 +0000 (18:38 +0200)] 
lib-mail: test-message-decoder - Test Content-Transfer-Encoding

4 years agolib-mail: test-message-parser - Add tests for MIME-Version header
Aki Tuomi [Mon, 2 Nov 2020 11:46:12 +0000 (13:46 +0200)] 
lib-mail: test-message-parser - Add tests for MIME-Version header

4 years agolib-mail: test-* - Add missing test_assert
Aki Tuomi [Mon, 9 Nov 2020 07:29:26 +0000 (09:29 +0200)] 
lib-mail: test-* - Add missing test_assert

Need to ensure stream did not fail during parsing.

4 years agolib-mail: test-message-parser - Use message_part_is_equal
Aki Tuomi [Mon, 9 Nov 2020 07:22:28 +0000 (09:22 +0200)] 
lib-mail: test-message-parser - Use message_part_is_equal

Replace msg_parts_cmp with message_part_is_equal.

4 years agolib-mail: test-message-parser - Refactor message parsing to utility function
Aki Tuomi [Mon, 2 Nov 2020 11:15:24 +0000 (13:15 +0200)] 
lib-mail: test-message-parser - Refactor message parsing to utility function

Makes next changes easier.

4 years agolib-mail: Add message_part_is_equal
Aki Tuomi [Mon, 9 Nov 2020 07:16:27 +0000 (09:16 +0200)] 
lib-mail: Add message_part_is_equal

Returns TRUE if two parts are equal.

4 years agoconfigure.ac: Finish removing vpopmail support
Timo Sirainen [Wed, 11 Nov 2020 09:09:02 +0000 (11:09 +0200)] 
configure.ac: Finish removing vpopmail support

4 years agolib-storage: Add prefix to failed mailbox list index rebuild error messages
Timo Sirainen [Tue, 27 Oct 2020 13:12:19 +0000 (15:12 +0200)] 
lib-storage: Add prefix to failed mailbox list index rebuild error messages

This makes it clearer that the failure is happening because index was being
rebuilt.

4 years agolib-storage: Fix error message when mailbox list index rebuild fails
Timo Sirainen [Tue, 27 Oct 2020 13:13:39 +0000 (15:13 +0200)] 
lib-storage: Fix error message when mailbox list index rebuild fails

The error needs to be copied to mailbox_list, otherwise it's just
"Unknown internal list error".

4 years agolib-storage: Fix mailbox list iteration error handling for INBOX
Timo Sirainen [Tue, 27 Oct 2020 13:11:12 +0000 (15:11 +0200)] 
lib-storage: Fix mailbox list iteration error handling for INBOX

If INBOX isn't in the first namespace, the error wasn't correctly set for
it.

4 years agolib-storage: Use mailbox_get_last_mail_error() for mailbox_get_path_to() errors
Timo Sirainen [Tue, 27 Oct 2020 13:08:15 +0000 (15:08 +0200)] 
lib-storage: Use mailbox_get_last_mail_error() for mailbox_get_path_to() errors

mailbox_list_get_last_error() happens to work currently, but it's
accidental.

4 years agolib-index: Fix detecting if index is undeleted
Timo Sirainen [Mon, 2 Nov 2020 16:55:16 +0000 (18:55 +0200)] 
lib-index: Fix detecting if index is undeleted

It was possible that mail_index_is_deleted() kept returning that the index
was deleted, even if it was marked as undeleted. This happened when the
deletion was in dovecot.index.log.2, undeletion in dovecot.index.log and
dovecot.index pointed to the .log.2 file. This caused the .log file to be
read first, which sees the undeletion. Later on the .log.2 was parsed and
it marked the index back as deleted.

4 years agolib-fts: Avoid NULL pointer arithmetic
Timo Sirainen [Mon, 9 Nov 2020 23:30:06 +0000 (01:30 +0200)] 
lib-fts: Avoid NULL pointer arithmetic

Even though it was only doing +0. Fixes:
runtime error: applying zero offset to null pointer

4 years agolib-smtp: smtp_address_init_from_msg() - Avoid implicit char to unsigned char conversion
Timo Sirainen [Mon, 9 Nov 2020 16:10:21 +0000 (18:10 +0200)] 
lib-smtp: smtp_address_init_from_msg() - Avoid implicit char to unsigned char conversion

Fixes calling smtp_char_is_qpair() with ubsan:
runtime error: implicit conversion from type 'char' of value -61 (8-bit, signed) to type 'unsigned char' changed the value to 195 (8-bit, unsigned)

4 years agolib-index: Add explicit wrapping to 8bit variable increments
Timo Sirainen [Mon, 9 Nov 2020 15:52:51 +0000 (17:52 +0200)] 
lib-index: Add explicit wrapping to 8bit variable increments

Fixes ubsan errors:
runtime error: implicit conversion from type 'int' of value 256 (32-bit, signed) to type 'uint8_t' (aka 'unsigned char') changed the value to 0 (8-bit, unsigned)

4 years agolib: istream-concat - Avoid NULL pointer arithmetic
Timo Sirainen [Mon, 9 Nov 2020 15:38:26 +0000 (17:38 +0200)] 
lib: istream-concat - Avoid NULL pointer arithmetic

Even though it was only doing +0. Fixes:
runtime error: applying zero offset to null pointer

4 years agolib: istream-chain - Avoid NULL pointer arithmetic
Timo Sirainen [Mon, 9 Nov 2020 15:35:15 +0000 (17:35 +0200)] 
lib: istream-chain - Avoid NULL pointer arithmetic

Even though it was only doing +0. Fixes:
runtime error: applying zero offset to null pointer

4 years agolib: MODULE_CONTEXT_SET*() - Avoid NULL pointer arithmetic
Timo Sirainen [Mon, 9 Nov 2020 14:55:06 +0000 (16:55 +0200)] 
lib: MODULE_CONTEXT_SET*() - Avoid NULL pointer arithmetic

Even though it was only doing +0. Fixes:
runtime error: applying zero offset to null pointer

4 years agolib: Add and use TYPE_CHECKS() macro to standardize type checking for functions
Timo Sirainen [Mon, 9 Nov 2020 14:09:05 +0000 (16:09 +0200)] 
lib: Add and use TYPE_CHECKS() macro to standardize type checking for functions

This helps especially to avoid adding COMPILE_ERROR_*() macros to NULL
pointers, which results in ubsan errors:
runtime error: applying zero offset to null pointer

These changes also remove the use of gcc-specific ({...}) code in the
macros, making them slightly more portable.

4 years agolib: COMPILE_ERROR_IF_TRUE() - Return FALSE instead of 0
Timo Sirainen [Mon, 9 Nov 2020 13:39:57 +0000 (15:39 +0200)] 
lib: COMPILE_ERROR_IF_TRUE() - Return FALSE instead of 0

This will be needed for the following changes to avoid warnings with
-Wstrict-bool.

4 years agolib-fs: fs_file_init_parent() - Keep mode and flags parameters separated
Timo Sirainen [Mon, 9 Nov 2020 11:04:43 +0000 (13:04 +0200)] 
lib-fs: fs_file_init_parent() - Keep mode and flags parameters separated

Internally cast them both to (int) before ORing them together for the
fs_file_init_with_event() call.

This avoids compiler warnings with -Wenum-enum-conversion:
warning: bitwise operation between different enumeration types ('enum fs_open_mode' and 'enum fs_open_flags')

4 years agoauth: Remove ntlm mechanism & the LANMAN and NTLM password schemes
Josef 'Jeff' Sipek [Fri, 23 Oct 2020 20:24:09 +0000 (16:24 -0400)] 
auth: Remove ntlm mechanism & the LANMAN and NTLM password schemes

4 years agoauth: Remove vpopmail user & pass db support
Josef 'Jeff' Sipek [Fri, 16 Oct 2020 13:18:31 +0000 (09:18 -0400)] 
auth: Remove vpopmail user & pass db support

4 years agoauth: Remove S/Key mechanism & password scheme
Josef 'Jeff' Sipek [Fri, 16 Oct 2020 13:01:19 +0000 (09:01 -0400)] 
auth: Remove S/Key mechanism & password scheme

4 years agoauth: Remove RPA mechanism & password scheme
Josef 'Jeff' Sipek [Fri, 16 Oct 2020 12:50:21 +0000 (08:50 -0400)] 
auth: Remove RPA mechanism & password scheme

4 years agoauth: Remove postmap socket type
Josef 'Jeff' Sipek [Fri, 16 Oct 2020 12:31:34 +0000 (08:31 -0400)] 
auth: Remove postmap socket type

4 years agoauth: Remove support for SIA passdb
Josef 'Jeff' Sipek [Fri, 16 Oct 2020 12:28:12 +0000 (08:28 -0400)] 
auth: Remove support for SIA passdb

4 years agolib: Be less verbose in event filter tests
Josef 'Jeff' Sipek [Fri, 23 Oct 2020 14:56:08 +0000 (10:56 -0400)] 
lib: Be less verbose in event filter tests

Only print the input string if the test failed.

4 years agolib-smtp: smtp-server-connection - Make sure output stream errors are handled.
Stephan Bosch [Tue, 27 Oct 2020 22:16:44 +0000 (23:16 +0100)] 
lib-smtp: smtp-server-connection - Make sure output stream errors are handled.

4 years agolib-ssl-iosteam: ostream-openssl - Make sure error on plaintext streams is propagated.
Stephan Bosch [Mon, 26 Oct 2020 09:19:46 +0000 (10:19 +0100)] 
lib-ssl-iosteam: ostream-openssl - Make sure error on plaintext streams is propagated.

4 years agolib-ssl-iostrea: ostream-openssl - Add local variable for ssl_io in o_stream_ssl_flus...
Stephan Bosch [Mon, 26 Oct 2020 21:04:53 +0000 (22:04 +0100)] 
lib-ssl-iostrea: ostream-openssl - Add local variable for ssl_io in o_stream_ssl_flush_buffer().

4 years agoauth: db-oauth2 - Do not allow empty active_value or active_attribute, when other...
Aki Tuomi [Thu, 5 Nov 2020 11:25:19 +0000 (13:25 +0200)] 
auth: db-oauth2 - Do not allow empty active_value or active_attribute, when other is set

4 years agoauth: db-oauth2 - If active attribute is present in request, check it
Aki Tuomi [Thu, 29 Oct 2020 09:37:22 +0000 (11:37 +0200)] 
auth: db-oauth2 - If active attribute is present in request, check it

If the attribute is missing, do not assume it's false.

4 years agoauth: db-oauth2 - Check active attribute by default
Aki Tuomi [Thu, 29 Oct 2020 09:36:00 +0000 (11:36 +0200)] 
auth: db-oauth2 - Check active attribute by default

4 years agoauth: db-oauth2 - Change active:false to mean invalid token
Aki Tuomi [Thu, 22 Oct 2020 08:42:23 +0000 (11:42 +0300)] 
auth: db-oauth2 - Change active:false to mean invalid token

Specifications say that invalid token, expired token and any other
reason why the token can be considered invalid should return
{"active":false} reply with no other fields.

Thus, we need to consider this as invalid token.

4 years agoauth: db-oauth2 - Allow active:false without username
Aki Tuomi [Thu, 22 Oct 2020 08:41:16 +0000 (11:41 +0300)] 
auth: db-oauth2 - Allow active:false without username

4 years agolib-storage: Skip setting log view in mailbox_get_expunges_init when box->view is...
sergey.kitov [Tue, 13 Oct 2020 14:34:12 +0000 (17:34 +0300)] 
lib-storage: Skip setting log view in mailbox_get_expunges_init when box->view is outdated.

This fixes assert-crash when IMAP client uses QRESYNC and lots of changes happen between syncing points.

Fixes:
Panic: file mail-transaction-log-view.c: line 144 (mail_transaction_log_view_set): assertion failed: (min_file_seq <= max_file_seq)

4 years agolib-fts: test-fts-filter - Fix clang suspicious concatenation of string literals...
Timo Sirainen [Thu, 29 Oct 2020 10:34:57 +0000 (12:34 +0200)] 
lib-fts: test-fts-filter - Fix clang suspicious concatenation of string literals warning

Fixes:
warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]

4 years agolib: Standardize STMT_BEGIN and STMT_END
Timo Sirainen [Thu, 29 Oct 2020 10:33:14 +0000 (12:33 +0200)] 
lib: Standardize STMT_BEGIN and STMT_END

do .. while(0) should work everywhere.

This also fixes warnings given by new clang:
warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]

4 years agolib: test-istream - Don't try to return void
Timo Sirainen [Thu, 29 Oct 2020 10:32:44 +0000 (12:32 +0200)] 
lib: test-istream - Don't try to return void

4 years agolib: test-file-cache - Add asserts for initial return value of file_cache_get
Aki Tuomi [Wed, 28 Oct 2020 10:45:09 +0000 (12:45 +0200)] 
lib: test-file-cache - Add asserts for initial return value of file_cache_get

4 years agolib-lda: Update mail sizes to event only if they are known
Aki Tuomi [Wed, 28 Oct 2020 10:23:40 +0000 (12:23 +0200)] 
lib-lda: Update mail sizes to event only if they are known

4 years agolib-storage: raw-mail - Cast st_size to uoff_t
Aki Tuomi [Wed, 28 Oct 2020 10:22:58 +0000 (12:22 +0200)] 
lib-storage: raw-mail - Cast st_size to uoff_t

mbox->size is unsigned field, and st_size will be -1
is the stat target is not regular file or symbolic link.
This can happen if it's stream like stdin.