]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Mon, 2 May 2022 21:27:47 +0000 (00:27 +0300)]
fts: Fix optimizing searches in virtual mailboxes without up-to-date indexes
This could have caused header searches in virtual mailboxes to not return
all results when fts_enforced!=yes
Broken by
9705b81fb51b5bdeaba12932a390ced2cc9dcad7
Marco Bettini [Mon, 2 May 2022 08:15:39 +0000 (08:15 +0000)]
fts-flatcurve: Fix for checks assuming errno faults are negative
Marco Bettini [Mon, 2 May 2022 07:53:14 +0000 (07:53 +0000)]
fts-flatcurve: fts_flatcurve_xapian_mailbox_stats() - Add i_assert() on x->db_read
Found by coverity, but it seems to be a false catch
Marco Bettini [Mon, 2 May 2022 07:13:59 +0000 (07:13 +0000)]
fts-flatcurve: fts_flatcurve_database_locate_dir() - Fix leak on readdir() faults
Marco Bettini [Fri, 29 Apr 2022 13:31:04 +0000 (13:31 +0000)]
fts-flatcurve: Fix signedness of elapsed variable
Marco Bettini [Fri, 29 Apr 2022 08:44:37 +0000 (08:44 +0000)]
fts-flatcurve: fts_flatcurve_xapian_db_populate() - Fix missing error_r value on failure
Marco Bettini [Fri, 29 Apr 2022 08:44:08 +0000 (08:44 +0000)]
fts-flatcurve: fts_backend_flatcurve_rescan_box() - Fix missing error_r value on failure
Marco Bettini [Fri, 29 Apr 2022 08:24:05 +0000 (08:24 +0000)]
fts-flatcurve: Remove unused variables
Marco Bettini [Thu, 28 Apr 2022 10:22:39 +0000 (10:22 +0000)]
fts-flatcurve: fts_flatcurve_xapian_rename_db() - Cleanup redundant stuff and make code more readable
Marco Bettini [Thu, 28 Apr 2022 10:14:21 +0000 (10:14 +0000)]
fts-flatcurve: fts_flatcurve_xapian_optimize_box_do() - Drop redundant struct flatcurve_xapian_db_path *newpath
Marco Bettini [Wed, 27 Apr 2022 09:12:31 +0000 (09:12 +0000)]
fts-flatcurve: cmd_fts_flatcurve_mailbox_run() - Fix NULL check on fuser after pointer has been already dereferenced
Found by Coverity
Marco Bettini [Mon, 2 May 2022 13:12:26 +0000 (13:12 +0000)]
lib: Fix for clang Wstrict-bool pragma failing on unpatched clang
Note that clang recognises GCC diagnostic pragmas too,
so there is no need for distinct pragmas in this case
Marco Bettini [Mon, 2 May 2022 11:14:10 +0000 (11:14 +0000)]
quota: Fix for clang -Wstrict-bool clashing with #include <rpc/rpc.h>
Marco Bettini [Mon, 2 May 2022 11:13:41 +0000 (11:13 +0000)]
m4: adding check for clang -Wstrict-bool availability
Martti Rannanjärvi [Tue, 26 Apr 2022 08:00:07 +0000 (11:00 +0300)]
lib: write-full - Assert size <= SSIZE_T_MAX
Giving such big size parameters to these functions is almost certainly a
bug, and does not need to be supported. This also fixes a Coverity
warning that such a big size parameter given to write() is suspicious.
Martti Rannanjärvi [Tue, 26 Apr 2022 07:57:17 +0000 (10:57 +0300)]
lib: read-full - Assert size <= SSIZE_T_MAX
Giving such big size parameters to these functions is almost certainly a
bug, and does not need to be supported. This also fixes a Coverity
warning that such a big size parameter given to read() is suspicious.
Aki Tuomi [Mon, 25 Apr 2022 07:43:45 +0000 (10:43 +0300)]
lib-lua: dlua-dovecot-http - Support more settings with HTTP client
Aki Tuomi [Mon, 25 Apr 2022 11:27:12 +0000 (14:27 +0300)]
lib-http: Rename max_auto_retry_delay to max_auto_retry_delay_secs
Marco Bettini [Fri, 25 Feb 2022 11:14:48 +0000 (11:14 +0000)]
configure.ac: want_flatcurve - Change to want_flatcurve=auto, accept Xapian only if version >= 1.4
Michael M Slusarz [Wed, 23 Feb 2022 16:33:44 +0000 (16:33 +0000)]
fts-flatcurve: Add doveadm plugin
Michael M Slusarz [Mon, 1 Nov 2021 07:32:50 +0000 (09:32 +0200)]
fts-flatcurve: Add xapian-based FTS plugin
Marco Bettini [Thu, 3 Mar 2022 17:20:56 +0000 (17:20 +0000)]
configure.ac: Take extra CXXFLAGS from EXTRA_CFLAGS
Marco Bettini [Fri, 4 Mar 2022 11:05:00 +0000 (11:05 +0000)]
lib: struct file_lock_settings - Swap inverted comments
Marco Bettini [Mon, 28 Mar 2022 08:42:37 +0000 (08:42 +0000)]
man: Remove fts-lucene in doveadm dump page
Aki Tuomi [Thu, 21 Apr 2022 08:51:04 +0000 (11:51 +0300)]
lib: net - Change ip to ip_r in net_addr2ip()
Coding style fix
Aki Tuomi [Thu, 21 Apr 2022 08:48:09 +0000 (11:48 +0300)]
lib: net - Set port only with known address families in sin_set_port()
Aki Tuomi [Thu, 21 Apr 2022 10:43:09 +0000 (13:43 +0300)]
lib: net - Set ip before port in net_listen_full()
sin_set_ip() sets address family which is required in sin_set_port().
In linux, sin_port and sin6_port are in same place of the sockaddr union,
so previous use did not break anything.
Aki Tuomi [Thu, 21 Apr 2022 08:45:13 +0000 (11:45 +0300)]
lib: net - Constify some pointers
Aki Tuomi [Wed, 20 Apr 2022 09:31:31 +0000 (12:31 +0300)]
lib: net - Use result from getaddrinfo() without copying
Fixes scan-build complaint.
Broken in
dd7aacc76da40b24451b40b7c0429807d0345be8
Timo Sirainen [Fri, 1 Apr 2022 14:50:27 +0000 (17:50 +0300)]
doveadm dict set/unset/inc: Add -t timestamp parameter
Timo Sirainen [Fri, 1 Apr 2022 14:43:03 +0000 (17:43 +0300)]
lib-dict, last-login: Moved no_slowness_warning into dict_op_settings
Now that we have such op-specific settings, it makes no sense having a
separate function for this.
Timo Sirainen [Fri, 1 Apr 2022 12:07:04 +0000 (15:07 +0300)]
lib-dns, lib-lua: Add initial support for using lib-dns via Lua
For now only dns_client:lookup(host) is implemented. The dns_client is
expected to be provided by the calling C code.
Timo Sirainen [Fri, 1 Apr 2022 12:06:36 +0000 (15:06 +0300)]
lib-lua: test-dict-lua - Fix error handling
Timo Sirainen [Fri, 1 Apr 2022 10:10:22 +0000 (13:10 +0300)]
lib-dns: dns_lookup*() - Assert that at least one IP is returned on success
Timo Sirainen [Fri, 1 Apr 2022 10:08:35 +0000 (13:08 +0300)]
lib: net_gethostbyname() - Assert that at least one IP is returned on success
Timo Sirainen [Tue, 19 Apr 2022 08:42:05 +0000 (11:42 +0300)]
auth: auth_worker_call() - Return void instead of the connection
The return value is no longer necessary, and it most likely would just be
used wrong.
Timo Sirainen [Tue, 19 Apr 2022 08:40:52 +0000 (11:40 +0300)]
auth: Fix crash when user iteration request is queued
auth_worker_call() returns NULL when the request couldn't be handled
immediately, which would result in NULL pointer dereference later on.
Timo Sirainen [Tue, 19 Apr 2022 08:39:35 +0000 (11:39 +0300)]
auth: Add connection parameter to auth_worker_callback_t
Timo Sirainen [Tue, 19 Apr 2022 08:31:05 +0000 (11:31 +0300)]
auth: Fix assert-crash when handling user iteration in busy auth-workers
The auth process crashed during user iteration if some auth requests were
also queued.
Broken by
f591498845fd7b5e11f1085b6e1f5e34dcc84767
Fixes:
Panic: file auth-worker-connection.c: line 128 (auth_worker_request_send): assertion failed: (worker->request == NULL)
Timo Sirainen [Thu, 14 Apr 2022 11:46:59 +0000 (13:46 +0200)]
doveadm: Fix hang when flushing a corked print-ostream
This could have happened at least with doveadm sync/backup command,
i.e. causing replication to hang until timeout is reached:
Error: write(<local>) failed: Timed out after 60 seconds
Aki Tuomi [Tue, 12 Apr 2022 09:22:17 +0000 (12:22 +0300)]
lib: macros - Remove VA_COPY handling
Should just use VA_COPY from config.h
Aki Tuomi [Tue, 12 Apr 2022 09:21:45 +0000 (12:21 +0300)]
lib: net - Remove WIN32 usage
This is not useful for anything.
Aki Tuomi [Tue, 12 Apr 2022 09:01:49 +0000 (12:01 +0300)]
lib-smtp: smtp-parser - Use net_addr2ip() to parse IPv6 addresses
Aki Tuomi [Tue, 12 Apr 2022 09:37:21 +0000 (12:37 +0300)]
lib: uri-util - Use memchr() instead of for-loop
Aki Tuomi [Tue, 12 Apr 2022 08:59:11 +0000 (11:59 +0300)]
lib: uri-util - Use net_addr2ip() to parse IPv6
Aki Tuomi [Fri, 8 Apr 2022 09:48:09 +0000 (12:48 +0300)]
lib-ssl-iostream: Use net_addr2ip() to validate IP address in address verification
Aki Tuomi [Wed, 13 Apr 2022 11:30:29 +0000 (14:30 +0300)]
lib: net - Add more tests for net_addr2ip()
Aki Tuomi [Tue, 29 Mar 2022 12:20:38 +0000 (15:20 +0300)]
lib: net - Remove is_ipv4_address() and is_ipv6_address()
Nothing is using these anymore.
Aki Tuomi [Wed, 13 Apr 2022 11:36:12 +0000 (14:36 +0300)]
config: old-set-parser - Use net_str2hostport() to check if host:port syntax was used
Aki Tuomi [Wed, 13 Apr 2022 12:01:40 +0000 (15:01 +0300)]
lib: test-net - Add more tests for net_str2hostport()
Aki Tuomi [Mon, 4 Apr 2022 09:33:13 +0000 (12:33 +0300)]
lib: test-net - Update tests for net_addr2ip() and net_ip2addr()
Aki Tuomi [Mon, 4 Apr 2022 09:33:07 +0000 (12:33 +0300)]
lib: net - Use getnameinfo() to convert addresses to string
Aki Tuomi [Tue, 29 Mar 2022 12:15:14 +0000 (15:15 +0300)]
lib: net - Use getaddrinfo() to parse addresses
This allows preserving scope id
Aki Tuomi [Tue, 29 Mar 2022 12:09:37 +0000 (15:09 +0300)]
lib: net - Add scope_id to struct ip_addr
This is needed for link-local IPv6 addresses.
Aki Tuomi [Thu, 7 Apr 2022 10:11:56 +0000 (13:11 +0300)]
lib: net - Do not accept arbitrary numbers as IPv4 addresses in net_addr2ip_inet4_fast()
Dovecot isn't currently using numbers as IPv4 addresses anywhere, so it doesn't need fast path
handling. The numbers are still accepted as IPv4 addresses by the libc code in slow path.
Aki Tuomi [Tue, 12 Apr 2022 08:43:24 +0000 (11:43 +0300)]
lib: net - Consolidate gai error handling to net_handle_gai_error()
Handles errors from getaddrinfo() and getnameinfo()
Aki Tuomi [Thu, 7 Apr 2022 06:39:42 +0000 (09:39 +0300)]
login-common: Fix crash with invalid login_trusted_networks setting
client_is_trusted() uses the event to log an error.
Broken in
95c63f3e9efdb7ba916dac3e6b013d131392c48a
Timo Sirainen [Fri, 8 Apr 2022 12:59:59 +0000 (15:59 +0300)]
lib-index: Always write tail offset the same as head offset
The mail_index_write() must not be called unless this is safe to do.
This prevents unnecessarily reading through dovecot.index.log between
tail..head offsets, which can be expensive due to modseq calculation.
Timo Sirainen [Fri, 8 Apr 2022 12:10:53 +0000 (15:10 +0300)]
lib-index: Optimize modseq scanning by using the modseq header in index
View is very commonly set to start reading new changes since dovecot.index
was last written. When reading the newer records in dovecot.index.log, the
modseq of each change is needed to be known. However, the initial modseq
calculation was usually done inefficiently by reading the whole
dovecot.index.log from the beginning of the file. This change prevents
that by using instead the "modseq" header in dovecot.index to get the
initial modseq.
Timo Sirainen [Fri, 8 Apr 2022 10:42:55 +0000 (13:42 +0300)]
lib-index: Handle 0-sized dovecot.index.log record properly
The previous behavior was to just silently ignore it and have the next write
to the transaction log silently truncate away the trailing garbage.
Now if the log file isn't locked the issue is still ignored, since it's
possible that this is just a race condition. But if the log is locked,
it's handled as corruption.
Timo Sirainen [Fri, 8 Apr 2022 11:25:47 +0000 (14:25 +0300)]
imap: SELECT - Fix unknown parameter error message
Aki Tuomi [Tue, 12 Apr 2022 17:31:03 +0000 (20:31 +0300)]
configure.ac: Remove stray DOVECOT_LIBWRAP
Forgotten in
8f0a991f41e5d94e919ef5aa0712dab972a1fa33
Karl Fleischmann [Thu, 7 Apr 2022 13:29:25 +0000 (16:29 +0300)]
doc/man: Update doveadm-sync description
Karl Fleischmann [Thu, 7 Apr 2022 13:26:47 +0000 (16:26 +0300)]
doc/man: Remove dsync manpage and all references
Karl Fleischmann [Thu, 7 Apr 2022 13:17:33 +0000 (16:17 +0300)]
doveadm: Remove obsolete dsync-operation for doveadm command
As there is no way anymore to call doveadm as dsync this behavior can be
removed fully.
Karl Fleischmann [Thu, 7 Apr 2022 13:16:45 +0000 (16:16 +0300)]
doveadm: Remove dsync symlink to doveadm
Aki Tuomi [Tue, 5 Apr 2022 11:33:48 +0000 (14:33 +0300)]
submission-proxy: Add IPV6: prefix to IPv6 addresses
This is required by the Postfix XCLIENT protocol.
Aki Tuomi [Tue, 12 Apr 2022 07:12:11 +0000 (10:12 +0300)]
lib: test-event-flatten - Use __FILE__ to get correct expected filename
Fixes out of tree buids
Broken in
4f752d381c8e19dd07d1e593996d02294668c8b6
Aki Tuomi [Fri, 8 Apr 2022 04:49:56 +0000 (07:49 +0300)]
lib-dcrypt: test-stream - Allow EPIPE too in test_read_garbage()
Timo Sirainen [Tue, 12 Apr 2022 07:19:42 +0000 (09:19 +0200)]
lib-master: Finish fixing memory leak when handling master-admin clients
Finish properly the fix in
45232487a19c724b0e15a65e79005501d684e6ad
Timo Sirainen [Thu, 7 Apr 2022 13:35:28 +0000 (16:35 +0300)]
lib-master: Fix memory leak when handling master-admin clients
Timo Sirainen [Mon, 4 Apr 2022 13:42:07 +0000 (16:42 +0300)]
doveadm: Implement CMD_FLAG_HIDDEN to actually hide doveadm commands from usage
Marco Bettini [Wed, 30 Mar 2022 15:28:24 +0000 (15:28 +0000)]
global: Use is_config_binary() where CONFIG_BINARY macro does not propagate
Not all the *-settings.c sources are embeded in the generated all-settings.c
source file, which is the only scope where the CONFIG_BINARY macro is defined.
This specifically applies to master-service-ssl-settings.c which contained
code never activated by the #ifdef(s) on the macro as this file is not part
of the synthesized code.
Marco Bettini [Wed, 30 Mar 2022 15:26:56 +0000 (15:26 +0000)]
lib-master: master_service_ssl_settings_check() - Remove old obsolete checks in dead code
Marco Bettini [Mon, 28 Mar 2022 13:48:43 +0000 (13:48 +0000)]
lib-settings: Remove stray whitespaces
Aki Tuomi [Fri, 1 Apr 2022 09:11:30 +0000 (12:11 +0300)]
quota: Only check vsize flag if quota driver succesfully initialized
Broken by
9926b729694421daeb97769a925f0f273b83b0a9
Timo Sirainen [Thu, 7 Apr 2022 07:55:26 +0000 (10:55 +0300)]
lib-master: Fix memory leak at deinit after kicking a user
Caused by
14da525deeb16d3e81b2b9cf24fc52092b33f88d
Martti Rannanjärvi [Wed, 6 Apr 2022 17:13:24 +0000 (20:13 +0300)]
lib-dcrypt: test-stream.c - Remove pointer arithmetic in test_read_garbage()
Something is wrong with the pointer arithmetic given to random_fill(),
and easiest is to remove it altogether. This fixes a valgrind complaint
on use of uninitialized value.
Karl Fleischmann [Thu, 24 Mar 2022 09:30:32 +0000 (10:30 +0100)]
config: Notify about obsolete auth_debug setting
Karl Fleischmann [Wed, 23 Mar 2022 11:04:33 +0000 (12:04 +0100)]
doveadm-auth: Consolidate auth debug logging condition
This should enable the relevant places to check for any of the
`auth_debug` setting, enabling the debug mode via -D or an appropriate
`log_debug` value in a consistent manner.
Karl Fleischmann [Tue, 15 Mar 2022 13:49:58 +0000 (14:49 +0100)]
auth: Remove extraneous debug check when calling e_debug()
Remove checks for debug setting when calling e_debug() as it is already
doing the necessary check.
Aki Tuomi [Mon, 4 Apr 2022 16:12:47 +0000 (19:12 +0300)]
lib-dcrypt: test-stream - Ensure file is v2 in test_read_garbage
Karl Fleischmann [Fri, 25 Mar 2022 13:54:02 +0000 (14:54 +0100)]
login-common: Add login_auth_socket_path setting
This setting allows to set a default socket path for login processes
without the need to define it for each one individually. It can be
overwritten by explicitly giving it via the existing methods.
Karl Fleischmann [Fri, 1 Apr 2022 08:49:10 +0000 (10:49 +0200)]
submission-login: Remove direct access of auth_debug
SMTP debugging is not related to authentication so using auth_debug has
been wrong to use in the first place.
Martti Rannanjärvi [Mon, 4 Apr 2022 16:30:11 +0000 (19:30 +0300)]
config: old-set-parser - Remove quota_vsizes
No need to warn about obsolete plugin settings.
Martti Rannanjärvi [Mon, 4 Apr 2022 16:29:15 +0000 (19:29 +0300)]
example-config: 90-quota.conf - Remove quota_vsizes
Marco Bettini [Tue, 22 Mar 2022 10:06:51 +0000 (10:06 +0000)]
lib-storage: mailbox_match_plugin_exclude() - Consider namespaces while matching
For namespaces with inbox=yes, the match with the rule will be attempted with
both the virtual mailbox names and the bare mailbox name.
Aki Tuomi [Sun, 27 Mar 2022 17:34:26 +0000 (20:34 +0300)]
mail-crypt: Use mail_user_getenv_bool() for MAIL_CRYPT_REQUIRE_ENCRYPTED_USER_KEY
Aki Tuomi [Sun, 27 Mar 2022 17:32:48 +0000 (20:32 +0300)]
mail-crypt: Replace mail_crypt_acl_secure_sharing_enabled() with mail_user_getenv_bool()
Aki Tuomi [Fri, 25 Mar 2022 08:21:05 +0000 (10:21 +0200)]
lib-master: ssl_options - Remove support for no_compression
This has been default for a while now.
Aki Tuomi [Mon, 28 Mar 2022 10:29:13 +0000 (13:29 +0300)]
dict: Support only v4 protocol
Remove all code for old dict protocol versions.
Aki Tuomi [Fri, 25 Mar 2022 07:14:35 +0000 (09:14 +0200)]
dict: Remove DICT_PROTOCOL_CMD_COMMIT_ASYNC
Nothing is using it.
Aki Tuomi [Fri, 25 Mar 2022 07:29:20 +0000 (09:29 +0200)]
tcpwrap: Remove tcpwrap support
Aki Tuomi [Fri, 25 Mar 2022 07:20:16 +0000 (09:20 +0200)]
login-common: Merge client_connected() to client_connected_finish()
Does not need to be separate anymore
Aki Tuomi [Fri, 25 Mar 2022 07:19:12 +0000 (09:19 +0200)]
login-common: Remove login_access_sockets
Aki Tuomi [Sun, 27 Mar 2022 17:21:33 +0000 (20:21 +0300)]
auth: Remove checkpassword driver
Aki Tuomi [Fri, 25 Mar 2022 08:09:57 +0000 (10:09 +0200)]
quota: count - Always count with virtual size
This code was needed because it was used by dict quota,
which is now removed.
Aki Tuomi [Fri, 25 Mar 2022 08:09:04 +0000 (10:09 +0200)]
quota: Remove plugin/quota_vsizes setting
Aki Tuomi [Fri, 25 Mar 2022 07:55:57 +0000 (09:55 +0200)]
quota: Add use_vsize variable to quota_backend
Aki Tuomi [Thu, 17 Mar 2022 07:44:03 +0000 (09:44 +0200)]
quota-clone: Add quota_clone_unset
Unsets quota information first. Needed for dict backends that do not
support upserting.