]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
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
Stephan Bosch [Wed, 25 Jan 2023 14:19:30 +0000 (15:19 +0100)]
lib-http: http-client-request - Make sure connection output is unlocked if blocking request receives response.
Otherwise, a race condition between outgoing payload transmission and receiving
the response may cause connection to hang.
Stephan Bosch [Wed, 25 Jan 2023 14:17:38 +0000 (15:17 +0100)]
lib-http: http-client-connection - Remove useless early state transition.
Happens in http_client_request_callback() already.
Stephan Bosch [Mon, 21 Mar 2022 11:24:53 +0000 (12:24 +0100)]
lib: ostream-wrapper - Don't halt/resume output upon error.
Stephan Bosch [Wed, 25 Jan 2023 17:39:44 +0000 (18:39 +0100)]
lib: ostream-wrapper - Call output_finished() callback when wrapper stream is finished and empty.
Before, it would only be called when the parent output is also fully flushed,
which is too late.
Stephan Bosch [Wed, 25 Jan 2023 17:36:40 +0000 (18:36 +0100)]
lib-test: ostream-final-trickle - Call o_stream_set_flush_pending(..., TRUE) in timeout.
Stephan Bosch [Thu, 26 Jan 2023 00:59:39 +0000 (01:59 +0100)]
lib-test: ostream-final-trickle - Fix bug occurring when writing single byte.
Stephan Bosch [Tue, 20 Mar 2018 19:59:51 +0000 (20:59 +0100)]
lib-http: Reformat http-client.h.
Stephan Bosch [Tue, 20 Mar 2018 19:59:45 +0000 (20:59 +0100)]
lib-http: Reformat http-client.c.
Aki Tuomi [Mon, 30 Jan 2023 14:13:27 +0000 (16:13 +0200)]
lib-sql: Don't allow passing NULL duration_r to sql_query_finished_event()
Almost everyone provides it in any case.
Aki Tuomi [Fri, 27 Jan 2023 18:25:40 +0000 (20:25 +0200)]
lib-sql: driver-sqlite - Handle CANTOPEN like READONLY
Older SQLite will not use READONLY.
Aki Tuomi [Fri, 27 Jan 2023 18:26:42 +0000 (20:26 +0200)]
lib-sql: driver-sqlite - Include rc in database connection error message
Timo Sirainen [Fri, 27 Jan 2023 23:07:26 +0000 (01:07 +0200)]
fs-randomfail: Make sure 100% probability always fails
The randomness was previously divided 50% pre-operation and 50%
post-operation, so it wasn't guaranteed to always fail.
Timo Sirainen [Fri, 27 Jan 2023 19:59:00 +0000 (21:59 +0200)]
lib-storage: shared - Fix handling errors initializing shared mailbox owner user
Broken by
46289fd0efce678c07f13bfa5f3cb077d2ea8cb8
Timo Sirainen [Fri, 27 Jan 2023 19:52:04 +0000 (21:52 +0200)]
global: Fix libauth and libotp linking issues using --without-shared-libs
Aki Tuomi [Thu, 26 Jan 2023 10:59:47 +0000 (12:59 +0200)]
login-common: Rename login_auth_socket_path to login_socket_path
Timo Sirainen [Mon, 9 Jan 2023 14:29:38 +0000 (16:29 +0200)]
lib-master, config: Ignore SSL server settings when executing doveconf via doveadm
This is just a temporary kludge to allow running doveadm (as non-root) when
SSL cert/key files aren't readable. Changes later on fix this properly.
Timo Sirainen [Mon, 9 Jan 2023 22:59:00 +0000 (00:59 +0200)]
lib-master: Add DOVECONF_SERVICE environment to doveconf
This is needed to avoid calling managesieve dump-capability for doveadm and
other processes that don't need it.
Timo Sirainen [Mon, 26 Dec 2022 20:21:43 +0000 (15:21 -0500)]
lib-master, config: Support disabling settings checks
This is intended for managesieve's dump-capability.
Timo Sirainen [Mon, 9 Jan 2023 14:16:36 +0000 (16:16 +0200)]
config: Remove last traces of modules based filtering
Timo Sirainen [Mon, 9 Jan 2023 14:13:42 +0000 (16:13 +0200)]
config: config_parse_file() - Remove unused modules parameter
Timo Sirainen [Mon, 9 Jan 2023 14:26:02 +0000 (16:26 +0200)]
config: config_parse_file() - Change expand_values parameter to enum
Timo Sirainen [Sat, 17 Dec 2022 19:50:45 +0000 (21:50 +0200)]
lib-master: Keep the config always mmap()ed
The config fd is no longer necessary to keep open.
Timo Sirainen [Sat, 17 Dec 2022 19:49:17 +0000 (21:49 +0200)]
lib-master, lib-login: Remove master_service_close_config_fd()
Config fd is now always kept open and it shouldn't be closed.
Timo Sirainen [Sat, 17 Dec 2022 19:26:26 +0000 (21:26 +0200)]
lib-master, global: Remove MASTER_SERVICE_FLAG_KEEP_CONFIG_OPEN
The config is now always kept open.
Timo Sirainen [Sun, 11 Dec 2022 23:16:21 +0000 (01:16 +0200)]
lib-master, config: Change parsed config file syntax to binary
Also use mmap() to parse the config more efficiently. The late doveconf
exec fallback is also removed here, since mmap() isn't expected to fail and
afterwards the errors are about the config file syntax errors. (The
doveconf fallback is still there in the earlier code before config fd is
received.)
Timo Sirainen [Tue, 29 Nov 2022 19:23:15 +0000 (21:23 +0200)]
lib-settings: Remove unused settings_stream_unescape() and SETTING_STREAM_LF_CHAR
Timo Sirainen [Tue, 29 Nov 2022 19:08:03 +0000 (21:08 +0200)]
lib-settings: Remove unused settings_parse_stream*()
Timo Sirainen [Tue, 29 Nov 2022 19:06:45 +0000 (21:06 +0200)]
lib-settings: test-settings-parser - Parse settings one line at a time instead of as streams
Timo Sirainen [Tue, 29 Nov 2022 19:03:40 +0000 (21:03 +0200)]
stats: unit tests - Parse settings one line at a time instead of as streams
Timo Sirainen [Tue, 29 Nov 2022 18:54:32 +0000 (20:54 +0200)]
lib-settings: Remove unused settings_parse_environ()
Timo Sirainen [Sun, 18 Dec 2022 21:09:36 +0000 (23:09 +0200)]
lib-master: Remove support for reading settings from environment
This is no longer necessary with doveconf -F parameter. The settings were
previously also being read from environment if -k parameter was used, but
there was never any real benefit in doing that. This change was introduced
by
a88696bd63b2ce0f7b02ee3352e4bf739497352a simply to keep the behavior
identical when reading settings via doveconf vs config socket.
Timo Sirainen [Mon, 9 Jan 2023 16:49:58 +0000 (18:49 +0200)]
lib-master, master: Remove MASTER_SERVICE_FLAG_DISABLE_SSL_SET
This is no longer necessary now that settings are passed via fd.
Timo Sirainen [Fri, 9 Dec 2022 22:13:26 +0000 (00:13 +0200)]
master, log: Pass config fd from master to log process
The log process must not depend on the config process, because they would
have a circular dependency. Previously the configuration was sent to the
log process via environment filled by the master process. Now that we have
the full config available in a file descriptor, pass that config fd instead.