]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Wed, 22 Oct 2025 18:19:29 +0000 (21:19 +0300)]
anvil: Fix memory leak when kicking clients
Timo Sirainen [Thu, 23 Oct 2025 20:40:12 +0000 (23:40 +0300)]
lib-storage: Sync "Time moved forward by" warning message with master process
master had "by", while lib-storage didn't.
Timo Sirainen [Thu, 23 Oct 2025 20:18:17 +0000 (23:18 +0300)]
imap: Fix memory leak when using STORE with keywords on an EXAMINEd mailbox
Timo Sirainen [Thu, 23 Oct 2025 14:51:21 +0000 (17:51 +0300)]
stats: Fix memory leak when deinitializing file transport
Timo Sirainen [Thu, 23 Oct 2025 12:46:52 +0000 (15:46 +0300)]
lib-ldap: Fix memory leak at connection deinit
Timo Sirainen [Wed, 22 Oct 2025 12:33:59 +0000 (15:33 +0300)]
auth: ldap - Make sure ldap log prefix doesn't contain (null)
This could have happened with invalid ldap_uris.
Timo Sirainen [Wed, 22 Oct 2025 11:27:51 +0000 (14:27 +0300)]
lib: str_to_*() - Fix compiler warnings
Some gcc versions think endp may be uninitialized.
Timo Sirainen [Wed, 22 Oct 2025 11:38:28 +0000 (14:38 +0300)]
lib-storage: Use case-insensitive ns_prefix/INBOX only for shared namespace
For example OtherNamespace/Inbox shouldn't be converted to INBOX.
Broken by
776d3e6f408ae5c4f903c4ed9e906d84e3e741a1
Timo Sirainen [Wed, 22 Oct 2025 09:09:46 +0000 (12:09 +0300)]
lib-storage: Make sure shared INBOX mailbox is always uppercased
This fixes issues where if shared/user/INBOX was accessed without
uppercasing the INBOX, it wasn't handled consistently.
Timo Sirainen [Wed, 22 Oct 2025 08:01:48 +0000 (11:01 +0300)]
auth: Add assert to make sure NULL cache key isn't tried to be expanded
Timo Sirainen [Wed, 22 Oct 2025 08:00:56 +0000 (11:00 +0300)]
auth: Don't do cache lookup on internal passdb failure when passdb_use_cache=no
This was the only place where passdb_cache_lookup_credentials() caller didn't
already check for key=NULL.
Timo Sirainen [Tue, 21 Oct 2025 10:33:56 +0000 (13:33 +0300)]
lib: iostream-temp - Optimize writing many small writes
There was no buffering for o_stream_send*() calls after the initial
in-memory buffer size was exceeded. Each one was immediately written to
disk.
This fixes inefficiencies at least with doveadm-server HTTP responses.
Timo Sirainen [Tue, 21 Oct 2025 09:09:25 +0000 (12:09 +0300)]
lib: iostream-temp - Remove support for o_stream_seek()
It's not needed by anything, and it's just making the code more complex.
Timo Sirainen [Fri, 17 Oct 2025 10:51:13 +0000 (13:51 +0300)]
lib: iostream-temp - Remove support for o_stream_pwrite()
It's not needed by anything, and it's just making the code more complex.
Timo Sirainen [Tue, 21 Oct 2025 20:45:45 +0000 (23:45 +0300)]
lib-storage, imapc: Fix caching headers as empty values when handling partial header fetches
When imapc does FETCH BODY.PEEK[HEADER.FIELDS (a b)], the result is valid
only for headers "a" and "b". The header parsing was expecting that it was
seeing the full header, so if caching decisions had remembered that also
header "c" is wanted to be cached, it was done with an empty value.
anzz1 [Mon, 20 Oct 2025 10:45:00 +0000 (13:45 +0300)]
imap: Remove duplicate SPECIAL-USE from imap_capability setting list
This duplication wasn't actually visible in the client's CAPABILITY list.
Timo Sirainen [Thu, 16 Oct 2025 17:40:06 +0000 (20:40 +0300)]
lib-http: Handle HTTP request timeouts in separate data stack frames
Timo Sirainen [Thu, 16 Oct 2025 09:27:52 +0000 (12:27 +0300)]
master: accept() unix/inet connections before creating child process to handle it
This way if the child processes are slow to start, it won't affect how
rapidly they can be created.
Timo Sirainen [Thu, 16 Oct 2025 09:24:06 +0000 (12:24 +0300)]
lib-master: Support handling a pre-accept()ed connection from master process
Timo Sirainen [Thu, 16 Oct 2025 08:59:08 +0000 (11:59 +0300)]
lib-master: Split off master_service_connection_init_finish()
Timo Sirainen [Thu, 16 Oct 2025 09:12:03 +0000 (12:12 +0300)]
lib-master: Remove unused master_service_get_socket_name()
Timo Sirainen [Thu, 16 Oct 2025 09:09:35 +0000 (12:09 +0300)]
lib-master: Use master_service_listener.name directly
Timo Sirainen [Thu, 16 Oct 2025 09:08:29 +0000 (12:08 +0300)]
lib-master: Remove unused master_service_get_socket_type()
Timo Sirainen [Mon, 20 Oct 2025 09:30:45 +0000 (12:30 +0300)]
lib, global: Change net_accept() to return only -1 on failure
Use NET_ACCEPT_ENOCONN() to further check the errno if it's a failure that
should be logged or not. The previous way of using -1 vs -2 return value
wasn't very understandable.
Timo Sirainen [Mon, 20 Oct 2025 11:09:45 +0000 (14:09 +0300)]
util: health-check.sh - Don't leave "sleep 10" process running
Aki Tuomi [Tue, 21 Oct 2025 07:51:29 +0000 (10:51 +0300)]
lib-regex: Run unit tests
check-local section was missing in Makefile.am, so tests weren't
executed.
Forgotten from
49ae6e798310e5c4b96709db435a3714ea6468a8
Timo Sirainen [Mon, 20 Oct 2025 07:40:19 +0000 (10:40 +0300)]
lib-mail: istream-header-filter - Fix memory leak
Broken by
1f383819329d7637dc2f4a91b264af24a15f0256
Aki Tuomi [Mon, 6 Oct 2025 09:41:40 +0000 (12:41 +0300)]
lib-sql: driver-mysql - Remove wrappers for async
Aki Tuomi [Mon, 6 Oct 2025 09:40:54 +0000 (12:40 +0300)]
lib-sql: driver-sqlite - Remove wrappers for async
Aki Tuomi [Mon, 6 Oct 2025 09:39:50 +0000 (12:39 +0300)]
lib-sql: sql-api - Implement async calls for drivers that can't
Changes the behaviour of asynchronous functions to be truly asynchronous
even if the underlying driver isn't capable of doing this. Implemented
by adding immediate timeouts to call the callbacks after returning from the
synchronous function and ending up back to ioloop.
Aki Tuomi [Mon, 20 Oct 2025 09:21:24 +0000 (12:21 +0300)]
lib-sql: driver-sqlite - Use driver_sqlite_transaction_rollback() always for rolling back failures
Aki Tuomi [Mon, 20 Oct 2025 09:19:24 +0000 (12:19 +0300)]
lib-sql: driver-sqlite - Handle rollback errors correctly
Can't really claim we rolled back anything if rollback fails.
Aki Tuomi [Tue, 30 Sep 2025 12:32:12 +0000 (15:32 +0300)]
lib-sql: driver-sqlite - Stop transaction at first error
If the transaction has failed, refuse to execute any new
queries. This prevents especially situations where BEGIN failed.
Aki Tuomi [Tue, 30 Sep 2025 11:51:51 +0000 (14:51 +0300)]
lib-sql: driver-sqlite - Check access errors more carefully
Provide more useful information why database cannot be accessed,
including why it's in unexpected readonly mode.
Aki Tuomi [Tue, 30 Sep 2025 11:49:25 +0000 (14:49 +0300)]
lib-sql: driver-sqlite - Fix sqlite_journal_mode=wal setting to actually work
Forgotten in
316fdee91e4d672ec555626f620059c0748bab70
Aki Tuomi [Tue, 30 Sep 2025 11:34:55 +0000 (14:34 +0300)]
lib-sql: driver-sqlite - Automatically reconnect read-only
Simplifies cases where we just want to read the database
Aki Tuomi [Tue, 30 Sep 2025 11:30:09 +0000 (14:30 +0300)]
lib-sql: driver-sqlite - Explicitly initialize sqlite3
This allows catching initialization errors early
Aki Tuomi [Tue, 30 Sep 2025 11:19:35 +0000 (14:19 +0300)]
lib-sql: driver-sqlite - Use result.error for error storage
This allows better errors than using rc alone
Aki Tuomi [Mon, 20 Oct 2025 09:54:14 +0000 (12:54 +0300)]
lib-sql: driver-sqlite - Also consider SQLITE_PERM as access error
Aki Tuomi [Tue, 30 Sep 2025 11:14:29 +0000 (14:14 +0300)]
lib-sql: driver-sqlite - Extract message generation to driver_sqlite_result_str()
Aki Tuomi [Mon, 20 Oct 2025 07:04:28 +0000 (10:04 +0300)]
lib-sql: driver-sqlite - Include the real database connect error in event
Aki Tuomi [Mon, 20 Oct 2025 06:58:01 +0000 (09:58 +0300)]
lib-sql: driver-sqlite - Use driver_sqlite_connect_error() in driver_sqlite_result_log()
Simplifies next commit
Aki Tuomi [Thu, 9 Oct 2025 09:53:26 +0000 (12:53 +0300)]
lib-sql: driver-sqlite - Extract connection error handling to driver_sqlite_connect_error()
Aki Tuomi [Mon, 20 Oct 2025 07:26:40 +0000 (10:26 +0300)]
lib-sql: driver-sqlite - SQLITE_DONE is not an error
Aki Tuomi [Mon, 20 Oct 2025 06:42:08 +0000 (09:42 +0300)]
lib-sql: driver-sqlite - Use sqlite3_errstr()
This allows looking up error for the rc we are interested.
Aki Tuomi [Thu, 9 Oct 2025 10:15:54 +0000 (10:15 +0000)]
lib-sql: driver-sqlite - Use sqlite3_system_errno()
Aki Tuomi [Mon, 1 Sep 2025 13:27:18 +0000 (16:27 +0300)]
lib-sql: driver-sqlite - Add and use per-result errors
Aki Tuomi [Fri, 5 Sep 2025 11:22:32 +0000 (14:22 +0300)]
lib-sql: driver-sqlite - Rename db->rc to db->connect_rc
Aki Tuomi [Mon, 20 Oct 2025 07:57:00 +0000 (10:57 +0300)]
lib-sql: driver-sqlite - Use ctx->rc instead of db->rc in transactions
Aki Tuomi [Mon, 1 Sep 2025 12:55:57 +0000 (15:55 +0300)]
lib-sql: driver-sqlite - Log error if database closing fails
Aki Tuomi [Tue, 26 Aug 2025 11:35:27 +0000 (14:35 +0300)]
lib-sql: sql-api - Use i_gettimeofday() to get current time
It's more accurate
Aki Tuomi [Thu, 28 Aug 2025 08:41:21 +0000 (11:41 +0300)]
lib-sql: test-sql-sqlite - Remove redundant code
Aki Tuomi [Wed, 10 Sep 2025 06:30:13 +0000 (09:30 +0300)]
lib-sql: sql-api - Clarify that results are free'd after callback returns
Aki Tuomi [Mon, 1 Sep 2025 19:06:33 +0000 (22:06 +0300)]
lib-sql: driver-sqlite - Refactor struct sqlite_db
Timo Sirainen [Mon, 12 Feb 2024 08:58:55 +0000 (10:58 +0200)]
lib-index: Update comments about how transaction log corruption is handled
Timo Sirainen [Mon, 12 Feb 2024 08:30:34 +0000 (10:30 +0200)]
lib-index: Remove obsolete FIXMEs about upcoming sync lock removal
That is never going to happen.
Timo Sirainen [Mon, 12 Feb 2024 08:26:43 +0000 (10:26 +0200)]
lib-index: Do update log_file_tail_offset on sync if mail_transaction_log_view_next() fails
The previous change assumed that mail_transaction_log_view_next() would
return -1 on read() error. However, it's actually returning -1 to indicate
a corrupted record.
Reverts
aae93d3ea73004ba1883bbf91c9e40f613ffc857
Michael M Slusarz [Sat, 4 Oct 2025 18:04:31 +0000 (12:04 -0600)]
lib-compression: Don't calculate crc32 if using zlib in deflate mode
Edmund Lodewijks [Thu, 16 Oct 2025 16:53:00 +0000 (18:53 +0200)]
dovecot.conf.in: Update Dovecot quick configuration URL
Timo Sirainen [Wed, 15 Oct 2025 14:44:24 +0000 (17:44 +0300)]
lib-settings: Fix memory leak with settings overrides
The setting override lookups were allocating memory from wrong memory pool,
causing the process memory to keep growing.
Timo Sirainen [Wed, 15 Oct 2025 07:09:03 +0000 (10:09 +0300)]
lib-storage: Fix potential crash with SEARCH MIMEPART FILENAME ENDS
If the search value was longer than the checked filename, it accessed
memory outside the allocated buffer.
Timo Sirainen [Tue, 14 Oct 2025 15:07:36 +0000 (18:07 +0300)]
lib-storage: Reformat index-search-mime.c
Timo Sirainen [Tue, 14 Oct 2025 15:02:20 +0000 (18:02 +0300)]
lib-storage: Fix "seach" typo in function names
Timo Sirainen [Tue, 14 Oct 2025 14:59:36 +0000 (17:59 +0300)]
lib-mail: Fix potential crash with SEARCH MIMEPART FILENAME
If the message contained "Content-Disposition: attachment" without
filename or name parameter, it crashed. Fix by using empty string
as the filename so callers don't need to handle NULL separately.
Broken by
bdff009cb37eb51aa7a00e17e1b346df18f95bec
Stephan Bosch [Tue, 14 Oct 2025 21:18:26 +0000 (23:18 +0200)]
lib-test: fuzzer - Remove atexit handler
It seems to cause more issues than it solves.
Stephan Bosch [Tue, 14 Oct 2025 21:05:53 +0000 (23:05 +0200)]
lib-sasl: test-sasl-authentication - Create an ioloop
Winbind needs this to initiate some async stuff that is not part of this test,
so the ioloop is never actually run. However, in its absence a segfault crash
occurs.
Stephan Bosch [Tue, 14 Oct 2025 14:35:10 +0000 (16:35 +0200)]
lib-sasl: fuzz-sasl-authentication - Only fuzz Winbind mechanisms when compiled with --enable-local-fuzzer
Timo Sirainen [Tue, 14 Oct 2025 10:00:30 +0000 (13:00 +0300)]
fs-posix: Fix fs_copy() potentially doing unnecessary unlink()
We need to check if link() failed before checking errno.
Timo Sirainen [Tue, 14 Oct 2025 09:58:23 +0000 (12:58 +0300)]
lib-index: Avoid unsafe errno check
scan-build thinks mail_cache_file_close() could have modified errno. This
doesn't seem to actually happen, but it's safer to make sure of it.
Timo Sirainen [Tue, 14 Oct 2025 09:55:19 +0000 (12:55 +0300)]
lib-json: Avoid copying the whole json_value.content union
Mainly because this confuses scan-build, but it should be more efficient as
well.
Timo Sirainen [Tue, 14 Oct 2025 09:49:54 +0000 (12:49 +0300)]
maildir: Fix error handling if dovecot-uidlist file is unexpectedly lost
It would have failed with lseek() error.
Timo Sirainen [Tue, 14 Oct 2025 09:49:34 +0000 (12:49 +0300)]
maildir: Add assert to make sure dirfd() returns a valid fd
Timo Sirainen [Tue, 14 Oct 2025 09:40:50 +0000 (12:40 +0300)]
lib-sasl: test-sasl-authentication - Avoid scan-build dead code complaint
It wasn't really dead code, but test_assert() was marked as ATTR_NORETURN
to static analyzer builds, so it looked like that. However, we can simply
remove this check since test_assert(FALSE) causes the later
failed || test_has_failed() check to match anyway.
Timo Sirainen [Tue, 14 Oct 2025 09:38:24 +0000 (12:38 +0300)]
global: Use ATTR_NONSTRING macro
Timo Sirainen [Tue, 14 Oct 2025 09:38:08 +0000 (12:38 +0300)]
m4/dovecot.m4, lib: Add ATTR_NONSTRING macro
Timo Sirainen [Tue, 14 Oct 2025 09:37:05 +0000 (12:37 +0300)]
m4/dovecot.m4: Use -Wno-default-const-init-field-unsafe if it exists
This causes unnecessary warnings about buffer_t.
Timo Sirainen [Wed, 26 Mar 2025 10:39:49 +0000 (12:39 +0200)]
lib-storage: Change mail_attachment_detection_options default
Set it to: add-flags content-type=!application/signature. However, this
breaks mbox format so keep it empty for mbox. Also don't enable it for
imapc, since it's unlikely to be useful there and it might cause unwanted
attachment flags to be added in some imapc use cases.
Timo Sirainen [Fri, 26 Sep 2025 10:55:37 +0000 (13:55 +0300)]
lib-storage: Reduce data stack usage when finding attachment flags from mails with many MIME parts
Timo Sirainen [Sat, 23 Aug 2025 20:28:12 +0000 (23:28 +0300)]
lib-storage: mail_attachment_detection_options=add-flags - Don't try to add flags for read-only mailbox
Timo Sirainen [Wed, 3 Sep 2025 09:21:50 +0000 (12:21 +0300)]
lib-storage: index_mail_init_stream() - Add asserts to check state if stream has only header
Timo Sirainen [Wed, 3 Sep 2025 09:20:14 +0000 (12:20 +0300)]
lib-storage: Don't try to add attachment flags if stream only has message header
This could have caused wrong attachment flag to be added with imapc format,
because the body wasn't parsed. Other mailbox formats always had a message
body included in the stream.
Timo Sirainen [Wed, 3 Sep 2025 08:39:24 +0000 (11:39 +0300)]
config: Number of new config changes for 0.0.0 version is always 0
Timo Sirainen [Wed, 3 Sep 2025 08:38:32 +0000 (11:38 +0300)]
config: Assume 0.0.0 version is the latest
It's used for git builds.
Timo Sirainen [Wed, 26 Mar 2025 10:38:48 +0000 (12:38 +0200)]
config: Support changing defaults for setting_parser_info.default_settings
This requires reading dovecot_config_version before processing the default
settings.
Timo Sirainen [Wed, 26 Mar 2025 10:04:38 +0000 (12:04 +0200)]
config: Move most boolean fields in config_parser_context to flags enum
Preserve expand_values since it's used all over the place.
Timo Sirainen [Mon, 13 Oct 2025 12:59:53 +0000 (15:59 +0300)]
imap: Don't update proctitle to [unhibernating] if verbose_proctitle=no
Timo Sirainen [Mon, 13 Oct 2025 09:56:12 +0000 (12:56 +0300)]
lib-dict-backend: dict-sql - Fix error handling
Broken by
d7cc1bdc4efe4d0a2aa0e45b27ceeb793c32c8f0
Timo Sirainen [Tue, 14 Oct 2025 09:22:04 +0000 (12:22 +0300)]
dovecot-config: Add AM_CFLAGS to DOVECOT_CFLAGS
Most of the flags are now in AM_CFLAGS since
25785c90702c0d01f4abf15da546d2bc3bf8e276
Timo Sirainen [Tue, 14 Oct 2025 06:47:19 +0000 (09:47 +0300)]
m4/dovecot.m4: Export abs_dovecotdir
Timo Sirainen [Wed, 8 Oct 2025 13:04:54 +0000 (16:04 +0300)]
lib: istream - Add assert to make sure skip/pos state is valid after istream.read()
Timo Sirainen [Wed, 8 Oct 2025 13:08:13 +0000 (16:08 +0300)]
lib-storage: istream-mail - Fix restoring buffer state when istream is larger than expected
Timo Sirainen [Thu, 9 Oct 2025 11:54:39 +0000 (14:54 +0300)]
lib-mail: istream-header-filter - Add refcount to hdr_buf
If more than one snapshot referred to the hdr_buf, it would have been
double-freed. This didn't seem to happen until the following changes.
Timo Sirainen [Wed, 8 Oct 2025 13:05:40 +0000 (16:05 +0300)]
maildir: Delay removal of corrupted sizes from maildir filenames
The size removal functions were doing many distruptive things, which could
have caused crashes on various places where
maildir_mail_set_cache_corrupted() was called from. Delay the fixing to a
few safe locations.
Stephan Bosch [Mon, 13 Oct 2025 10:32:51 +0000 (12:32 +0200)]
auth: auth-sasl - Fix potential segfault in request handling
Keep reference to the request during auth_sasl_request_initial() and
auth_sasl_request_continue() to prevent the auth request object from going away
during callbacks while lib-sasl is still working with it.
Reported by Valgrind.
Stephan Bosch [Mon, 13 Oct 2025 10:04:21 +0000 (12:04 +0200)]
lib-sasl: sasl-server-mech-gssapi - Fix memory leak in get_display_name() error path
Reported by Coverity.
Stephan Bosch [Mon, 13 Oct 2025 09:58:52 +0000 (11:58 +0200)]
lib-sasl: gssapi-dummy - Make gss_display_name() output buffer content nul-terminated
This makes it a little more robust and makes Coverity happier.
Stephan Bosch [Mon, 13 Oct 2025 09:51:33 +0000 (11:51 +0200)]
lib-sasl: dsasl-client-mech-gssapi - Fix memory leak in mech_gssapi_gs1_unwrap() error path
Reported by Coverity.
Stephan Bosch [Mon, 13 Oct 2025 09:48:32 +0000 (11:48 +0200)]
lib-sasl: dsasl-client-mech-gssapi - Fix memory leak in mech_gssapi_sec_context() error path
Reported by Coverity.
Timo Sirainen [Sun, 5 Oct 2025 17:23:16 +0000 (20:23 +0300)]
lib-settings: Fix settings history when plugins have registered settings
The settings are expected to be sorted by the version number.
Timo Sirainen [Sun, 5 Oct 2025 15:49:13 +0000 (18:49 +0300)]
lib, lib-master: Move version_*() to lib/version.[ch]