]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Thu, 9 Aug 2018 09:38:43 +0000 (12:38 +0300)]
lib-test: Warn if test_run or test_run_named result is not used
Ensures hopefully that unit tests do not succeed when they fail
due to wrong exit code.
Aki Tuomi [Thu, 9 Aug 2018 09:44:22 +0000 (12:44 +0300)]
global: Ensure unit tests return value
Aki Tuomi [Wed, 1 Aug 2018 07:45:08 +0000 (10:45 +0300)]
lib: Remove murmurhash3
It is not used anywhere
Aki Tuomi [Wed, 1 Aug 2018 07:44:44 +0000 (10:44 +0300)]
lib: Remove bloomfilter
It is not used anywhere
Aki Tuomi [Tue, 31 Jul 2018 09:26:35 +0000 (12:26 +0300)]
lib-ssl-iostream: Remove unused DH members
These are not being used anywhere.
Aki Tuomi [Mon, 30 Jul 2018 17:26:19 +0000 (20:26 +0300)]
lib-ssl-iostream: Make DH parameters optional
Since a lot of connections use elliptic curve
Diffie-Hellman these days, make it possible to
use dovecot without providing Diffie-Hellman
parameters. This reduces setup cost as the
parameters do not need to be generated, which
can be a time consuming task.
Aki Tuomi [Wed, 1 Aug 2018 05:47:34 +0000 (08:47 +0300)]
doveconf: Do not skip over secrets when hiding them
All candidates for hiding need to be considered, otherwise
it might skip over some of them and leave them unhidden.
Timo Sirainen [Tue, 31 Jul 2018 09:40:28 +0000 (12:40 +0300)]
lib-dict-backend: Fix linking order for test-dict-sql
Michael M Slusarz [Tue, 31 Jul 2018 22:32:48 +0000 (16:32 -0600)]
config: generation of clean config should copy sensitive data
Add -P parameter to the CLI warning doveconf example
Michael M Slusarz [Tue, 31 Jul 2018 23:40:08 +0000 (17:40 -0600)]
man: Add missing commands to doveadm
Aki Tuomi [Tue, 31 Jul 2018 05:45:29 +0000 (08:45 +0300)]
lib-master: Copy ssl_curve_list setting
Otherwise it won't get used.
Broken in
30dca95419
Timo Sirainen [Tue, 24 Jul 2018 12:00:19 +0000 (15:00 +0300)]
lib-imap: Remove content_subtype==NULL checks
This can never happen after the previous commit. This also changes the
BODYSTRUCTURE output for invalid Content-Types, but since they're invalid
anyway it doesn't really matter what the output is.
Timo Sirainen [Tue, 24 Jul 2018 11:55:25 +0000 (14:55 +0300)]
lib-mail: If message_part_data.content_type is set, make sure content_subtype isn't NULL
This fixes a crash in index_mail_find_first_text_mime_part() where snippet
generation assumed that content_subtype isn't NULL.
Timo Sirainen [Wed, 25 Jul 2018 10:17:45 +0000 (13:17 +0300)]
lib-storage: Fix bodystructure parsing crash if header is parsed twice
The second parsing will recreate the parser_ctx, discarding the old parsed
message_part.data for the header. On the second parsing
save_bodystructure_header=FALSE so the message_part.data isn't filled for
the header. Later on the bodystructure parsing assumes the data is set,
and crashes.
This only happened with mail_attachment_detection_options=add-flags-on-save
and Sieve script that first accessed a non-cached header and then used the
"body" extension.
Fixes segfault and also:
Panic: file imap-bodystructure.c: line 116 (part_write_body_multipart): assertion failed: (part->data != NULL)
Timo Sirainen [Wed, 25 Jul 2018 10:17:05 +0000 (13:17 +0300)]
lib-mail: Add asserts to message_part_*() to make sure part->data isn't NULL
This makes it easier to debug the crashes than just having a segfault.
Timo Sirainen [Mon, 9 Jul 2018 08:39:59 +0000 (11:39 +0300)]
m4, quota: Support rquota using libtirpc
Timo Sirainen [Mon, 9 Jul 2018 08:33:23 +0000 (11:33 +0300)]
m4: Enable rquota only if rpc/rpc.h exists
It's been removed in glibc 2.26
Timo Sirainen [Thu, 5 Jul 2018 11:55:38 +0000 (14:55 +0300)]
director: Allow fully freeing user while waiting for IPC kick to finish
director_user_move_free() will now just free the IPC command, so this isn't
a problem anymore.
Timo Sirainen [Thu, 5 Jul 2018 11:53:02 +0000 (14:53 +0300)]
director: Fix crash when user kill times out before IPC finishes
Abort the IPC kick command when freeing kill context so the IPC callback
won't be called.
Timo Sirainen [Thu, 5 Jul 2018 11:42:30 +0000 (14:42 +0300)]
lib-master: ipc-client: Support aborting commands
Timo Sirainen [Thu, 5 Jul 2018 11:41:38 +0000 (14:41 +0300)]
lib-master: ipc-client: Cleanup - avoid extra return in the function
Simplifies the following commit.
Timo Sirainen [Thu, 5 Jul 2018 11:38:51 +0000 (14:38 +0300)]
lib-master: ipc-client: Never call callback directly from ipc_client_cmd()
This may simplify the calling code, especially after the following commit
that returns the command pointer.
Timo Sirainen [Thu, 5 Jul 2018 11:35:51 +0000 (14:35 +0300)]
lib-master: ipc-client: Split code to ipc_client_abort_commands()
Timo Sirainen [Thu, 5 Jul 2018 11:25:46 +0000 (14:25 +0300)]
lib-master: ipc-client: Use linked list of commads instead of array
Needed for the following commit that returns the command pointer.
Timo Sirainen [Thu, 5 Jul 2018 10:40:43 +0000 (13:40 +0300)]
lib-master: ipc-client: Don't call callback twice if IPC proxy sends invalid input
ipc_client_disconnect() called it once, and the second time was done with
the cmds[0] that was already removed from the array.
Timo Sirainen [Fri, 6 Jul 2018 08:22:46 +0000 (11:22 +0300)]
lib-auth: Fix reconnect timeout leak at deinit
Timo Sirainen [Fri, 6 Jul 2018 10:12:51 +0000 (13:12 +0300)]
login-proxy: Fix logging reason when kicking non-logged in connections
Use the same reason as for logged in connections.
Timo Sirainen [Fri, 6 Jul 2018 10:23:58 +0000 (13:23 +0300)]
login-proxy: Fix potential crash when kicking user with alt username
If a new alt username field was returned after other users already were
being proxied, trying to kick with the new alt username field will crash.
Stephan Bosch [Fri, 6 Jul 2018 13:07:32 +0000 (15:07 +0200)]
lib-http: client: Notify host object about submission of request before submitting the request to the queue.
This makes sure the host idle timeout is stopped before the request is submitted
and the host object's refresh function is called. If the idle timeout is still
running at that point, the refresh function will return success without
performing a lookup, which can lead to a panic.
Panic was:
Panic: file ./http-client-private.h: line 672 (http_client_host_get_ip): assertion failed: (idx < host->shared->ips_count)
Stephan Bosch [Mon, 2 Jul 2018 21:59:50 +0000 (23:59 +0200)]
lib-http: client: Reset ips count to zero before DNS lookup.
Timo Sirainen [Wed, 4 Jul 2018 09:45:39 +0000 (12:45 +0300)]
auth: Fix nonexistent passwd-file error handling
If the path uses %variables, the missing file was logged with info-level,
but it was still returning tempfail as the result. Return "user doesn't
exist" instead.
Timo Sirainen [Fri, 6 Jul 2018 08:25:07 +0000 (11:25 +0300)]
lib-ssl-iostream: Shutdown connection cleanly whenever i/ostream is destroyed
Do this while both istream and ostream still exist. Fixes crash where
openssl_iostream_destroy() attempts to flush the shutdown, but ssl_input
is NULL and it crashes.
Timo Sirainen [Fri, 6 Jul 2018 08:24:41 +0000 (11:24 +0300)]
lib-ssl-iostream: Split code to openssl_iostream_shutdown()
Josef 'Jeff' Sipek [Thu, 5 Jul 2018 14:50:32 +0000 (10:50 -0400)]
lib: mempool - Remove unnecessary check
The previous commit guarantees that we always have one of _ILP32 and _LP64
defined so we don't have to check ourselves.
Josef 'Jeff' Sipek [Thu, 5 Jul 2018 14:48:49 +0000 (10:48 -0400)]
lib: Make sure exactly one of _ILP32 and _LP64 is defined at all times
These defines are very common, but not universal. For example, clang on
illumos and FreeBSD always defines one of them, while 32-bit Ubuntu 16.04
doesn't define either.
Timo Sirainen [Mon, 21 May 2018 15:35:23 +0000 (18:35 +0300)]
lib: o_stream_send*() - Add ATTR_WARN_UNUSED_RESULT
Callers either need to check the return value or use o_stream_nsend*().
Timo Sirainen [Wed, 4 Jul 2018 08:20:15 +0000 (11:20 +0300)]
imap-urlauth: Ignore ostream errors and use o_stream_nsend*()
Timo Sirainen [Wed, 23 May 2018 11:38:05 +0000 (14:38 +0300)]
global: Replace (void)o_stream_send*() with o_stream_nsend*()
Timo Sirainen [Wed, 23 May 2018 11:36:55 +0000 (14:36 +0300)]
lib-http: http-server: Flush output after sending 500 error for aborted request
It probably doesn't make a difference, but it's a bit clearer what the
intent is.
Timo Sirainen [Mon, 21 May 2018 15:33:33 +0000 (18:33 +0300)]
global: Replace o_stream_send*() with o_stream_nsend*() where return value is ignored
Verified that in all of these places either o_stream_set_no_error_handling()
has been called or o_stream_flush/finish() is called afterwards.
Timo Sirainen [Wed, 30 May 2018 11:55:19 +0000 (14:55 +0300)]
doveadm service status: Show total number of processes created
Timo Sirainen [Wed, 4 Jul 2018 13:17:57 +0000 (16:17 +0300)]
doveadm service status: Support different number of fields returned by master
Timo Sirainen [Wed, 4 Jul 2018 13:16:36 +0000 (16:16 +0300)]
doveadm: Add doveadm_print_get_headers_count()
Returns the number of headers added to printer.
Timo Sirainen [Wed, 30 May 2018 11:54:34 +0000 (14:54 +0300)]
master: Track total number of processes created per service
Timo Sirainen [Fri, 29 Jun 2018 11:37:36 +0000 (14:37 +0300)]
director: Fix assert-crash when doveadm disconnects immediately after sending command
Any command that requires a ring sync should cause the doveadm connection to
wait until the ring is synced. However, if the disconnection happened early
enough the connection is deinitialized before the ring sync is finished.
Fixes:
Panic: file doveadm-connection.c: line 1097 (doveadm_connection_deinit): assertion failed: (conn->to_ring_sync_abort == NULL)
Timo Sirainen [Fri, 4 May 2018 16:53:27 +0000 (19:53 +0300)]
lib-mail: Change MESSAGE_ADDRESS_PARSE_FLAG_NON_STRICT_DOTS to _FLAG_STRICT_DOTS
Generally we want it to be enabled everywhere, so it's easier to just enable
it by default.
(This is kept as a separate commit from the previous one so it'll be easy to
revert this in case we actually don't want this to be the default.)
Timo Sirainen [Fri, 4 May 2018 16:49:57 +0000 (19:49 +0300)]
lib-mail: Add MESSAGE_ADDRESS_PARSE_FLAG_NON_STRICT_DOTS
This code is somewhat copy&pasted from parse_local_part() in Pigeonhole.
Timo Sirainen [Fri, 4 May 2018 16:31:26 +0000 (19:31 +0300)]
lib-mail: message_address_parse() - Change fill_missing parameter to flags
This change allows adding more flags. The API is also backwards compatible
in a way that the old FALSE/TRUE values still map to compatible 0/1 flags.
Timo Sirainen [Fri, 4 May 2018 16:21:52 +0000 (19:21 +0300)]
lib-mail: Fix rfc822_parse_dot_atom() to reject if dot isn't followed by atom
Timo Sirainen [Wed, 27 Jun 2018 14:16:24 +0000 (17:16 +0300)]
lib-storage: Initialize reset_id in index_index_copy_cache
Makes valgrind happy with clang's optimizations.
Josef 'Jeff' Sipek [Thu, 21 Jun 2018 13:45:03 +0000 (09:45 -0400)]
lib: mempool - Improve p_realloc() panic message
Most importantly, this differentiates it from the panic message that
p_malloc() prints.
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 16:24:34 +0000 (12:24 -0400)]
lib: mempool - Centralize p_free() NULL pointer check
This changes the behavior of p_free(pool, some_null_pointer) slightly.
datastack mempools:
Previously, the datastack frame id was checked regardless of whether or
not the pointer was NULL. Now, only non-NULL pointers perform this
check.
system mempools:
Previously, the process would SIGSEGV if a NULL pointer was freed in a
debug binary on a system with malloc_usable_size(). Now, no SIGSEGV
occurs.
allocfree, alloconly, and unsafe datastack:
No change in behavior.
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 15:47:26 +0000 (11:47 -0400)]
lib: mempool - Centralize p_realloc() NULL pointer check
Instead of each mempool implementation having to check the pointer passed in
for being NULL, we can check that the sizes are within the required bounds
in p_realloc().
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 15:42:28 +0000 (11:42 -0400)]
lib: mempool - Centralize p_{m,re}alloc() size checks
Instead of each mempool implementation having to check the allocation sizes
for sanity, we can check that the sizes are within the required bounds in
p_malloc() and p_realloc().
Since p_malloc() and p_realloc() are static inlines, some consumers will see
a little bit of growth in binary size, but others will be able to optimize
the check away at compile time.
Josef 'Jeff' Sipek [Fri, 22 Jun 2018 20:51:40 +0000 (16:51 -0400)]
lib: mempool - Define a global max allocation size supported by all pools
Instead of relying on each mempool implementation to define its own limits
and checks, this commit defines a generic one that's sufficient to make any
mempool present or future happy.
Josef 'Jeff' Sipek [Fri, 22 Jun 2018 21:28:24 +0000 (17:28 -0400)]
lib: mempool-allocfree: Remove unused #define
This define was never actually used.
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 15:18:32 +0000 (11:18 -0400)]
lib: mempool-datastack - Use container_of instead of casts
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 15:18:13 +0000 (11:18 -0400)]
lib: mempool-alloconly - Use container_of instead of casts
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 14:35:15 +0000 (10:35 -0400)]
lib: Rename a alloconly mempool helper function to make its scope obvious
pool_try_grow() makes it look like it is part of the mempool API, even
though it is an internal helper specific to the alloconly pool.
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 14:55:53 +0000 (10:55 -0400)]
lib: Document the unsafe datastack mempool
Josef 'Jeff' Sipek [Tue, 19 Jun 2018 20:08:40 +0000 (16:08 -0400)]
lib: Document the system mempool
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 11:50:38 +0000 (07:50 -0400)]
lib: Document datastack mempools
Josef 'Jeff' Sipek [Tue, 19 Jun 2018 19:36:43 +0000 (15:36 -0400)]
lib: Document allocfree mempools
Josef 'Jeff' Sipek [Tue, 19 Jun 2018 18:04:43 +0000 (14:04 -0400)]
lib: Document alloconly mempools
Josef 'Jeff' Sipek [Fri, 29 Jun 2018 20:17:40 +0000 (16:17 -0400)]
lib: mempool - Further reduce test code duplication
We have to use a macro because we need to pass a type as an argument.
Josef 'Jeff' Sipek [Thu, 28 Jun 2018 17:07:48 +0000 (13:07 -0400)]
lib: mempool - Reduce test code duplication
The 32 and 64 bit versions of the tests were identical.
Josef 'Jeff' Sipek [Thu, 28 Jun 2018 15:13:43 +0000 (11:13 -0400)]
lib: mempool - Generalize the test
Instead of hardcoding what appear to be arbitrary constants, use expressions
based on UINT{16,32,64}_MAX.
Timo Sirainen [Tue, 29 May 2018 21:38:45 +0000 (00:38 +0300)]
man: doveadm-search-query.7 - Add sequence-set and update UID
Paul Howarth [Mon, 2 Jul 2018 10:52:14 +0000 (11:52 +0100)]
lib-compression: Fix assert-crash in test suite on 32bit systems
Fix compilation warnings in test-compression.c due to mismatches
between size_t and uoff_t, which then manifests in assert-crashes
running the test suite on 32bit systems.
Stephan Bosch [Fri, 29 Jun 2018 10:52:28 +0000 (12:52 +0200)]
lib-http: request-parser: Do not require Host header for HTTP/1.0 requests.
Stephan Bosch [Mon, 2 Jul 2018 18:19:34 +0000 (20:19 +0200)]
lib-http: server: Properly handle empty Host header by providing a default authority.
This behavior is required by the RFC.
Stephan Bosch [Mon, 2 Jul 2018 18:17:51 +0000 (20:17 +0200)]
lib-http: request-parser: Add support for empty Host header (default base url).
Stephan Bosch [Mon, 2 Jul 2018 18:14:19 +0000 (20:14 +0200)]
lib-http: url: Add support for default base url to request target parsing.
Stephan Bosch [Fri, 29 Jun 2018 16:40:29 +0000 (18:40 +0200)]
lib-http: request-parser: Allocate parser on alloconly pool.
Stephan Bosch [Fri, 29 Jun 2018 13:19:27 +0000 (15:19 +0200)]
lib-http: server: Record ip:port in connection object for later use.
Timo Sirainen [Sun, 1 Jul 2018 09:58:05 +0000 (12:58 +0300)]
lib: i_close_fd_path() - Replace assert with more descriptive panic
Since this function can be called from so many places, it's easier to figure
out the bug if the panic message contains what called it.
Josef 'Jeff' Sipek [Sat, 30 Jun 2018 14:13:10 +0000 (10:13 -0400)]
global: Start relying on event_set_forced_debug(e, FALSE) being a no-op
Converted using the following semantic patch:
@@
expression event;
expression cond;
@@
- if (cond) {
- event_set_forced_debug(event,
(
- TRUE
|
- cond
)
- );
- }
+ event_set_forced_debug(event, cond);
Josef 'Jeff' Sipek [Sat, 30 Jun 2018 14:08:27 +0000 (10:08 -0400)]
lib: Change event_set_forced_debug(e, FALSE) to be a no-op
Josef 'Jeff' Sipek [Sat, 30 Jun 2018 14:06:04 +0000 (10:06 -0400)]
lib: Add event_unset_forced_debug()
Timo Sirainen [Wed, 27 Jun 2018 15:28:23 +0000 (18:28 +0300)]
lda: Deinitialize cleanly if user doesn't exist in userdb
Timo Sirainen [Wed, 27 Jun 2018 15:24:06 +0000 (18:24 +0300)]
lda: Deinitialize cleanly if mail delivery fails
Timo Sirainen [Wed, 27 Jun 2018 15:22:01 +0000 (18:22 +0300)]
lda: Cleanup - move code to lda_deliver() function
No functional changes.
Timo Sirainen [Wed, 27 Jun 2018 15:17:23 +0000 (18:17 +0300)]
lda: Cleanup - reorder code
Makes the next commit cleaner.
Aki Tuomi [Thu, 24 May 2018 12:48:58 +0000 (12:48 +0000)]
acl: Fix return value of acl_attribute_get_acl
If matching acl entry is not found, it must return 0
and not 1 because it did not find anything.
Fixes dsync: Panic: file mailbox-attribute.c: line 362 (mailbox_attribute_get_stream): assertion failed: (value_r->value != NULL || value_r->value_stream != NULL)
Broken in
37c72fa0cd3f1d74d79b64afb3fb6da5ffd4fe3a
Found by @dl8bh
Timo Sirainen [Thu, 28 Jun 2018 08:51:22 +0000 (11:51 +0300)]
dict-file: If write failed, file was left locked
Timo Sirainen [Thu, 28 Jun 2018 08:50:36 +0000 (11:50 +0300)]
dict-file: Fix memory leak when file is recreated during lock wait
Timo Sirainen [Wed, 13 Jun 2018 14:26:57 +0000 (17:26 +0300)]
lib: Assert-crash if duplicate event categories are tried to be registered
Stephan Bosch [Thu, 31 May 2018 21:59:50 +0000 (23:59 +0200)]
lib: str-sanitize: Use uni_utf8_data_truncate().
Stephan Bosch [Thu, 31 May 2018 22:02:53 +0000 (00:02 +0200)]
lib: Add str_truncate_utf8().
It works similar to str_truncate(), but it makes sure the truncated string
remains valid UTF-8.
Stephan Bosch [Thu, 31 May 2018 22:02:16 +0000 (00:02 +0200)]
lib: unichar: Add uni_utf8_data_truncate().
Returns the size of the data when truncated to be less than or equal to
a specified size, making sure UTF-8 character boundaries are respected.
Martti Rannanjärvi [Wed, 27 Jun 2018 21:34:14 +0000 (00:34 +0300)]
indexer: Don't log error when getting path to nonexistent mailbox fails
Martti Rannanjärvi [Wed, 27 Jun 2018 21:05:26 +0000 (00:05 +0300)]
indexer: Don't log mailbox was deleted under us error
Martti Rannanjärvi [Wed, 27 Jun 2018 20:58:11 +0000 (23:58 +0300)]
indexer: Don't log error when mailbox was not found
Martti Rannanjärvi [Wed, 27 Jun 2018 14:19:38 +0000 (17:19 +0300)]
fts-solr: Properly URL encode quotes for empty string
Invalid URL encoding of empty string made Solr server give 400 Bad
Request HTTP responses for searches like SEARCH HEADER FROM "".
Martti Rannanjärvi [Wed, 27 Jun 2018 14:27:15 +0000 (17:27 +0300)]
fts-solr: Fix default_ns parameter parsing
This version makes it possible to specify a value to the setting as
well.
Martti Rannanjärvi [Tue, 26 Jun 2018 09:38:50 +0000 (12:38 +0300)]
fts-solr: Append '/' to URL path when missing in configuration
This fixes a crash when url parameter has empty path like
http://localhost:8080 instead of http://localhost:8080/ and makes using
url like http://localhost:8080/solr behave the same as
http://localhost:8080/solr/
Timo Sirainen [Thu, 28 Jun 2018 09:23:00 +0000 (12:23 +0300)]
lib-master: Fix reading settings when local_name has multiple names
Only the last name was matching. For example with local_name "one two
three" { ... } only "three" matched.
Martti Rannanjärvi [Thu, 28 Jun 2018 11:36:51 +0000 (14:36 +0300)]
fts-solr: Remove obsolete break-imap-search setting
Timo Sirainen [Tue, 26 Jun 2018 20:50:03 +0000 (23:50 +0300)]
auth: Fix LDAP user iteration to not access already freed memory
db_ldap_request_free() was called on already freed request. Changed to use
auth_request's pool to fix this, since the request is correctly referenced.
Timo Sirainen [Tue, 26 Jun 2018 19:33:33 +0000 (22:33 +0300)]
quota-clone: Fix assert-crash at deinit if quota_clone update fails
The timeout isn't removed on failure, so it crashed with:
Panic: file quota-clone-plugin.c: line 257 (quota_clone_mail_user_deinit_pre): assertion failed: (quser->to_quota_flush == NULL)