]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Stephan Bosch [Sat, 10 Feb 2018 09:53:00 +0000 (10:53 +0100)]
lib-http: client: Move connection to shared context's ioloop, rather than the current_ioloop.
This is an omission.
Stephan Bosch [Mon, 29 Jan 2018 18:10:38 +0000 (19:10 +0100)]
doveadm: dsync: Switch ioloop for input/output streams while making TCP connection.
This task is performed in a sub-ioloop, and when returning from that ioloop, the
output stream would sometimes still have an object on the sub-ioloop that was
just destroyed.
Stephan Bosch [Mon, 29 Jan 2018 17:28:25 +0000 (18:28 +0100)]
lib-ssl-iostream: openssl: Make verbose logging robust against i_debug() writing to stream itself.
In dsync, i_debug() is overridden to write to the SSL stream itself through a
multiplexed data stream. So, during the i_debug() call all kinds of things can
happen to the persisted error string in the stream, which caused problems.
Stephan Bosch [Tue, 16 Jan 2018 01:02:11 +0000 (02:02 +0100)]
lib-http: client: Make sure all ioloop objects are created on the ioloop that the client/context is switched to.
Stephan Bosch [Tue, 16 Jan 2018 23:37:37 +0000 (00:37 +0100)]
lib-dns: Allow setting the ioloop that the dns_lookup/dns_client is started on.
Stephan Bosch [Wed, 17 Jan 2018 01:50:05 +0000 (02:50 +0100)]
lib: connection: Allow switching to a specific ioloop.
Stephan Bosch [Wed, 17 Jan 2018 01:49:44 +0000 (02:49 +0100)]
lib: ostream: Allow switching to a specific ioloop.
Stephan Bosch [Wed, 17 Jan 2018 01:48:43 +0000 (02:48 +0100)]
lib: istream: Allow switching to a specific ioloop.
Stephan Bosch [Wed, 24 Jan 2018 22:02:03 +0000 (23:02 +0100)]
lib: iostream: Record the ioloop that the iostream was last switched to.
Stephan Bosch [Tue, 16 Jan 2018 18:37:46 +0000 (19:37 +0100)]
lib: ioloop: Add functions for adding/moving timeouts and ios to a specific ioloop.
Stephan Bosch [Wed, 3 Jan 2018 01:11:19 +0000 (02:11 +0100)]
lib-http: test-http-client: Free the ssl_iostream_context cache.
Stephan Bosch [Fri, 29 Dec 2017 02:19:34 +0000 (03:19 +0100)]
lib-http: test-http-payload: Added test with clients using shared global context.
Stephan Bosch [Fri, 29 Dec 2017 00:17:15 +0000 (01:17 +0100)]
lib-http: client: Implicitly switch ioloop for global shared client context.
If the new ioloop is NULL, close the shared client context. In that case all
shared hosts, peers and idle connetions are closed and destroyed. The context
just remains as a container for settings and shared context. This is only
allowed when there are no clients left.
Stephan Bosch [Fri, 29 Dec 2017 01:15:06 +0000 (02:15 +0100)]
lib-http: client: Use merged DNS settings from all clients connected to a shared context for DNS lookups.
Stephan Bosch [Fri, 29 Dec 2017 00:47:16 +0000 (01:47 +0100)]
lib-http: client: Base forcing shared context debug logging on the settings of the context itself and each associated client.
Stephan Bosch [Thu, 28 Dec 2017 23:48:32 +0000 (00:48 +0100)]
lib-http: client: Register client objects in the associated client shared context.
Stephan Bosch [Thu, 28 Dec 2017 23:30:27 +0000 (00:30 +0100)]
lib-http: client: Call switching ioloop for shared peer from shared client context.
Before, it was called from the client peer.
Stephan Bosch [Fri, 29 Dec 2017 00:05:21 +0000 (01:05 +0100)]
lib-http: client: Set req->client to NULL once the request is destroyed.
The http_client_request_destroy() function does not free the request
immediately, as long as it is still referenced. It can still be referenced by a
connection that has sent it and is waiting for a reply (payload). In the mean
time the actual client can be gone, so we want to make sure nothing is pointing
to that anymore.
This change adds a few extra assertions to make sure nothing tries to use a
NULL client later on. Some direct references to req->client are replaced with a
local client variable if there is one.
Stephan Bosch [Thu, 28 Dec 2017 23:21:01 +0000 (00:21 +0100)]
lib-http: client: Merge socket buffer size settings with settings from shared context.
While using the default global context, per-client socket buffer size settings were ignored.
Stephan Bosch [Thu, 28 Dec 2017 23:16:30 +0000 (00:16 +0100)]
lib-http: client: Merge max_idle_time_msecs setting with setting from shared context.
While using the default global context, per-client max_idle_time_msecs setting was ignored.
Aki Tuomi [Fri, 29 Dec 2017 14:19:53 +0000 (16:19 +0200)]
doveadm: Unref header search context after use
Fixes memory leak, found by valgrind
Aki Tuomi [Thu, 8 Feb 2018 13:34:53 +0000 (15:34 +0200)]
config: Fix ssl_params.dat conversion warning
The command is dhparam, not dh.
Timo Sirainen [Fri, 22 Dec 2017 16:58:11 +0000 (18:58 +0200)]
global: Call rfc822_parser_deinit() wherever possible
Timo Sirainen [Tue, 9 Jan 2018 16:33:59 +0000 (11:33 -0500)]
lib-mail: Refactor code to make the next commit smaller
Timo Sirainen [Fri, 22 Dec 2017 16:56:53 +0000 (18:56 +0200)]
lib-mail: Add rfc822_parser_deinit()
It's not a strict requirement to call this, but it assert-crashes if the
state isn't valid.
Timo Sirainen [Fri, 22 Dec 2017 16:42:53 +0000 (18:42 +0200)]
lib-mail: Make sure parsers don't accidentally go much beyond end pointer
Timo Sirainen [Fri, 22 Dec 2017 16:36:55 +0000 (18:36 +0200)]
lib-mail: Fix out-of-bounds read when parsing an invalid email address
The included unit test doesn't fail, but running it with valgrind shows
"Invalid read of size 1" error.
Broken in
d6737a17a27402e7a262f7ba8a2ed588d576f23c
Discovered by Aleksandar Nikolic of Cisco Talos
Timo Sirainen [Fri, 22 Dec 2017 16:36:09 +0000 (18:36 +0200)]
lib-mail: test-message-address - Add TEST_MESSAGE_ADDRESS_FLAG_SKIP_LIST flag
This commit just adds the flag and sets it to 0 for all existing tests.
Timo Sirainen [Fri, 22 Dec 2017 16:31:52 +0000 (18:31 +0200)]
lib-mail: rfc822-parser - Add asserts to make sure parser state is correct
Aki Tuomi [Mon, 19 Feb 2018 12:19:08 +0000 (14:19 +0200)]
lib-dns: Move before lib-master
Aki Tuomi [Mon, 26 Feb 2018 10:53:19 +0000 (12:53 +0200)]
lib-master: Fix dns_match_wildcard result value check
It returns 0, not TRUE.
Aki Tuomi [Fri, 23 Feb 2018 13:31:11 +0000 (15:31 +0200)]
lib-master: Check local_name only if both filter and input have it
Broken in
cedc777a1acf830af4cf0b6e9b0f343c81e20adc
Aki Tuomi [Thu, 30 Nov 2017 18:52:11 +0000 (20:52 +0200)]
login-common: Enable config filtering by local name
Prevents servername misuse.
Aki Tuomi [Thu, 30 Nov 2017 13:47:25 +0000 (15:47 +0200)]
lib-master: Support validating config filters against requests
Validation will sanitize the input request and drop any fields
that have no filter in config. E.g. if you have a local block
with name, and nothing else, then lip/rip will be dropped
from the request.
Aki Tuomi [Thu, 30 Nov 2017 13:46:52 +0000 (15:46 +0200)]
config: Add command to request all filters
Aki Tuomi [Thu, 30 Nov 2017 13:46:40 +0000 (15:46 +0200)]
config: Add config_filter_get_all
Returns all filters
Martti Rannanjärvi [Mon, 5 Mar 2018 12:55:04 +0000 (14:55 +0200)]
charset-alias: Don't return value from void functions
Stephan Bosch [Wed, 14 Feb 2018 00:30:14 +0000 (01:30 +0100)]
lib-smtp: server: Fix reporting of XCLIENT capability in EHLO response.
The trusted connection check logic was inverted.
Stephan Bosch [Wed, 14 Feb 2018 21:20:20 +0000 (22:20 +0100)]
lib-smtp: server: Fix segfault occurring when XCLIENT command is handled.
Occurs only when the application (in this case LMTP) has a
conn_proxy_data_updated() callback. The context parameter was the struct
smtp_server_connection object itself, rather than the application context. This
caused the connection object to be overwritten.
Stephan Bosch [Tue, 13 Feb 2018 19:42:30 +0000 (20:42 +0100)]
lib-smtp: server: Fix segfault occurring during XCLIENT when no extension fields are configured.
Stephan Bosch [Tue, 13 Feb 2018 20:19:18 +0000 (21:19 +0100)]
lib-imap-storage: imap-msgpart-url: Perform the check for a proper messagepart URL in imap_msgpart_url_create().
Before, this was an assert in imap_msgpart_url_create(). The actual check was
performed only in imap_msgpart_url_parse(), meaning that
imap_msgpart_url_create() would fail with an assertion when provided with an
inappropriate URL.
This surfaced as a problem for the submission BURL command.
Aki Tuomi [Sun, 25 Feb 2018 07:35:43 +0000 (09:35 +0200)]
m4: Use -U and -D in cc_fortify
Not just -D. This is to test the same thing
that gets used.
Aki Tuomi [Sun, 25 Feb 2018 07:35:19 +0000 (09:35 +0200)]
m4: Remove pthread from tests
Timo Sirainen [Thu, 8 Feb 2018 15:19:24 +0000 (17:19 +0200)]
replication: Don't trigger replication on changes not visible to dsync
For example if there's a write to .cache file, it doesn't require
replication.
Timo Sirainen [Thu, 8 Feb 2018 15:17:59 +0000 (17:17 +0200)]
lib-storage: Replace mail_transaction_commit_changes.changed with changes_mask
This allows better finding out what changed in the transaction.
Timo Sirainen [Thu, 8 Feb 2018 15:14:53 +0000 (17:14 +0200)]
lib-storage: Include mail-index.h from mail-storage.h
This makes it a bit more acceptable to use mail-index.h API, without having
to go through the lib-storage layer. This is also needed by the next patch
to avoid duplicating the same enum in both lib-index and lib-storage layer.
Timo Sirainen [Thu, 8 Feb 2018 15:00:38 +0000 (17:00 +0200)]
lib-storage: Remove mailbox_transaction_context.nontransactional_changes
Nothing cares about them. It was only set for POP3 UIDL change with
Maildir. In theory dsync replication would want to replicate such a change,
but it doesn't actually support changing UIDLs for existing mails. Other
mailbox formats don't support it anyway.
Timo Sirainen [Thu, 8 Feb 2018 14:53:15 +0000 (16:53 +0200)]
lib-index: Add mail_index_transaction_commit_result.changes_mask
This can be used to determine what type of changes were committed in a
transaction.
Timo Sirainen [Thu, 8 Feb 2018 14:50:58 +0000 (16:50 +0200)]
lib-index: Cleanup - return bool in log_append_keyword_updates()
Simplifies the next commit.
Stephan Bosch [Sat, 13 Jan 2018 10:53:43 +0000 (11:53 +0100)]
lmtp: local: Don't deliver more than once to the same recipient.
Duplicate RCPT TO commands for local recipients are now mostly ignored,
by repeating the reply for the first instance of that RCPT TO command.
Stephan Bosch [Sat, 13 Jan 2018 12:34:47 +0000 (13:34 +0100)]
lmtp: Add recipient type to struct lmtp_recipient.
Stephan Bosch [Sat, 13 Jan 2018 12:25:01 +0000 (13:25 +0100)]
lmtp: Move common recipient handling code to separate file.
Stephan Bosch [Sat, 13 Jan 2018 12:10:53 +0000 (13:10 +0100)]
lib-smtp: server: Use smtp_server_reply_submit_duplicate() in smtp_server_reply_allv().
This is more efficient, since it doesn't need to compose new content for each
reply.
Stephan Bosch [Sat, 13 Jan 2018 12:08:53 +0000 (13:08 +0100)]
lib-smtp: server: Add function that allows submitting duplicate replies.
The smtp_server_reply_submit_duplicate() function submits a new reply at the
specified index with content duplicated from an existing earlier reply.
Stephan Bosch [Sat, 13 Jan 2018 12:03:48 +0000 (13:03 +0100)]
lib-smtp: server: Move allocation of command replies to a separate function.
Stephan Bosch [Sat, 13 Jan 2018 11:43:08 +0000 (12:43 +0100)]
lib-smtp: server: Put reply content in a separate struct.
This allows duplicate replies to share content for a multi-reply command.
Stephan Bosch [Sat, 13 Jan 2018 11:56:59 +0000 (12:56 +0100)]
lib-smtp: server: Allow part of the replies to be already sent in smtp_server_reply_allv().
This is not something observed to happen in existing code, but it is best to
deal with this properly, as it could happen in the future.
Stephan Bosch [Sat, 13 Jan 2018 11:26:57 +0000 (12:26 +0100)]
lib-smtp: server: transaction: Add function that finds duplicate recipients.
Duplicate means that both the path and parameters are equal.
Stephan Bosch [Sat, 13 Jan 2018 11:20:34 +0000 (12:20 +0100)]
lib-smtp: server: Add RCPT parameters directly in smtp_server_transaction_add_rcpt().
This makes more sense. Before, these were added to the recipient in
smtp-server-cmd-rcpt.c, after the recipient was added.
Stephan Bosch [Sat, 13 Jan 2018 10:52:31 +0000 (11:52 +0100)]
lib-smtp: params: Add function that allows checking whether RCPT parameters are equal.
Stephan Bosch [Sat, 13 Jan 2018 11:07:46 +0000 (12:07 +0100)]
lib-smtp: params: Add functions to evaluate any extra (non-standard) MAIL and RCPT parameters.
These allow looking up the parameter based on its name.
Stephan Bosch [Sat, 13 Jan 2018 10:51:24 +0000 (11:51 +0100)]
lib-smtp: address: Consistently allow address values to be NULL.
If the address pointer is NULL or the localpart field is NULL or empty, it
signifies that it is the NULL address "<>".
In the case of smtp_address_equals(), this also likely fixes crashes at places
where it may be used to compare "<>".
Stephan Bosch [Sat, 13 Jan 2018 10:59:54 +0000 (11:59 +0100)]
lib-smtp: address: Rename 'poo' to 'pool' in declaration of smtp_address_detail_parse().
Martti Rannanjärvi [Thu, 14 Dec 2017 09:44:52 +0000 (11:44 +0200)]
quota: Warn when quota check is blocked by background quota calculation
This was previously double logged as "Quota transaction has failed
earlier" error.
Martti Rannanjärvi [Wed, 10 Jan 2018 13:45:51 +0000 (15:45 +0200)]
quota: Remove "Failed to set quota transaction limits" error
This error adds nothing that helps the user to debug a problem.
Martti Rannanjärvi [Thu, 14 Dec 2017 10:47:00 +0000 (12:47 +0200)]
quota-count: Remove extra "quota-count failed:" from error_r
Timo Sirainen [Wed, 28 Feb 2018 13:09:02 +0000 (15:09 +0200)]
example-config: Add mail_attachment_detection_options
Timo Sirainen [Fri, 16 Feb 2018 14:03:46 +0000 (16:03 +0200)]
doveadm sync/backup: Don't override BROKENCHAR if it's already set
This allows migrating invalid mailbox names by specifying BROKENCHAR.
Previously it would always try to use \003 control character, which isn't
valid character in mailbox names so the mailbox creation would fail.
Aki Tuomi [Mon, 26 Feb 2018 16:20:30 +0000 (18:20 +0200)]
notify: Ignore flag and keywords update during saving
They are part of the saving event
Timo Sirainen [Thu, 11 Jan 2018 18:38:14 +0000 (13:38 -0500)]
*-login: Fix clients linked list corruption with SSL connections
This could have resulted in infinite loops or some of the clients being
skipped for some operations.
Aki Tuomi [Tue, 23 Jan 2018 08:51:26 +0000 (10:51 +0200)]
push-notification: PUSH_NOTIFICATION_USER_CONTEXT is now required
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:49:40 +0000 (10:49 +0200)]
fts-lucene: Add and use FTS_LUCENE_USER_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:47:49 +0000 (10:47 +0200)]
welcome: WELCOME_CONTEXT is now required
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:46:30 +0000 (10:46 +0200)]
expire: DOVEADM_EXPIRE_MAIL_CMD_CONTEXT is now required
Satisfied static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:44:02 +0000 (10:44 +0200)]
virtual: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:41:35 +0000 (10:41 +0200)]
quota: Add and use QUOTA_USER_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:40:23 +0000 (10:40 +0200)]
imap-zlib: Context is now required
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 08:39:30 +0000 (10:39 +0200)]
lazy-expunge: Fix context checking
Was not done properly in
462a3d92adcde4bfa9a575875bd8ae740b89ce9e
Aki Tuomi [Mon, 22 Jan 2018 12:04:47 +0000 (14:04 +0200)]
mail-crypt: Add and use MAIL_CRYPT_USER_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 12:02:39 +0000 (14:02 +0200)]
fts-solr: Add and use FTS_SOLR_USER_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Tue, 23 Jan 2018 09:37:41 +0000 (11:37 +0200)]
acl: Fix ACL_CONTEXT check
Was incorrect in
3131b3878de3245db7552234e66d437e8fde9351
Aki Tuomi [Tue, 23 Jan 2018 08:38:41 +0000 (10:38 +0200)]
acl: Add and use ACL_USER_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 12:00:37 +0000 (14:00 +0200)]
acl: Add and use ACL_LIST_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 11:57:12 +0000 (13:57 +0200)]
lib-storage: imapc - Ensure search ctx is not NULL
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 11:54:58 +0000 (13:54 +0200)]
lib-storage: Add and use MAIL_STORAGE_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 11:52:37 +0000 (13:52 +0200)]
lib-storage: Add and use MAIL_THREAD_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 11:50:37 +0000 (13:50 +0200)]
lib-index: Add and use CACHE_TRANS_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Mon, 22 Jan 2018 07:38:26 +0000 (09:38 +0200)]
lib-storage: Add and use INDEX_LIST_CONTEXT_REQUIRE
Satisfies static analyzers
Aki Tuomi [Sat, 20 Jan 2018 18:42:02 +0000 (20:42 +0200)]
mail-log: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Fri, 19 Jan 2018 08:27:09 +0000 (10:27 +0200)]
old-stats-plugin: Fix context requirements
Fixes Panic: Module context stats_storage_module missing
Broken by
6afdf0b6fce26c5492d5e56f6f16fb8a4d869566
Aki Tuomi [Thu, 18 Jan 2018 13:29:42 +0000 (15:29 +0200)]
pop3-migration-plugin: Fix context requirements
Fixes Panic: Module context pop3_migration_storage_module missing
Broken by
a8703ce24540b7efaa51a8c7d3c72e72727f9789
Aki Tuomi [Wed, 17 Jan 2018 10:15:16 +0000 (12:15 +0200)]
last-login: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 10:14:22 +0000 (12:14 +0200)]
mail-crypt: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 08:28:48 +0000 (10:28 +0200)]
old-stats: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 08:23:05 +0000 (10:23 +0200)]
quota-clone: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 08:21:52 +0000 (10:21 +0200)]
zlib: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 08:10:41 +0000 (10:10 +0200)]
mailbox-alias: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 08:07:37 +0000 (10:07 +0200)]
mail-filter: Contexts are now required or checked
Satisfies static analyzers
Aki Tuomi [Wed, 17 Jan 2018 08:06:25 +0000 (10:06 +0200)]
notify: Contexts are now required or checked
Satisfied static analyzers
Aki Tuomi [Wed, 17 Jan 2018 07:31:44 +0000 (09:31 +0200)]
pop3-migration: Contexts are now required or checked
Satisfies static analyzers