]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Fred Morcos [Wed, 4 Dec 2024 13:24:41 +0000 (14:24 +0100)]
imap: Fix ifdef location
Fred Morcos [Tue, 3 Dec 2024 18:36:30 +0000 (19:36 +0100)]
lib,doveadm: Add missing includes
Fred Morcos [Tue, 3 Dec 2024 18:17:00 +0000 (19:17 +0100)]
lib: Add NOLINT clang-tidy directives for some helpers
Aki Tuomi [Fri, 29 Dec 2023 14:09:55 +0000 (16:09 +0200)]
lib-smtp: Remove duplicate function declaration
Aki Tuomi [Fri, 29 Dec 2023 14:09:44 +0000 (16:09 +0200)]
doveadm: Remove duplicate extern
Aki Tuomi [Fri, 29 Dec 2023 14:05:27 +0000 (16:05 +0200)]
lib-fs,lib-storage: Fix posix_fadvise usage
Return value is non-zero on error, not negative.
Aki Tuomi [Fri, 29 Dec 2023 13:20:48 +0000 (15:20 +0200)]
auth: Remove duplicate extern
Aki Tuomi [Fri, 29 Dec 2023 13:20:27 +0000 (15:20 +0200)]
auth: auth-cache - Remove duplicate include
Aki Tuomi [Fri, 29 Dec 2023 13:20:06 +0000 (15:20 +0200)]
lib: time-util - Fix implicit casts
Aki Tuomi [Fri, 29 Dec 2023 13:19:52 +0000 (15:19 +0200)]
lib-index: Remove duplicate function declaration
Aki Tuomi [Fri, 29 Dec 2023 10:52:48 +0000 (12:52 +0200)]
global: Add NOLINT for noisy macros
Remove warnings with clang-tidy
Fred Morcos [Mon, 2 Dec 2024 07:05:29 +0000 (08:05 +0100)]
global: Fix whitespace -> tabs
Fred Morcos [Thu, 12 Dec 2024 11:13:54 +0000 (12:13 +0100)]
global: Add clangd config file
Aki Tuomi [Tue, 12 Nov 2024 08:27:19 +0000 (10:27 +0200)]
global: Add clang-tidy config file
Fred Morcos [Mon, 2 Dec 2024 07:04:10 +0000 (08:04 +0100)]
global: Add clang-format config file
Aki Tuomi [Tue, 12 Nov 2024 08:29:09 +0000 (10:29 +0200)]
gitignore: Ignore clangd and emacs directories
Aki Tuomi [Tue, 12 Nov 2024 08:18:12 +0000 (10:18 +0200)]
global: Add dovecot-style editor config
Timo Sirainen [Wed, 11 Dec 2024 12:37:18 +0000 (14:37 +0200)]
configure: Replace "if" with AS_IF
Timo Sirainen [Wed, 11 Dec 2024 08:42:27 +0000 (10:42 +0200)]
configure: Fix config version checks for x.y versioning (without .z)
Stephan Bosch [Tue, 10 Dec 2024 14:45:12 +0000 (15:45 +0100)]
lib-smtp: smtp-command-parser - Explicitly disallow 8-bit characters for AUTH response
Later Base64 parsing would catch that, but command parser errors become clearer
when this is caught early. Also, this fixes a unit test failure when
experimental SMTPUTF8 support is enabled.
When SMTPUTF8 support is disabled, smtp_char_is_textstr() disallows 8-bit
implicitly, but when SMTPUTF8 is enabled 8-bit octets will be let through.
This caused the invalidity unit test to fail.
Stephan Bosch [Tue, 10 Dec 2024 14:35:16 +0000 (15:35 +0100)]
lib-smtp: test-smtp-command-parser - Fail invalidity tests properly in case of valid result
Stephan Bosch [Tue, 10 Dec 2024 13:59:13 +0000 (14:59 +0100)]
lib-smtp: test-smtp-command-parser - Properly test bad parameter characters vs. missing EOL
Aki Tuomi [Thu, 5 Dec 2024 08:04:39 +0000 (10:04 +0200)]
lib-smtp: test-smtp-address - Vary tests based on SMTPUTF8 support
Timo Sirainen [Thu, 5 Dec 2024 08:45:11 +0000 (10:45 +0200)]
lib-sql: cassandra - Add data stack frame
Timo Sirainen [Wed, 4 Dec 2024 11:51:47 +0000 (13:51 +0200)]
lib-fs: Add fs_get_root_fs()
Timo Sirainen [Thu, 5 Dec 2024 18:23:28 +0000 (20:23 +0200)]
doveadm auth: Fix potential crash when auth is aborted with a signal
Timo Sirainen [Mon, 2 Dec 2024 10:11:48 +0000 (12:11 +0200)]
dict-ldap: Avoid linking to a dovecot-ldap shared library
The dict-ldap itself is the plugin, which is dynamically loaded.
There's no need for dovecot-ldap shared library to be used. This
changes the lib-ldap linking behavior to same as lib-sql.
Timo Sirainen [Mon, 2 Dec 2024 22:11:41 +0000 (00:11 +0200)]
lib-dns: dnc_client_lookup*() - Add data stack frames
Timo Sirainen [Mon, 2 Dec 2024 22:10:06 +0000 (00:10 +0200)]
doveadm: Use a separate memory pool for parsing doveadm command line parameters
This avoids spending a lot of the data stack for the actual command
processing, causing them to grow the data stack.
Aki Tuomi [Fri, 29 Nov 2024 10:41:06 +0000 (12:41 +0200)]
doc: Replace html documentation with redirect to documentation
Aki Tuomi [Thu, 8 Aug 2024 12:13:19 +0000 (15:13 +0300)]
NEWS: Add news for 2.3.21.1
Vincent Kenbeek [Thu, 10 Oct 2024 09:38:56 +0000 (11:38 +0200)]
lib-http: Add http_client_request_retrieve_headers()
Aki Tuomi [Thu, 28 Nov 2024 07:33:05 +0000 (09:33 +0200)]
lib-sql: Link test binaries to libdovecot.la
Otherwise it tries to use installed one, if available.
Aki Tuomi [Thu, 28 Nov 2024 07:14:48 +0000 (09:14 +0200)]
configure: Use $SED and $GREP to make sure we get correct tools
Aki Tuomi [Thu, 28 Nov 2024 07:53:22 +0000 (09:53 +0200)]
imap: Don't try to hibernate if it's not enabled
Kirill A. Korinsky [Thu, 26 Sep 2024 20:08:47 +0000 (22:08 +0200)]
imap-hibernate: If not enabled, do not include in settings either
Kirill A. Korinsky [Sun, 13 Oct 2024 09:07:00 +0000 (11:07 +0200)]
net: net_connect_ip*() - Handle OpenBSD errors similarly to FreeBSD
Aki Tuomi [Wed, 27 Nov 2024 07:04:36 +0000 (09:04 +0200)]
auth: Replace random() with proper i_rand_minmax()
Aki Tuomi [Wed, 27 Nov 2024 07:04:22 +0000 (09:04 +0200)]
dsync: Use correct format for time_t in dsync_brain_recv_mailbox_tree_deletes()
Aki Tuomi [Tue, 26 Nov 2024 20:44:35 +0000 (22:44 +0200)]
configure: Split grep into multiple -e expressions
This is more portable.
Aki Tuomi [Tue, 26 Nov 2024 12:32:08 +0000 (14:32 +0200)]
lib-ssl-iostream,lib-dcrypt: Raise minimum OpenSSL compatibility level to 1.1.1
But retain compatibility with LibreSSL.
Timo Sirainen [Tue, 26 Nov 2024 20:35:02 +0000 (22:35 +0200)]
lib: mkdir_parents() - Avoid unnecessary syscalls when uid/gid doesn't change
There's no need to open() + fchown() the directory after mkdir(), if neither
uid nor gid changes.
Timo Sirainen [Tue, 26 Nov 2024 14:57:01 +0000 (16:57 +0200)]
lib-settings: Fix variable type mismatches
Just use size_t everywhere since it points to mmap()ed memory.
Timo Sirainen [Thu, 21 Nov 2024 10:23:46 +0000 (12:23 +0200)]
auth: Fix userdb auth cache with username changes
The problem was for example when userdb lookup uses only the username part
of the username@domain lookup. Then:
* "username" lookup caches the results for "username". Since the username
didn't change, it doesn't store in the cache the "user" field.
* "username@domain" lookup looks up "username" from cache. Since there is
no "user" field, the code didn't think the username had changed.
Fix this by saving the "user" field to auth cache, regardless of whether
it's the same as the current username.
Timo Sirainen [Wed, 20 Nov 2024 13:16:00 +0000 (15:16 +0200)]
mdbox: Fix crash if resync fails because of an early failure
This mainly happened if dovecot.map.index.log was locked and resync timed
out waiting for it.
Stephan Bosch [Tue, 19 Nov 2024 22:21:54 +0000 (23:21 +0100)]
lib-lua: test-lua-http-client - Prevent HTTP client context from traversing fork
The children will start fighting over the connection FDs and the test will
panic out:
DNS: Panic: epoll_ctl(mod, 8) failed: No such file or directory
CLIENT: Panic: epoll_ctl(mod, 8) failed: No such file or directory
This happens very infrequently.
Timo Sirainen [Mon, 11 Nov 2024 12:45:39 +0000 (14:45 +0200)]
configure.ac: Fix generating DOVECOT_CONFIG_VERSION
Timo Sirainen [Fri, 8 Nov 2024 08:59:10 +0000 (10:59 +0200)]
configure.ac, config: Change supported config versions to work based on PACKAGE_VERSION
For git this means 0.0.0, but the supported versions still include hardcoded
2.4.0 / 3.0.0, which can be used.
Timo Sirainen [Wed, 30 Oct 2024 07:59:10 +0000 (09:59 +0200)]
lib-lua: Fix lua library dependencies when building --without-shared-libs
Linking against libdlua didn't automatically link with liblua, causing
lua plugin loading to fail.
Timo Sirainen [Tue, 29 Oct 2024 09:25:32 +0000 (11:25 +0200)]
lib: istream-concat - Fix potential hang when reaching max buffer size
Timo Sirainen [Tue, 29 Oct 2024 09:22:27 +0000 (11:22 +0200)]
imap: Fix potential hang when client sends too long line
Timo Sirainen [Tue, 29 Oct 2024 09:20:02 +0000 (11:20 +0200)]
imap: Fix potential hang when client sends too long APPEND line
Timo Sirainen [Tue, 29 Oct 2024 08:36:43 +0000 (10:36 +0200)]
imap: Fix potential hang/assert-crash when client sends too long line
If client sent some commands pipelined, followed by a command with too long
line, the previous commands' tagged replies weren't sent. This caused it to
hang until more input was received. After that it crashed.
Fixes:
Panic: file imap-client.c: line 1098 (client_check_command_hangs): assertion failed: (!have_wait_unfinished || unfinished_count > 0)
Arnt Gulbrandsen [Thu, 5 Sep 2024 06:35:13 +0000 (09:35 +0300)]
lib-smtp: Fix UTF-8 local-parts
fundawang [Sun, 27 Oct 2024 14:11:21 +0000 (22:11 +0800)]
configure: Explicitly check for icu-uc
Ensure we link against libicu-uc when it's split in v76.
Timo Sirainen [Wed, 23 Oct 2024 07:42:35 +0000 (10:42 +0300)]
lib-index: Fix potential crash after resetting index
The log's sync_offset wasn't updated after the reset if there were no other
changes. This ended up in a broken state in
mail_transaction_log_append_locked() where it thought there was garbage at
the end of the transaction log, and crashed trying to truncate it.
Markus Valentin [Wed, 2 Oct 2024 08:18:07 +0000 (10:18 +0200)]
imapc: If a shared namespace INBOX is listed as \Noselect enforce it
In specific configurations a shared namespace INBOX is listed as
\Noselect
* LIST (\HasChildren) "/" shared/user
* LIST (\HasChildren \Noselect) "/" shared/user/INBOX
This is fixed by adding this extra check.
Timo Sirainen [Thu, 17 Oct 2024 09:15:08 +0000 (12:15 +0300)]
dsync: Fix potential crash when handling mailbox renames
Fixes:
Panic: file dsync-mailbox-tree-sync.c: line 575 (node_mailbox_trees_cmp): assertion failed: (ret != 0)
Timo Sirainen [Mon, 14 Oct 2024 05:49:37 +0000 (08:49 +0300)]
lib-storage: Mailbox list rebuild - avoid opening mailbox on recovery name collision
If recovered-lost-folder-$guid already unexpectedly exists, there's no need
to open it (at this point) to try to recover its name. This didn't really harm
anything, so it mainly fixes the code logic to make sense.
Timo Sirainen [Mon, 14 Oct 2024 09:53:33 +0000 (12:53 +0300)]
imap: Fix potential hang/crash when unhibernating
This fixes two potential bugs:
a) Unhibernation is triggered by new mailbox changes. While sending these
to IMAP client, Dovecot notices that the client has disconnected. The
process will stay IDLEing for 30 minutes until it gets disconnected with
"Disconnected: Inactivity - no input for 1800 secs"
b) Unhibernation is triggered by DONE command with some further pipelined
commands. During unhibernation new mailbox changes are noticed, and
again IMAP client is found to be disconnected while sending the changes.
This causes a segfault.
Karl Fleischmann [Thu, 10 Oct 2024 14:41:25 +0000 (16:41 +0200)]
doveadm: doveadm-print-json - Prevent crash on subsequent user prints
Move closing the final json array delimiter to the deinitialization
routine instead of on flush.
Aki Tuomi [Wed, 9 Oct 2024 06:22:00 +0000 (09:22 +0300)]
lib-dcrypt: Ensure bd is not used uninitialized in store_jwk_key()
Timo Sirainen [Tue, 8 Oct 2024 08:58:22 +0000 (11:58 +0300)]
Makefile: Fix LIBDOVECOT_OPENSSL for installed dovecot-config file
Timo Sirainen [Fri, 4 Oct 2024 07:39:07 +0000 (10:39 +0300)]
lib-http, lib-smtp: unit tests - Make sure expected DNS lookup failures will fail
Use ".invalid" suffix just to be safe. More importantly, use a trailing
dot to disable search domains.
Aki Tuomi [Tue, 1 Oct 2024 09:33:32 +0000 (12:33 +0300)]
doc: Remove strict library version requirement from solr-config-9.xml
Aki Tuomi [Mon, 30 Sep 2024 05:58:53 +0000 (08:58 +0300)]
doc: Use solr.install.dir in solr-config-9.xml
Removes hardcoded path
Timo Sirainen [Tue, 1 Oct 2024 07:58:38 +0000 (10:58 +0300)]
lib: test_hash - Reduce loop counts with valgrind to save time
Timo Sirainen [Tue, 1 Oct 2024 07:57:32 +0000 (10:57 +0300)]
lib: test_hash - Add missing test_begin()/test_end()
Timo Sirainen [Tue, 1 Oct 2024 07:53:33 +0000 (10:53 +0300)]
lib: istream-multiplex tests - Reduce loop counts with valgrind to save time
Timo Sirainen [Tue, 1 Oct 2024 07:51:00 +0000 (10:51 +0300)]
lib: base64 tests - Reduce loop counts with valgrind to save time
Timo Sirainen [Tue, 1 Oct 2024 07:50:41 +0000 (10:50 +0300)]
lib: test-hash-method - Skip "large input" test with valgrind to save time
Timo Sirainen [Tue, 1 Oct 2024 07:40:24 +0000 (10:40 +0300)]
run-test-valgrind.supp: Add leak suppression for fatal_ostream_file test
The test is supposed to panic while destroying ostream, so there's no way to
prevent the leak.
Aki Tuomi [Mon, 23 Sep 2024 21:03:40 +0000 (00:03 +0300)]
auth: Fix typo in ssl_ja3_hash field name
Fixes passing ssl_ja3_hash to a blocking passdb
Broken in
70baf893e85222d071d21cdd5ead546a905d477a
Timo Sirainen [Mon, 9 Jul 2018 14:29:31 +0000 (17:29 +0300)]
lib: test-ostream-file - Make sure lack of error handling panics
Timo Sirainen [Mon, 9 Jul 2018 13:23:10 +0000 (16:23 +0300)]
lib: o_stream_close() - Don't reset error checking on automatic flush
Otherwise it will be difficult to find missing o_stream_flush() calls.
The missing error handling would be found only when the flushing fails,
which would result in assert-crash.
This is how the code was originally intended to behave. Broken by
5ec4fc44e8d4e2160f07b1a7f4fce1ccfec3f6c1
Timo Sirainen [Tue, 24 Sep 2024 06:54:52 +0000 (09:54 +0300)]
imap: Ignore error handling for side channel output
Timo Sirainen [Tue, 24 Sep 2024 06:56:49 +0000 (09:56 +0300)]
lib-index: Ignore ostream errors when cache purging is aborted due to file too large
Timo Sirainen [Tue, 21 Sep 2021 21:26:26 +0000 (00:26 +0300)]
lib-smtp: test-smtp-client-errors - Add missing ostream finish
Timo Sirainen [Mon, 9 Jul 2018 14:41:57 +0000 (17:41 +0300)]
mbox: Fix ostream error handling in mbox_move()
o_stream_nsend_send_istream() needs to be followed by o_stream_flush().
It also detects the istream error.
Timo Sirainen [Mon, 9 Sep 2024 15:46:56 +0000 (18:46 +0300)]
virtual: Fix copying storage error on mail_precache() failure
Timo Sirainen [Mon, 9 Sep 2024 15:45:59 +0000 (18:45 +0300)]
fts: Don't ignore parent mail_precache() failure
Timo Sirainen [Tue, 17 Sep 2024 09:58:57 +0000 (12:58 +0300)]
dovecot.service.in: Add time-sync.target dependency
This way Dovecot won't be started before time has been synchronized.
systemd-time-wait-sync.service also needs to be enabled.
Aki Tuomi [Mon, 16 Sep 2024 10:54:39 +0000 (13:54 +0300)]
doc: Fix cp usage to be more portable when installing html docs
Aki Tuomi [Fri, 6 Sep 2024 12:06:21 +0000 (15:06 +0300)]
lib-dcrypt: Replace safe_memset() with buffer_clear_safe() for buffers
Aki Tuomi [Fri, 6 Sep 2024 12:00:33 +0000 (15:00 +0300)]
mail-crypt: Fix detecting chacha20-poly1305 in algorithm
Aki Tuomi [Fri, 6 Sep 2024 10:13:15 +0000 (13:13 +0300)]
lib-dcrypt: iostream - Support using same cipher algorithm for key encryption
Timo Sirainen [Fri, 6 Sep 2024 10:26:20 +0000 (13:26 +0300)]
lib-oauth2: Link dcrypt-openssl directly to unit test
This fixes an issue with runtime linking:
Error: No functional dcrypt backend found - skipping some tests:
Couldn't load required plugin libdcrypt_openssl.so: dlopen() failed:
libssl_iostream_openssl.so: undefined symbol: connection_is_valid_dns_name
Timo Sirainen [Fri, 6 Sep 2024 10:23:42 +0000 (13:23 +0300)]
lib-dcrypt: Build libdcrypt_openssl_static.la
Timo Sirainen [Fri, 6 Sep 2024 10:23:18 +0000 (13:23 +0300)]
lib-dcrypt: dcrypt-private.h - Fix dependencies when including directly
Timo Sirainen [Thu, 12 Sep 2024 12:39:38 +0000 (15:39 +0300)]
lib: Avoid wrongly thinking time moved forwards for larger ioloop wait times
Timo Sirainen [Wed, 11 Sep 2024 04:15:11 +0000 (07:15 +0300)]
lib: istream-failure-at - Never set readable_fd
Otherwise o_stream_send_istream() could bypass istream-failure-at's read()
by using sendfile().
Timo Sirainen [Fri, 6 Sep 2024 10:32:30 +0000 (13:32 +0300)]
lib-program-client: test-program-client-unix - Change to NULL initialization
This makes scan-build happy.
Timo Sirainen [Fri, 6 Sep 2024 12:08:35 +0000 (15:08 +0300)]
login-common, imap-login: Add proxy_no_multiplex passdb extra field
Timo Sirainen [Fri, 6 Sep 2024 07:28:45 +0000 (10:28 +0300)]
configure: Fix LIBDOVECOT_LUA for static builds
Timo Sirainen [Fri, 6 Sep 2024 07:22:20 +0000 (10:22 +0300)]
lib-lua: Build also libdlua.la
This can be used for static linking.
Timo Sirainen [Fri, 6 Sep 2024 07:18:55 +0000 (10:18 +0300)]
global: Makefile.am - Use LIBDOVECOT* variables where possible
It behaves differently when using static linking.
Timo Sirainen [Fri, 6 Sep 2024 06:50:12 +0000 (09:50 +0300)]
lib-dict-backend: Makefile.am - Use BUILT_SOURCES instead of rm in distclean hook
Timo Sirainen [Thu, 5 Sep 2024 16:03:44 +0000 (19:03 +0300)]
dovecot-config: Add LIBDOVECOT_OPENSSL[_DEPS]
This is usable only when linking statically.
This change also removes LIBDOVECOT_SSL[_DEPS], which weren't used for anything.
Timo Sirainen [Tue, 3 Sep 2024 07:09:41 +0000 (10:09 +0300)]
stats: Change discrete modifiers to be %variables
%{value} and %{domain} variables can be used.
Timo Sirainen [Mon, 2 Sep 2024 20:44:01 +0000 (23:44 +0300)]
stats: Fix group_by discrete modifiers to actually work