]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Thu, 5 May 2022 17:17:52 +0000 (20:17 +0300)]
lib-doveadm: doveadm_client_cmd() - Don't close cmd_input after reading it
The caller may want to use cmd_input for other purposes as well.
Timo Sirainen [Thu, 5 May 2022 15:27:45 +0000 (18:27 +0300)]
lib-doveadm, doveadm: Add and use enum doveadm_protocol_cmd_flag
Timo Sirainen [Thu, 5 May 2022 12:43:48 +0000 (15:43 +0300)]
doveadm: Fail cleanly if referral host is empty
Timo Sirainen [Mon, 2 May 2022 15:12:14 +0000 (18:12 +0300)]
doveadm: Allow proxy redirects with hostnames when doing reauth
Timo Sirainen [Thu, 5 May 2022 11:13:25 +0000 (14:13 +0300)]
login-common: Allow reauth to return referral
Previously reauth was required to do proxying on success. Now it can also
return "nologin" and "host" to do a referral instead.
Timo Sirainen [Mon, 2 May 2022 14:55:56 +0000 (17:55 +0300)]
login-common: Allow proxy redirects with hostnames when doing reauth
Timo Sirainen [Mon, 2 May 2022 09:56:06 +0000 (12:56 +0300)]
login-common: Add debug logging when doing reauth
Timo Sirainen [Mon, 2 May 2022 09:55:38 +0000 (12:55 +0300)]
login-common: Send forward_* fields to reauth requests
Timo Sirainen [Mon, 2 May 2022 09:54:28 +0000 (12:54 +0300)]
login-common: Don't require "pass" field for reauth proxy requests
The pass is already known, and even if it was returned the current code
wouldn't use it.
Karl Fleischmann [Mon, 9 May 2022 12:59:21 +0000 (14:59 +0200)]
m4: Fix flex/bison check for out-of-tree builds
Karl Fleischmann [Thu, 14 Apr 2022 12:21:01 +0000 (14:21 +0200)]
global: Remove wiki from packaging
Karl Fleischmann [Thu, 14 Apr 2022 12:19:39 +0000 (14:19 +0200)]
doc/example-config: Replace wiki references with web documentation
Karl Fleischmann [Wed, 13 Apr 2022 10:24:55 +0000 (12:24 +0200)]
m4: Use documentation project in build pipeline
To replace the wiki as the main documentation in the distribution
package the documentation project needs to be pulled into this project
in a build step. This commit checks the environment (e.g. python/venv)
and downloads/builds the documentation for packaging.
Karl Fleischmann [Mon, 9 May 2022 12:00:35 +0000 (14:00 +0200)]
m4: Rename BUILD_DOCS to INSTALL_DOCS
This communicates more clearly that the docs are packaged and installed
and not merely built.
Karl Fleischmann [Mon, 11 Apr 2022 14:16:54 +0000 (16:16 +0200)]
general: Replace online wiki references
For all wiki references that have a currently available documentation
page, replace the link to them appropriately.
Aki Tuomi [Thu, 12 May 2022 09:04:03 +0000 (12:04 +0300)]
lib-master: master-service-haproxy - Correctly align memory
Previous version caused type punning warnings.
Aki Tuomi [Thu, 12 May 2022 09:20:29 +0000 (12:20 +0300)]
lib-master: master-service-haproxy - Remove unnecessary initialization
Aki Tuomi [Mon, 2 May 2022 12:56:00 +0000 (15:56 +0300)]
lib-master: Use pointer for haproxy data
Data does not need to be copied.
Fixes static analyser complaint about writing to const fields.
Karl Fleischmann [Tue, 3 May 2022 14:23:51 +0000 (16:23 +0200)]
doveadm-mail-mailbox-cache: Replace indentation spaces with tab
Karl Fleischmann [Mon, 2 May 2022 13:17:41 +0000 (15:17 +0200)]
doveadm: Distinguish error status of doveadm_mail_iter_init()
Make doveadm_mail_iter_init() return different status codes depending on
whether the mailbox exists or not to fix a crash when calling `doveadm
mailbox cache remove` with an invalid/non-existing mailbox.
Aki Tuomi [Tue, 3 May 2022 19:41:58 +0000 (22:41 +0300)]
run-test-valgrind.supp: Suppress iconv open failure with EUC-JP.so
Aki Tuomi [Mon, 2 May 2022 18:52:14 +0000 (21:52 +0300)]
lib-dict-backend: Fix crash when accessing shared dict keys with NULL username
Martti Rannanjärvi [Wed, 4 May 2022 15:20:15 +0000 (18:20 +0300)]
director: Use time_to_uint32() to cast time_t to unsigned int where needed
Martti Rannanjärvi [Wed, 4 May 2022 15:19:31 +0000 (18:19 +0300)]
director: Use ioloop_time32 when ioloop_time is used as unsigned int
Martti Rannanjärvi [Tue, 3 May 2022 11:23:39 +0000 (14:23 +0300)]
global: Use time_to_uint32_trunc() to cast time_t to uint32_t where needed
This addresses Coverity complaints.
Martti Rannanjärvi [Tue, 3 May 2022 10:13:01 +0000 (13:13 +0300)]
global: Use time_to_uint32() to cast time_t to uint32_t where needed
This addresses Coverity complaints.
Martti Rannanjärvi [Tue, 3 May 2022 09:04:48 +0000 (12:04 +0300)]
global: Use ioloop_time32 when ioloop_time is used as uint32_t
Martti Rannanjärvi [Mon, 2 May 2022 11:23:05 +0000 (14:23 +0300)]
lib: Add time_to_uint32() and time_to_uint32_trunc()
time_to_uint32() asserts the time_t value fits in uint32_t and
time_to_uint32_trunc() truncates the value.
Aki Tuomi [Tue, 3 May 2022 19:50:24 +0000 (22:50 +0300)]
fts-flatcurve: Fix unused parameter warning
Timo Sirainen [Thu, 14 Apr 2022 16:12:04 +0000 (18:12 +0200)]
master: Assume service is successful if its process has existed for 10 seconds
master code has a special check to start throttling services that are
rapidly dying and have never had any successful exits. However, this exit
check is a bit bad for services whose processes are supposed to never
exit. So if a service has a process that exists for at least 10 seconds
and has initial status notification sent, handle it the same as if the
service had already once exited successfully.
Timo Sirainen [Thu, 14 Apr 2022 15:19:19 +0000 (17:19 +0200)]
lib-master: Wait for initial status notification write to finish before continuing
Otherwise if the process dies early, master might think the service is
broken and start throttling it. This would only happen if the initial
write() failed with EAGAIN, meaning master was very busy and didn't have
time to read all the notification pipes.
Timo Sirainen [Thu, 14 Apr 2022 15:17:30 +0000 (17:17 +0200)]
lib-master: If status write() fails permanently, remove IO_WRITE handler
This prevents rapidly looping to the function in case the IO is set.
Timo Sirainen [Thu, 14 Apr 2022 15:52:53 +0000 (17:52 +0200)]
master: Add comment about services flooding status notifications
Martti Rannanjärvi [Mon, 2 May 2022 17:18:03 +0000 (20:18 +0300)]
lib-storage: mbox_read_from_line() - Check size given to mbox_from_parse() is positive
This addresses a Coverity complaint.
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