]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Stephan Bosch [Sun, 21 Jan 2018 15:06:19 +0000 (16:06 +0100)]
lib-http: client: Add "host" and "port" fields to request event.
Stephan Bosch [Sun, 21 Jan 2018 15:00:31 +0000 (16:00 +0100)]
lib-http: client: Use the new http_url_get_port*() functions.
Stephan Bosch [Sun, 21 Jan 2018 14:54:18 +0000 (15:54 +0100)]
lib-http: url: Add functions that obtain the effective port for the URL.
When no port is set for the URL, it is set to 0. These functions substitute the
applicable default.
Stephan Bosch [Sun, 21 Jan 2018 14:50:37 +0000 (15:50 +0100)]
lib-http: Create http-common.h, which contains global definitions shared by client and server.
Currently contains only the default HTTP port definitions that used to be
private to the client.
Stephan Bosch [Fri, 23 Feb 2018 20:09:42 +0000 (21:09 +0100)]
lmtp: proxy: Do not forward 421 reply (server shutdown) from backend.
This closes the LMTP connection implicitly. Instead, translate it into a 451
4.4.0 response, just like all the other connection-related failures.
Stephan Bosch [Fri, 23 Feb 2018 19:49:48 +0000 (20:49 +0100)]
lib-smtp: client: transaction: Better document the failure handling for incomplete transactions.
Stephan Bosch [Fri, 23 Feb 2018 19:43:50 +0000 (20:43 +0100)]
lib-smtp: client: transaction: Don't call the DATA callbacks upon failure until the transaction is complete.
The transaction is not complete until smtp_client_transaction_send() is called.
Stephan Bosch [Fri, 23 Feb 2018 17:21:49 +0000 (18:21 +0100)]
lib-smtp: client: transaction: Properly advance the transaction to the DATA state once the DATA command is to be sent.
Stephan Bosch [Fri, 23 Feb 2018 17:16:57 +0000 (18:16 +0100)]
lib-smtp: client: transaction: Use the correct callback for finish timeout.
Timo Sirainen [Wed, 7 Feb 2018 14:31:12 +0000 (16:31 +0200)]
global: Set extra_groups=$default_internal_group for various services
Services with user=$default_internal_user are expected to already set the
group properly. This change is adding the group for mail processes.
Timo Sirainen [Wed, 7 Feb 2018 14:00:46 +0000 (16:00 +0200)]
lib: restrict_access_by_env() - Preserve RESTRICT_SETEXTRAGROUPS if root isn't dropped
This way service { extra_groups } is preserved for the whole duration of the
process lifetime (e.g. lmtp, doveadm)
Timo Sirainen [Wed, 7 Feb 2018 11:06:06 +0000 (13:06 +0200)]
imap-hibernate: Change imap-hibernate default socket permissions to allow default_internal_group
It would be enough to allow only imap processes access to it, but it
shouldn't really harm to allow other processes access to it also.
Timo Sirainen [Wed, 7 Feb 2018 11:05:09 +0000 (13:05 +0200)]
stats: Change stats-writer default socket permissions to allow default_internal_group
It's important that all dovecot processes can send statistics to the stats
process.
Timo Sirainen [Wed, 7 Feb 2018 11:04:03 +0000 (13:04 +0200)]
dict: Change dict and dict-async default socket permissions to allow default_internal_group
Many mail processes need to talk to dict. This makes it easier to enable
dict without having to configure permissions.
Timo Sirainen [Wed, 7 Feb 2018 11:03:23 +0000 (13:03 +0200)]
master: Add default_internal_group setting, defaulting to "dovecot"
It's expected that this is the primary group of the default_internal_user.
This group will be used to provide access to sockets that are generally
required by all Dovecot processes, but aren't safe enough to be allowed
completely open access from untrusted processes.
Stephan Bosch [Thu, 15 Feb 2018 23:44:07 +0000 (00:44 +0100)]
lib-smtp: server: Remove inappropriate assert from MAIL command.
When the MAIL command is next to reply, it is possible to have RCPT commands
that are still pending.
Stephan Bosch [Sat, 17 Feb 2018 14:02:53 +0000 (15:02 +0100)]
lib-http: client: Simplified return code handling in http_client_request_send_real().
Stephan Bosch [Sat, 17 Feb 2018 13:54:47 +0000 (14:54 +0100)]
lib-http: client: Make sure output is used only when valid in http_client_request_send_real().
Stephan Bosch [Sat, 17 Feb 2018 11:03:41 +0000 (12:03 +0100)]
lib-http: client: Uncork and flush the output stream explicitly after continuing request payload.
This allows detecting any output stream errors.
Stephan Bosch [Sat, 17 Feb 2018 14:17:06 +0000 (15:17 +0100)]
lib-http: client: Hold reference to the connection while continuing request payload.
Subsequent changes may cause the connection to be destroyed while sending.
Stephan Bosch [Sat, 17 Feb 2018 11:01:47 +0000 (12:01 +0100)]
lib-http: client: Continue sending request payload in a separate function.
Stephan Bosch [Sat, 17 Feb 2018 14:08:44 +0000 (15:08 +0100)]
lib-http: client: Hold reference to the connection while sending the next request.
Subsequent changes may cause the connection to be destroyed while sending.
Stephan Bosch [Sat, 17 Feb 2018 10:32:37 +0000 (11:32 +0100)]
lib-http: client: Perform output stream error handling in one place.
Stephan Bosch [Sat, 17 Feb 2018 10:10:05 +0000 (11:10 +0100)]
lib-http: client: Make http_client_connection_lost() available outside http-client-connection.c.
Stephan Bosch [Sat, 17 Feb 2018 10:08:20 +0000 (11:08 +0100)]
lib-http: client: Handle output stream errors in a separate function.
Stephan Bosch [Sat, 17 Feb 2018 00:25:50 +0000 (01:25 +0100)]
lib-http: client: Flush and check output for errors after uncorking.
Otherwise, a disconnection event may be missed.
Stephan Bosch [Sat, 17 Feb 2018 14:37:20 +0000 (15:37 +0100)]
lib-http: server: Simplified return code handling in http_server_response_send_real().
Stephan Bosch [Sat, 17 Feb 2018 14:29:20 +0000 (15:29 +0100)]
lib-http: server: Make sure output is used only when valid in http_server_response_send_real().
This avoids the need to hold a reference to it.
Stephan Bosch [Sat, 17 Feb 2018 00:26:02 +0000 (01:26 +0100)]
lib-http: server: Perform output stream error handling in one place.
Stephan Bosch [Sat, 17 Feb 2018 13:44:49 +0000 (14:44 +0100)]
lib-http: server: Flush and check output for errors after uncorking.
Otherwise, a disconnection event may be missed.
Stephan Bosch [Sat, 17 Feb 2018 13:28:36 +0000 (14:28 +0100)]
lib-http: server: Handle output stream errors in a separate function.
Stephan Bosch [Sat, 17 Feb 2018 09:26:30 +0000 (10:26 +0100)]
lib-smtp: client: Uncork and flush the output stream explicitly after sending commands.
This allows detecting any output stream errors.
Stephan Bosch [Sat, 17 Feb 2018 00:46:15 +0000 (01:46 +0100)]
lib-smtp: client: Perform output stream error handling in one place.
Stephan Bosch [Fri, 16 Feb 2018 22:49:31 +0000 (23:49 +0100)]
lib-smtp: client: Flush and check output for errors after uncorking.
Otherwise, a disconnection event may be missed.
Stephan Bosch [Fri, 16 Feb 2018 22:40:29 +0000 (23:40 +0100)]
lib-smtp: client: Handle output stream errors in a separate function.
Stephan Bosch [Sat, 17 Feb 2018 00:46:25 +0000 (01:46 +0100)]
lib-smtp: server: Perform output stream error handling in one place.
Stephan Bosch [Sat, 17 Feb 2018 09:37:55 +0000 (10:37 +0100)]
lib-smtp: server: Remove undefined smtp_server_reply_send_more() from smtp-server-private.h.
Stephan Bosch [Fri, 16 Feb 2018 09:05:26 +0000 (10:05 +0100)]
lib-smtp: server: Flush and check output for errors after uncorking.
Otherwise, a disconnection event may be missed.
Stephan Bosch [Fri, 16 Feb 2018 09:13:35 +0000 (10:13 +0100)]
lib-smtp: server: STARTTLS command: Properly handle output stream flush error.
Stephan Bosch [Fri, 16 Feb 2018 09:11:01 +0000 (10:11 +0100)]
lib-smtp: server: Handle output stream errors in a separate function.
Stephan Bosch [Fri, 16 Feb 2018 08:34:48 +0000 (09:34 +0100)]
lib-smtp: server: Use the stream_errno to evaluate output stream errors.
Code was using global errno.
Timo Sirainen [Fri, 16 Feb 2018 12:26:11 +0000 (14:26 +0200)]
lib: Add o_stream_uncork_flush() to both uncork and flush
Timo Sirainen [Wed, 7 Feb 2018 14:48:28 +0000 (16:48 +0200)]
ipc: Change ipc socket's owner to $default_internal_user
This is mainly used by director process, which runs as
$default_internal_user. This setting change is always required for director
installations. Also the ipc process itself is already running as
$default_internal_user so this should be a rather safe change.
Timo Sirainen [Tue, 6 Mar 2018 10:14:25 +0000 (12:14 +0200)]
lib-mail: message_address_write() - don't crash with NULL address
message_address_parse() can return NULL on empty address, so writing it
should produce empty address as well. Broken by
15581297511b658a29c707c6031a258bab7bf1a5
Timo Sirainen [Sat, 6 Jan 2018 19:22:11 +0000 (21:22 +0200)]
ostream-zlib: Ignore missing finish if parent stream is ignoring errors
This fixes panic with imap_zlib plugin when client enables the IMAP COMPRESS
extension and disconnects:
Panic: file ostream-zlib.c: line 36 (o_stream_zlib_close): assertion failed: (zstream->ostream.finished || zstream->ostream.ostream.stream_errno != 0)
Timo Sirainen [Sat, 6 Jan 2018 20:11:30 +0000 (22:11 +0200)]
doveadm dump: Fix imapzlib to handle input traffic
This has been broken with newer Dovecot versions for a while now.
Aki Tuomi [Wed, 24 Jan 2018 12:48:36 +0000 (14:48 +0200)]
lib-storage: Rename .vsize.lock file to dovecot-vsize.lock
.vsize.lock can break maildir++ because it looks like a maildir folder,
so rename it to dovecot-vsize.lock.
Introduced in
9963bef6
Sergey Kitov [Thu, 7 Dec 2017 09:34:57 +0000 (11:34 +0200)]
lib: array_idx_modifiable changed not to allocate space.
Sergey Kitov [Thu, 7 Dec 2017 09:00:50 +0000 (11:00 +0200)]
global: Change calls to array_idx_modifiable to array_idx_get_space.
Only calls that require space allocation are to be changed.
Sergey Kitov [Thu, 7 Dec 2017 08:51:27 +0000 (10:51 +0200)]
lib: array_idx_get_space is defined as alias to array_idx_modifiable
Stephan Bosch [Fri, 9 Feb 2018 22:57:29 +0000 (23:57 +0100)]
lib-http: server: Recreate connection IO after streams change.
Stephan Bosch [Fri, 9 Feb 2018 22:56:55 +0000 (23:56 +0100)]
lib-http: client: Recreate connection IO after streams change.
Stephan Bosch [Fri, 9 Feb 2018 23:07:37 +0000 (00:07 +0100)]
lib-smtp: server: Recreate connection IO after streams change.
Stephan Bosch [Sat, 10 Feb 2018 09:29:44 +0000 (10:29 +0100)]
lib-http: server: Use the new connection_input_halt/resume() functions.
Stephan Bosch [Sat, 10 Feb 2018 09:27:19 +0000 (10:27 +0100)]
lib-http: client: Use the new connection_input_halt/resume() functions.
Stephan Bosch [Sat, 10 Feb 2018 09:07:28 +0000 (10:07 +0100)]
lib-smtp: server: Use the new connection_input_halt/resume() functions.
Stephan Bosch [Sat, 10 Feb 2018 09:01:20 +0000 (10:01 +0100)]
lib-smtp: client: Use the new connection_input_halt/resume() functions.
Stephan Bosch [Fri, 9 Feb 2018 16:24:28 +0000 (17:24 +0100)]
lib-ssl-iostream: ostream-openssl: Fix behavior of o_stream_flush() so that 1 is only returned when buffer is empty.
Stephan Bosch [Thu, 15 Feb 2018 14:47:48 +0000 (15:47 +0100)]
lib-ssl-iostream: ostream-openssl: Create local variable for sstream->ssl_io->plain_output in o_stream_ssl_flush().
Stephan Bosch [Sat, 10 Feb 2018 08:55:43 +0000 (09:55 +0100)]
lib: connection: Add connection_input_halt() and connection_input_resume().
These are convenience functions that remove and add conn->io respectively.
Stephan Bosch [Sat, 10 Feb 2018 08:37:32 +0000 (09:37 +0100)]
lib-smtp: client: Moved smtp_client_init_ssl_ctx() from smtp-client.h to smtp-client-private.h.
Stephan Bosch [Sat, 10 Feb 2018 09:46:45 +0000 (10:46 +0100)]
lib-http: client: Use conn->conn.ioloop rather than cctx->ioloop in connection.
This leads to somewhat simpler code, and makes having connections on different
ioloops easier in the future.
Stephan Bosch [Sat, 10 Feb 2018 09:20:18 +0000 (10:20 +0100)]
lib: connection: Record the ioloop the connection was last switched to.
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