]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Marco Bettini [Tue, 28 Feb 2023 12:05:44 +0000 (12:05 +0000)]
dbox: dbox_cleanup_temp_files() - Fuzz scan interval adding 0..+30% based on username hash
Marco Bettini [Tue, 28 Feb 2023 11:45:43 +0000 (11:45 +0000)]
dbox: dbox_cleanup_temp_files() - Reformat code
Marco Bettini [Tue, 28 Feb 2023 11:44:48 +0000 (11:44 +0000)]
dbox: dbox_cleanup_temp_files() - Remove unnecessary else/else if after returns
Marco Bettini [Tue, 28 Feb 2023 11:30:22 +0000 (11:30 +0000)]
dbox: dbox_mailbox_open() - Drop unused ctime
Marco Bettini [Tue, 28 Feb 2023 11:21:10 +0000 (11:21 +0000)]
dbox: dbox_mailbox_open() - Move dbox_cleanup_temp_files() to dbox_mailbox_close()
Marco Bettini [Tue, 28 Feb 2023 10:15:50 +0000 (10:15 +0000)]
dbox: dbox_mailbox_open() - Infer last_temp_file_scan from dir's atime if 0
Marco Bettini [Tue, 28 Feb 2023 10:14:26 +0000 (10:14 +0000)]
dbox: dbox_mailbox_create() - Update last_temp_file_scan
Marco Bettini [Fri, 3 Mar 2023 16:15:17 +0000 (16:15 +0000)]
lib-storage: dbox_cleanup_temp_files() - Fix inverted check for ENOENT
Timo Sirainen [Fri, 24 Feb 2023 14:39:14 +0000 (16:39 +0200)]
doveadm: Panic if doveadm_print_header() is called too late
Otherwise it's not noticed unless the doveadm command is called for multiple
users (-A, -F).
Timo Sirainen [Fri, 24 Feb 2023 14:22:28 +0000 (16:22 +0200)]
doveadm: Panic if doveadm_print_init() is called too late
Otherwise it's not noticed unless the doveadm command is called for multiple
users (-A, -F).
Marco Bettini [Wed, 1 Mar 2023 16:17:05 +0000 (16:17 +0000)]
fts-flatcurve: Move doveadm_print_header() eariler
Otherwise the newly introduced checks trigger faults
Marco Bettini [Wed, 1 Mar 2023 16:16:11 +0000 (16:16 +0000)]
fts: fts tokenize - Move doveadm_print_init() eariler
Otherwise the newly introduced checks trigger faults
Marco Bettini [Tue, 28 Feb 2023 16:49:53 +0000 (16:49 +0000)]
mail-crypt: Move doveadm_print_init/header() eariler
Otherwise the newly introduced checks trigger faults
Aki Tuomi [Mon, 27 Feb 2023 14:00:02 +0000 (16:00 +0200)]
doveadm: pw - Allow weak schemes in verification
Aki Tuomi [Fri, 3 Mar 2023 09:48:38 +0000 (11:48 +0200)]
auth: mech-gssapi - Remove KRB5_USEROK check
It should be there always these days. Enables cross-realm
and cross-identity authentication always.
Timo Sirainen [Sun, 5 Feb 2023 18:51:12 +0000 (20:51 +0200)]
sdbox: Fix panic due to leaked mail_index_view if sync fails
Fixes:
Panic: Leaked view for index .../dbox-Mails/dovecot.index: Opened in mail-index-sync.c:445
Timo Sirainen [Sun, 5 Feb 2023 18:50:06 +0000 (20:50 +0200)]
lib-index: Don't update log_file_tail_offset on sync if reading dovecot.index.log failed
This is more of a theoretical issue, since dovecot.index.log read failure is
very unlikely.
Timo Sirainen [Sun, 5 Feb 2023 18:47:08 +0000 (20:47 +0200)]
lib-index: Don't update max_tail_offset if write to dovecot.index.log fails
The max_tail_offset didn't actually increase in that situation.
This fixes wrongly updating mail_index_header.log_file_tail_offset after
write to dovecot.index.log failed (due to out of disk space), which in
turn can cause some unexpected errors.
Timo Sirainen [Sun, 5 Feb 2023 18:46:34 +0000 (20:46 +0200)]
lib-index: Fix event leak if purging dovecot.index.cache fails
Timo Sirainen [Fri, 24 Feb 2023 12:06:14 +0000 (14:06 +0200)]
lib: event-filter-parser.y - Add workaround for nerrs being unused warning
Fixes with clang-17:
warning: variable 'event_filter_parser_nerrs' set but not used
Timo Sirainen [Fri, 24 Feb 2023 12:02:01 +0000 (14:02 +0200)]
global: Remove dead code
Timo Sirainen [Thu, 23 Feb 2023 14:10:43 +0000 (16:10 +0200)]
lib: istream - Don't call memcpy() with NULL parameter --with-devel-checks
Aki Tuomi [Wed, 22 Feb 2023 12:08:20 +0000 (14:08 +0200)]
lib: lib - Add value for defines that don't have it
Fixes compilation with FreeBSD that requires a value for
defines.
Broken in
e6f2682b32ff5b366ee7242841c3194425202880
Aki Tuomi [Wed, 22 Feb 2023 12:06:57 +0000 (14:06 +0200)]
lib: lib - Remove memcpy macro in C++
This breaks C++ compilation due to too wide impact.
Broken in
38dbeec767ad10021020e3833b1dbc3d04442f85
Aki Tuomi [Wed, 22 Feb 2023 12:06:05 +0000 (14:06 +0200)]
lib-auth: Remove external libraries from dependencies
This just breaks compilation when they contain -L.
Broken in
5d632abbf571f8e9157b1526533d677a1b8eb829
Karl Fleischmann [Thu, 23 Feb 2023 07:16:13 +0000 (08:16 +0100)]
lib-mail: Remove obsolete mail-user-hash
Karl Fleischmann [Thu, 23 Feb 2023 07:15:48 +0000 (08:15 +0100)]
login-common: Remove obsolete include of mail-user-hash.h
Marco Bettini [Wed, 22 Feb 2023 09:18:48 +0000 (09:18 +0000)]
fts: cmd_fts_expand_run() - Fix for crash invoking doveadm fts expand -A
Marco Bettini [Tue, 21 Feb 2023 10:04:36 +0000 (10:04 +0000)]
imap: imap_parser_read_next_atom() - Reject special character DEL 0x7F
atom-specials includes CTL, which in turn contains \x00-\x1F and \x7F DEL
Marco Bettini [Tue, 21 Feb 2023 10:03:11 +0000 (10:03 +0000)]
imap: imap_parser_read_next_atom() - Accept "]" in cmd-tag(s)
despite "]" being in atom-specials, a specific exception is made
for that in ASTRING-CHAR, which is used by tag
Timo Sirainen [Sun, 5 Feb 2023 19:52:11 +0000 (21:52 +0200)]
lib-imap-client: Fix crash if SSL initialization fails when connecting
This could be for example due to invalid SSL certificate settings.
Stephan Bosch [Fri, 10 Feb 2023 15:46:37 +0000 (16:46 +0100)]
lib-imap-urlauth: imap-urlauth - Don't return errors from imap_msgpart_url*() as internal errors.
These are explicitly suitable as client errors; e.g. about nonexistent folders.
Timo Sirainen [Tue, 30 Mar 2021 11:26:08 +0000 (14:26 +0300)]
lib-imap-urlauth: imap-urlauth - Don't replace error returned by imap_msgpart_url_open_mailbox()
The original error is intended to be sent to the client.
Timo Sirainen [Tue, 30 Mar 2021 11:25:27 +0000 (14:25 +0300)]
lib-imap-urlauth: imap-urlauth - Rename error_r parameters to client_error_r
This indicates that the error messages are safe to be sent to the client.
Stephan Bosch [Fri, 10 Feb 2023 03:57:56 +0000 (04:57 +0100)]
imap-urlauth: imap-urlauth-worker - Fix event leak.
Stephan Bosch [Sat, 4 Feb 2023 17:30:37 +0000 (18:30 +0100)]
lib-imap-urlauth: imap-urlauth-connection - Retain callback when callback returns 0.
Makes sure callback can be called for the next pass; e.g., for abort.
Stephan Bosch [Sat, 4 Feb 2023 17:33:26 +0000 (18:33 +0100)]
submission: submission-commands - Make sure BURL request abort does not try to send second reply.
Stephan Bosch [Sat, 4 Feb 2023 17:31:59 +0000 (18:31 +0100)]
submission: submission-commands - Remember whether chunk was added for BURL command.
Stephan Bosch [Thu, 1 Dec 2022 19:54:02 +0000 (20:54 +0100)]
imap: cmd-urlfetch - Prevent assertion failure upon error in urlfetch callback.
Panic was:
Panic: file imap-client.c: line 988 (client_command_free): assertion failed: (!cmd->executing)
Stephan Bosch [Wed, 27 Jul 2022 21:09:24 +0000 (23:09 +0200)]
auth: auth-request - Snapshot the userdb fields upon authentication success.
Otherwise, fields added by mechanisms that don't use a passdb lookup (such as
DOVECOT-TOKEN) can be lost upon the subsequent userdb lookup.
Stephan Bosch [Wed, 27 Jul 2022 21:07:29 +0000 (23:07 +0200)]
auth: auth-client-connection - Fix assertion occurring when DOVECOT-TOKEN mechanism is used.
It was not returned as a "private" mechanism, which now triggers a panic due to
a recently added assertion.
Panic was:
Panic: file sasl-server.c: line 520 (sasl_server_auth_begin): assertion failed: (!private || (mech->flags & MECH_SEC_PRIVATE) != 0)
Aki Tuomi [Fri, 17 Feb 2023 10:07:01 +0000 (12:07 +0200)]
config: old-set-parser - Remove mention about external auth server
Aki Tuomi [Fri, 17 Feb 2023 10:06:32 +0000 (12:06 +0200)]
master: Update comment in mkdir_login_dir()
Aki Tuomi [Fri, 17 Feb 2023 10:04:48 +0000 (12:04 +0200)]
master: Remove settings_have_auth_unix_listeners_in()
External authentication has not worked since v2.0.
Timo Sirainen [Tue, 14 Feb 2023 23:46:44 +0000 (01:46 +0200)]
configure: Fix linking order of lib-auth and lib-otp
lib-auth depends on lib-otp, so it should be first.
Timo Sirainen [Thu, 9 Feb 2023 15:04:22 +0000 (17:04 +0200)]
lib-imap-client: Fix/clarify selection state handling
The old code assumed that selected_box would be non-NULL while a new mailbox
is being selected. That's not true though, the imapc-storage code closes the
old mailbox before selecting the next one. So the QRESYNC-specific code for
tracking selected-state was never being used. Fixed this, and clarified in
general how the selected-state is supposed to work.
Timo Sirainen [Thu, 9 Feb 2023 15:03:00 +0000 (17:03 +0200)]
lib-imap-client: Rename imapc_connection.selecting_box to qresync_selecting_box
It's only used when QRESYNC extension is enabled.
Timo Sirainen [Thu, 9 Feb 2023 14:21:24 +0000 (16:21 +0200)]
imapc: Fix handling EXISTS reply to previous mailbox while selecting new mailbox
For example if the communication was:
C: a SELECT box1
...
C: b SELECT box2
S: * 10 EXISTS
S: * 1 EXISTS
S: * OK [UIDVALIDITY
1675948459 ] UIDs valid
S: ...
S: b OK
The first EXISTS is meant for box1, not box2. Fixed by not starting a FETCH
(FLAGS) for the mailbox being selected until the tagged reply is received.
Timo Sirainen [Thu, 9 Feb 2023 14:12:35 +0000 (16:12 +0200)]
imapc: Don't process untagged replies in mailbox that isn't fully selected yet
For example if the communication was:
C: a SELECT box1
...
C: b SELECT box2
S: * 1 EXPUNGE
S: * 1 EXISTS
S: * OK [UIDVALIDITY
1675948459 ] UIDs valid
S: ...
S: b OK
The expunge was intended for box1, not box2. This caused:
Warning: imapc(...): Mailbox '...' state corrupted: EXPUNGE received for empty mailbox - reconnecting
Fixed this by ignoring untagged EXPUNGE, FETCH, SEARCH and ESEARCH replies
when the UIDVALIDITY reply hasn't been yet received for a mailbox.
Karl Fleischmann [Tue, 7 Feb 2023 15:01:38 +0000 (16:01 +0100)]
lib-storage: Omit irrelevant mail uid=0 for saved mails in mail event log prefix
Karl Fleischmann [Tue, 7 Feb 2023 10:07:05 +0000 (11:07 +0100)]
lib-storage: Make mail error UID reporting consistent for corrupted cache
Karl Fleischmann [Wed, 1 Feb 2023 17:00:18 +0000 (18:00 +0100)]
global: Access mail errors directly instead of mailbox errors
Karl Fleischmann [Wed, 1 Feb 2023 17:04:24 +0000 (18:04 +0100)]
lib-storage: Unit test mail*_get_last_internal_error() functions
Karl Fleischmann [Thu, 26 Jan 2023 10:36:03 +0000 (11:36 +0100)]
lib-storage: Unit test mail_set_critical()
Karl Fleischmann [Thu, 19 Jan 2023 15:40:34 +0000 (16:40 +0100)]
lib-storage: Report critical mail errors without redundant mail prefix
Don't report mail prefix unless it's different from last tracked mail
uid, similar to mailbox_get_last_internal_error().
Karl Fleischmann [Thu, 19 Jan 2023 15:05:12 +0000 (16:05 +0100)]
lib-storage: Fix typo in note-comment of mailbox_get_last_internal_error()
Timo Sirainen [Mon, 30 Jan 2023 23:39:23 +0000 (01:39 +0200)]
fts: Remove unused fts-expunge-log
Timo Sirainen [Tue, 7 Feb 2023 20:36:32 +0000 (22:36 +0200)]
lib-master: Fail if SOCKET_COUNT environment is empty in non-standalone mode
The master process is expected to always set SOCKET_COUNT.
Timo Sirainen [Tue, 7 Feb 2023 20:35:24 +0000 (22:35 +0200)]
lib-master: Ignore SOCKET_COUNT with MASTER_SERVICE_FLAG_STANDALONE
This could have caused problems when e.g. doveadm command was executed
inside a process started via master process.
Aki Tuomi [Wed, 8 Feb 2023 18:40:41 +0000 (20:40 +0200)]
auth: test-lua - Check that password is returned in lookup
Aki Tuomi [Wed, 8 Feb 2023 18:32:57 +0000 (20:32 +0200)]
auth: test-lua - Test bad keynames end up ignored
Aki Tuomi [Wed, 1 Feb 2023 11:58:42 +0000 (13:58 +0200)]
lib-storage: mail-user - Add event_ prefixed values from userdb as event fields
Aki Tuomi [Mon, 6 Feb 2023 09:11:06 +0000 (11:11 +0200)]
lib-auth-client: auth-client-request - Use split value in args_parse_user()
Since we already split this in previous commit, we can take advantage
of the provided key-value.
Aki Tuomi [Wed, 1 Feb 2023 11:53:42 +0000 (13:53 +0200)]
login-common: Add event_ prefixed values from auth as event fields
Aki Tuomi [Mon, 6 Feb 2023 19:23:48 +0000 (21:23 +0200)]
auth: db-lua - Skip invalid keys and values on field export
Timo Sirainen [Tue, 7 Feb 2023 18:43:08 +0000 (20:43 +0200)]
lib: t_split_key_value*() - Use ATTR_NOWARN_UNUSED_RESULT
Marco Bettini [Thu, 2 Feb 2023 11:00:04 +0000 (11:00 +0000)]
doveadm auth login: Separate userdb's user from userdb actual extra fields in command output
Marco Bettini [Fri, 3 Feb 2023 16:25:19 +0000 (16:25 +0000)]
lib-storage: set_line() - Add check against empty lines and keys, drop suffixing lines without '='
The previous check is no longer necessary as keys are now always followed
by '=', but in case of empty lines now the function would crash instead
of setting "plugin/=yes" (which didn't make sense either)
Marco Bettini [Thu, 2 Feb 2023 09:26:12 +0000 (09:26 +0000)]
auth: Remove extra tabs inserted using auth_fields_append()
Marco Bettini [Mon, 23 Jan 2023 16:24:33 +0000 (16:24 +0000)]
auth: Drop auth_fields_booleanize()
Booleanization is no longer necessary as now the fields expecting it
expect just the field presence, not a specific value.
Marco Bettini [Fri, 27 Jan 2023 13:37:15 +0000 (13:37 +0000)]
auth: Allow auth extra-fields with empty strings, NULL values enforced to empty string ""
Marco Bettini [Wed, 1 Feb 2023 11:44:06 +0000 (11:44 +0000)]
auth: Use t_split_key_value_eq()
auth_user_fields_parse() use t_split_key_value_eq
Marco Bettini [Fri, 27 Jan 2023 14:03:22 +0000 (14:03 +0000)]
lib-storage: mail_user_get_alt_usernames() - Skip empty string values
Marco Bettini [Fri, 27 Jan 2023 13:43:34 +0000 (13:43 +0000)]
lib-storage: Use t_split_key_value_eq()
Marco Bettini [Fri, 27 Jan 2023 13:55:27 +0000 (13:55 +0000)]
login-common: authenticate_callback() - Accept valued items for nologin,proxy,anonymous
Previously these fields were expected to be sent only value-less (i.e. with no trailing '=<value>')
Marco Bettini [Fri, 27 Jan 2023 13:30:17 +0000 (13:30 +0000)]
login-common: sasl-server - Use t_split_key_value_eq()
Marco Bettini [Mon, 23 Jan 2023 09:38:51 +0000 (09:38 +0000)]
lib: Add t_split_key_value_eq()
Martti Rannanjärvi [Wed, 1 Feb 2023 11:15:43 +0000 (13:15 +0200)]
run-test-valgrind.supp: Suppress OpenSSL EVP_DecryptFinal_ex() use of uninitialized value
This issue seems to be https://github.com/openssl/openssl/issues/19719
Timo Sirainen [Tue, 10 Jan 2023 23:23:03 +0000 (01:23 +0200)]
aggregator: Fix assert-crash when output to replicator starts queuing
If the output was less than IO_BLOCK_SIZE (as it usually would be), the code
just skipped over the whole buffered output and was confused that it didn't
find LF. Fixed by skipping over all but the last byte in the buffer, which
should be the LF.
Fixes:
Panic: file replicator-connection.c: line 99 (replicator_send_buf): assertion failed: (len < buf->used)
Timo Sirainen [Wed, 1 Feb 2023 11:26:25 +0000 (13:26 +0200)]
master: Fix fd leak check at startup with DEBUG
Don't fail at startup because config fd is set.
Broken by
9280367fdb767d9248dd9a3713519ee3cdad6b3f
Timo Sirainen [Fri, 27 Jan 2023 14:31:28 +0000 (16:31 +0200)]
lib: Add memcpy() macro that assert-crashes if either parameter is NULL
Timo Sirainen [Sat, 14 Jan 2023 22:42:39 +0000 (00:42 +0200)]
global: Make sure memcpy() isn't called with NULL parameters
Add an explicit if-check to make sure neither destination nor source pointer
parameter is NULL, since it's undefined behavior and can lead to crashes
with current compilers.
Currently this code isn't known to have caused issues.
Timo Sirainen [Sat, 14 Jan 2023 22:40:32 +0000 (00:40 +0200)]
global: Add asserts to make sure memcpy() won't be called with NULL parameters
These asserts aren't expected to trigger with current code.
Timo Sirainen [Sat, 14 Jan 2023 22:39:53 +0000 (00:39 +0200)]
lib: ostream-file - Fix assert to be more restrictive
Karl Fleischmann [Mon, 30 Jan 2023 15:50:22 +0000 (16:50 +0100)]
lib-dict: Parse proxy attributes as millisecond based interval
Karl Fleischmann [Mon, 30 Jan 2023 15:45:05 +0000 (16:45 +0100)]
lib-dict: Rename proxy attributes
Make the naming of the attributes consistent with other storage
parameters, especially the http-storage.
Karl Fleischmann [Mon, 30 Jan 2023 15:33:45 +0000 (16:33 +0100)]
lib-dict: Fix comment of default proxy timeout millisecond macro
Karl Fleischmann [Mon, 30 Jan 2023 15:35:56 +0000 (16:35 +0100)]
global: Complete unsigned int declarations
To be more consistent with the rest of the code base and because of code
quality reasons this commit adds the "int" keyword that is theoretically
optional for unsigned integer types.
Timo Sirainen [Tue, 31 Jan 2023 16:12:53 +0000 (18:12 +0200)]
lib-http: Remove unnecessary NULL check
This is confusing static analyzers.
Broken by
987fab8f4e143ab851c3318c8614e81bb0f2b360
Timo Sirainen [Sun, 29 Jan 2023 10:54:30 +0000 (12:54 +0200)]
lib: Add unit test for random_fill()
Timo Sirainen [Wed, 11 Jan 2023 14:30:16 +0000 (16:30 +0200)]
lib-http: test-http-payload - Use ostream-final-trickle for client connections
Stephan Bosch [Fri, 27 Jan 2023 03:01:23 +0000 (04:01 +0100)]
lib-http: test-http-payload - Add more server last byte trickle tests.
Stephan Bosch [Fri, 27 Jan 2023 03:05:59 +0000 (04:05 +0100)]
lib-http: test-http-payload - Rename server last byte trickle test.
Stephan Bosch [Fri, 27 Jan 2023 02:54:48 +0000 (03:54 +0100)]
lib-http: test-http-payload - Add server_ prefix to tset.trickle_final_byte.
Stephan Bosch [Thu, 26 Jan 2023 01:41:05 +0000 (02:41 +0100)]
lib-http: test-http-payload - Clean up global http client context between tests.
Stephan Bosch [Fri, 21 May 2021 11:07:57 +0000 (13:07 +0200)]
lib-http: test-http-payload - Restructure client init/deinit.
Stephan Bosch [Thu, 12 Jan 2023 01:53:38 +0000 (02:53 +0100)]
lib-http: test-http-payload - Fix segfault occurring upon out-of-sequence request completion.
Stephan Bosch [Thu, 26 Jan 2023 01:34:39 +0000 (02:34 +0100)]
lib-http: http-client - Make http_client_global_context_free() public for testing.
Stephan Bosch [Wed, 25 Jan 2023 04:18:10 +0000 (05:18 +0100)]
lib-http: client - Don't unlock connection output before request is fully sent
This could happen at least when the payload is empty and the final LF was
buffered.
Stephan Bosch [Wed, 25 Jan 2023 20:47:26 +0000 (21:47 +0100)]
lib-http: client - Don't unlock connection output before request payload is fully sent