]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Stephan Bosch [Sun, 29 May 2016 17:39:13 +0000 (19:39 +0200)]
lib-imap: imap-parser: Renamed error field to error_msg.
Timo Sirainen [Fri, 27 May 2016 18:55:56 +0000 (21:55 +0300)]
dbox: Revert cache changes if some save/copy fails but transaction is committed.
Timo Sirainen [Fri, 27 May 2016 18:34:26 +0000 (21:34 +0300)]
lazy-expunge: Don't fail expunge if mail was already expunged.
Timo Sirainen [Fri, 27 May 2016 18:32:23 +0000 (21:32 +0300)]
lazy-expunge: Fixed error logging.
Timo Sirainen [Fri, 27 May 2016 15:30:01 +0000 (18:30 +0300)]
dsync: Debug logging improvement.
Timo Sirainen [Fri, 27 May 2016 11:38:17 +0000 (14:38 +0300)]
lib-fs: Fix to previous fs-metawrap commit
Argh. I was sure I compiled this before pushing it.
Timo Sirainen [Fri, 27 May 2016 11:33:47 +0000 (14:33 +0300)]
lib-fs: fs-metawrap: Improved error logging on corrupted files.
Timo Sirainen [Fri, 27 May 2016 10:33:21 +0000 (13:33 +0300)]
lib-http: Default port for http should be 80, not 443.
Timo Sirainen [Thu, 26 May 2016 16:13:40 +0000 (19:13 +0300)]
doveadm: Fixed sending command -parameters to doveadm-server
Timo Sirainen [Thu, 26 May 2016 18:40:30 +0000 (21:40 +0300)]
sdbox: Make sure we don't crash when altmove-flag is set but alt path is missing.
Timo Sirainen [Thu, 26 May 2016 15:27:27 +0000 (18:27 +0300)]
lib-http: Improved error logging for net_set_*_buffer_size() failures.
Timo Sirainen [Thu, 26 May 2016 15:25:06 +0000 (18:25 +0300)]
dict-sql: Fixed memory leak
Stephan Bosch [Sun, 22 May 2016 08:38:18 +0000 (10:38 +0200)]
lib-http: client: Created test program that triggers most possible error conditions.
Stephan Bosch [Tue, 24 May 2016 01:11:07 +0000 (03:11 +0200)]
lib-http: test-http-payload: Added tests for the use of nested ioloops.
Stephan Bosch [Mon, 23 May 2016 19:57:18 +0000 (21:57 +0200)]
lib-http: test-http-payload: Added cleanup code to make sure no child processes get orphaned at failures.
Also handles SIGSEGV and SIGABRT.
Stephan Bosch [Sun, 22 May 2016 17:16:42 +0000 (19:16 +0200)]
lib-http: test-http-payload: Added -D option to easily enable debug mode.
Stephan Bosch [Mon, 23 May 2016 01:16:07 +0000 (03:16 +0200)]
lib-http: test-http-client: Callback is not called for explicitly aborted requests.
Test request context was not freed in that case.
Stephan Bosch [Wed, 25 May 2016 21:41:47 +0000 (23:41 +0200)]
lib-http: client: Fixed bug in handling of lost connections while returning from another ioloop.
At one instance the http_client_connection_is_ready() function could have destroyed the connection while the caller still depended on it.
Renamed the http_client_connection_is_ready() function to http_client_connection_check_ready().
This now returns -1 when the connection got destroyed. Before it returned a bool that just indicated whether the connection was ready or not.
So, there is no need anymore to preserve a connection reference while calling this function.
Stephan Bosch [Mon, 23 May 2016 00:38:49 +0000 (02:38 +0200)]
lib-http: client: Reworked connection close handling.
Now, the peer is immediately notified of the lost connection.
Before, this step was only taken when the connection was fully dereferenced.
To prevent recursive notifications between peer and connection, handling the loss of a connection is deferred to the request handler.
When a peer is freed, any associated lingering connections have conn->peer set to NULL.
Stephan Bosch [Mon, 23 May 2016 00:36:10 +0000 (02:36 +0200)]
lib-http: client: Improved labeling of debug messages.
Request label is corrected.
Labels are now pre-composed and stored.
Stephan Bosch [Sun, 22 May 2016 10:48:37 +0000 (12:48 +0200)]
lib-http: client: Prevent useless and unexpected request callbacks during http_client_deinit().
Requests are now destroyed before queues, hosts, peers and connections.
As a side-effect, requests are now removed from the client request list at http_client_request_destroy(), so that requests with lingering references will no longer make http_client_wait() hang.
Stephan Bosch [Thu, 19 May 2016 22:04:12 +0000 (00:04 +0200)]
lib-http: client: Added settings to configure the connection's socket kernel buffer sizes.
This is mainly useful for use in the lib-http test suite.
Stephan Bosch [Thu, 19 May 2016 22:02:49 +0000 (00:02 +0200)]
lib: Implemented net_set_send_buffer_size() and net_set_recv_buffer_size().
These functions allow manipulating the kernel socket buffer sizes for a socket file descriptor.
Stephan Bosch [Thu, 19 May 2016 21:42:14 +0000 (23:42 +0200)]
lib-http: client: Removed curiously duplicated code.
Probably a patch got applied with sufficient fuzz that it duplicated this code fragment, while it actually already existed.
Stephan Bosch [Sat, 21 May 2016 11:17:58 +0000 (13:17 +0200)]
lib-http: client: peer: Improved debug message that shows the loss of a connection.
Stephan Bosch [Fri, 20 May 2016 22:16:21 +0000 (00:16 +0200)]
lib-http: client: Made peer object reference-counted to prevent invalid memory access in request handling routine.
Resetting the peer->handling_requests flag risked triggering a segfault, since the peer object could be deleted from within the request handler loop.
Stephan Bosch [Sat, 21 May 2016 11:16:08 +0000 (13:16 +0200)]
lib-http: client: Improved request reference counting in connection code.
It should now always be clear when the connection object holds a reference to a request and when it is released.
Only while the reference is held, req->conn points to a connection.
This also makes the assertion in http_client_request_unref() more robust and clear.
Stephan Bosch [Sun, 22 May 2016 08:42:01 +0000 (10:42 +0200)]
lib-http: client: Fixed reference counting for requests that are aborted due to an early server response.
An additional http_client_request_unref() is (now) unneccessary.
Stephan Bosch [Thu, 19 May 2016 21:40:26 +0000 (23:40 +0200)]
lib-http: client: Fixed reference counting for requests that are aborted due to having a broken outgoing payload stream.
Timo Sirainen [Wed, 18 May 2016 16:40:32 +0000 (19:40 +0300)]
lib-http: Changed http_client_request_error to set request to NULL
It's going to internally unreference it, so the caller should be aware of it
also.
I also changed request state check to be an assert, since I don't think
there's any safe way this could work otherwise.
Stephan Bosch [Fri, 20 May 2016 22:16:38 +0000 (00:16 +0200)]
lib-http: response parser: Added check for the range of the response status value.
A value of 666 was accepted inappropriately.
Timo Sirainen [Wed, 25 May 2016 19:29:47 +0000 (22:29 +0300)]
cassandra: Added metrics=path connect setting.
Cassandra's metrics are written to the path in JSON format. It can be a file
or a FIFO. The path supports expanding the standard global %variables, such
as %{pid}
Timo Sirainen [Wed, 25 May 2016 19:08:04 +0000 (22:08 +0300)]
dict: Added missing main.h from previous commit
Timo Sirainen [Wed, 25 May 2016 17:00:01 +0000 (20:00 +0300)]
dict: Show command statistics in process title.
Timo Sirainen [Wed, 25 May 2016 16:56:47 +0000 (19:56 +0300)]
lib: Fixed crashes in timing_get_median() and timing_get_95th()
These were writing outside allocated memory. They weren't actually used
anywhere yet though.
Timo Sirainen [Wed, 25 May 2016 16:45:58 +0000 (19:45 +0300)]
lib: Added timing_reset()
J. Nick Koston [Fri, 20 May 2016 00:15:49 +0000 (19:15 -0500)]
dsync: race condition where done/finish is received after one side has closed
We do not tell the remote we are closing if they have
already told us because they close the
connection after sending ITEM_FINISH or ITEM_DONE and will
not be ever receive anything else from us unless
it just happens to get combined into the same packet
as a previous response and is already in the buffer.
Timo Sirainen [Tue, 24 May 2016 12:52:37 +0000 (15:52 +0300)]
lib-stats: Allow unregistering + re-registering stats.
Fixes:
Panic: stats_register() called after stats_alloc_size() was already called - this will break existing allocations
This could have happened with doveadm HTTP API when using multiple commands
in same HTTP connection.
Timo Sirainen [Mon, 23 May 2016 20:24:31 +0000 (23:24 +0300)]
lib-index: Fixed assert-crash caused by previous cache compression change.
We can't call mail_cache_map() when cache file isn't open or we'll crash:
Panic: file mail-cache.c: line 468 (mail_cache_map): assertion failed: (cache->need_compress_file_seq != 0 || MAIL_INDEX_IS_IN_MEMORY(cache->index))
Timo Sirainen [Mon, 23 May 2016 15:46:09 +0000 (18:46 +0300)]
lib-index: Make sure cache compression doesn't clear the file unneededly.
This probably never happened with current code, except when the cache file
was already broken.
mail_cache_compress() unmapped cache when map_with_read==TRUE, but we never
mapped it back. This would cause cache copying code to think cache was
unusable and not copy anything.
Timo Sirainen [Mon, 23 May 2016 14:47:50 +0000 (17:47 +0300)]
auth: Support %variable expansion for LDAP field names.
For example this is now allowed:
user_attrs = \
=namespace/%{ldap:enabledNamespace}/enabled=yes \
...
Timo Sirainen [Mon, 23 May 2016 10:12:41 +0000 (13:12 +0300)]
lib-ldap: Use ldap_unbind_ext() instead of ldap_destroy()
This allows it to compile with older LDAP libraries. Their behavior (at least
in OpenLDAP) is identical as long as LDAP_OPT_CLIENT_CONTROLS haven't been
changed, which we haven't.
Timo Sirainen [Mon, 23 May 2016 10:08:20 +0000 (13:08 +0300)]
lib-ldap: Support libldap without LDAP_OPT_X_TLS_NEWCTX.
Timo Sirainen [Fri, 20 May 2016 12:55:52 +0000 (15:55 +0300)]
doveadm backup: Fixed unnecessary mailbox deletion.
Broken by
79490ec1a . The idea is to delete the mailbox early to avoid
unnecessary work, but we deleted it too early. If the last mail(s) were
deleted instead of just expunging them we deleted the whole mailbox.
Timo Sirainen [Fri, 20 May 2016 10:53:01 +0000 (13:53 +0300)]
lib: Minor panic message improvement.
Timo Sirainen [Thu, 19 May 2016 20:19:29 +0000 (23:19 +0300)]
lib-mail: Fixed istream-header-filter calling callback(hdr=NULL)
It should do it on the following parsings as well if there were any
callbacks that were called, or if the hdr==NULL callback added any
headers. This is important because the hdr==NULL call could do some
cleanups.
Timo Sirainen [Thu, 19 May 2016 12:19:21 +0000 (15:19 +0300)]
lib: iostream-temp is a blocking ostream.
It goes either to in-memory buffer or to a file.
Baofeng Wang [Mon, 16 May 2016 08:34:05 +0000 (11:34 +0300)]
config: fix possible out-of-bound access in parsing function
Add low-bound check when decreasing string pointer from tail.
Timo Sirainen [Wed, 18 May 2016 19:38:24 +0000 (22:38 +0300)]
lib-fs: istream-metawrap can now safely have a readable fd
Timo Sirainen [Wed, 18 May 2016 19:36:57 +0000 (22:36 +0300)]
lib: Changed istream.abs_start_offset to be relative start_offset
i_stream_get_absolute_offset() walks through the stream's parents to get the
absolute offset. This allows streams to change their start_offset after
they have already created (e.g. istream-metawrap).
Timo Sirainen [Wed, 18 May 2016 19:59:06 +0000 (22:59 +0300)]
dict: Removed duplicate commit reply character
This broke dict-client with error:
Invalid commit reply, expected id=1: OO1
Timo Sirainen [Wed, 18 May 2016 19:51:46 +0000 (22:51 +0300)]
lib: Compiler warning fix
Timo Sirainen [Wed, 18 May 2016 19:51:31 +0000 (22:51 +0300)]
lib: Fixed memory leak in ostream-file unit test
Aki Tuomi [Wed, 18 May 2016 13:03:34 +0000 (16:03 +0300)]
Make libbsd optional
Also use setproctitle properly if libbsd is indeed used.
Timo Sirainen [Wed, 18 May 2016 19:26:50 +0000 (22:26 +0300)]
lib-fs: istream-metawrap can't have a readable fd currently
Timo Sirainen [Wed, 18 May 2016 19:26:23 +0000 (22:26 +0300)]
lib: ostream-file unit test: Test sendfile()
Timo Sirainen [Wed, 18 May 2016 19:12:01 +0000 (22:12 +0300)]
lib: ostream-file: Fixed o_stream_send_istream() within same file
When copying content backwards.
Timo Sirainen [Wed, 18 May 2016 18:46:46 +0000 (21:46 +0300)]
lib-imap-storage: Fixed fetching partial headers for message/rfc822 part
Again broken by
333602c40 .
Timo Sirainen [Wed, 18 May 2016 18:41:49 +0000 (21:41 +0300)]
lib-imap-storage: Don't sort uninitialized array on invalid header list.
Timo Sirainen [Wed, 18 May 2016 18:14:28 +0000 (21:14 +0300)]
lib-imap-storage: Removed wrong assert.
Now that we're no longer putting the headers through istream-header-filter
it doesn't necessarily have CRLFs. Broken by
333602c40 .
Timo Sirainen [Wed, 18 May 2016 11:56:59 +0000 (14:56 +0300)]
lib-mail: istream-header-filter - Don't return -2 too early
We returned -2 after we already added the data to the buffer. We should
have returned -2 only on the next read() call if nothing was skipped.
Timo Sirainen [Wed, 18 May 2016 11:52:03 +0000 (14:52 +0300)]
lib-mail: Added asserts to message_get_*_size()
Timo Sirainen [Wed, 18 May 2016 11:27:03 +0000 (14:27 +0300)]
lib-imap-storage: Don't double-filter HEADER.FIELDS (..) headers.
Timo Sirainen [Wed, 18 May 2016 11:24:55 +0000 (14:24 +0300)]
lib-imap-storage: Minor error logging cleanup/fix.
We read from input, not from mail_input. In theory it could have the actual
error instead of mail_input (although right now it couldn't).
Timo Sirainen [Wed, 18 May 2016 16:22:40 +0000 (19:22 +0300)]
lib: istream-file: Fixed o_stream_send_istream()
Timo Sirainen [Wed, 18 May 2016 15:51:55 +0000 (18:51 +0300)]
lib-http: Fixed checking if istream or ostream needs waiting.
Timo Sirainen [Wed, 18 May 2016 15:48:27 +0000 (18:48 +0300)]
lib: If epoll_ctl() fails, panic instead of just fatal.
This makes it easier to fix such bugs.
Timo Sirainen [Wed, 18 May 2016 15:44:10 +0000 (18:44 +0300)]
lib-mail: Improve ostream-dot unit test
Timo Sirainen [Wed, 18 May 2016 15:41:33 +0000 (18:41 +0300)]
lib: ostream-escaped: Fixed setting offset
Timo Sirainen [Wed, 18 May 2016 15:42:14 +0000 (18:42 +0300)]
lib: Added comment to what ostream.offset actually is
Timo Sirainen [Wed, 18 May 2016 14:56:55 +0000 (17:56 +0300)]
lib-fs: ostream-metawrap: Fixed o_stream_send_istream() offset updates
Timo Sirainen [Wed, 18 May 2016 14:45:09 +0000 (17:45 +0300)]
lib: Don't set ostream buffer as blocking
Timo Sirainen [Wed, 18 May 2016 14:42:06 +0000 (17:42 +0300)]
lib: iostream-temp: Fixed sending more output after o_stream_send_istream()
Timo Sirainen [Wed, 18 May 2016 14:41:32 +0000 (17:41 +0300)]
lib: iostream-temp: Fixed o_stream_send_istream()
Timo Sirainen [Mon, 16 May 2016 10:21:57 +0000 (13:21 +0300)]
Removed buffer_reset().
It was just a wrapper to buffer_set_used_size() and its comment was a bit
confusing (or obsolete), since it wasn't actually immediately zeroing out
the buffer.
Timo Sirainen [Mon, 16 May 2016 10:19:50 +0000 (13:19 +0300)]
lib: Updated buffer_set_used_size() comment and added unit test.
Timo Sirainen [Mon, 16 May 2016 18:03:35 +0000 (21:03 +0300)]
global: Simplify code with the new o_stream_send_istream() API
Timo Sirainen [Mon, 16 May 2016 17:17:41 +0000 (20:17 +0300)]
lib: istream-sized should log errors with its own name, not parent's name
Timo Sirainen [Mon, 16 May 2016 17:12:40 +0000 (20:12 +0300)]
imap: Code cleanup - use istream-sized for GETMETADATA reply
This avoids doing the same work explicitly.
Timo Sirainen [Mon, 16 May 2016 17:06:30 +0000 (20:06 +0300)]
global: Use o_stream_nsend_istream() where useful
We can skip all of the io error handling and just leave it to
o_stream_nfinish().
Timo Sirainen [Mon, 16 May 2016 17:04:38 +0000 (20:04 +0300)]
lib: Added o_stream_nsend_istream()
Timo Sirainen [Mon, 16 May 2016 16:48:41 +0000 (19:48 +0300)]
lib: Simplified and clarified o_stream_send_istream() API
Timo Sirainen [Mon, 16 May 2016 16:33:40 +0000 (19:33 +0300)]
lib: Added ostream.blocking boolean
Similar to istream.blocking.
Timo Sirainen [Mon, 16 May 2016 16:26:26 +0000 (19:26 +0300)]
lib: Don't silently ignore partial writes for o_stream_nsend()
Normally o_stream_nsend() should be used only for blocking streams or
streams with infinite (or "enough") buffer space.
Timo Sirainen [Mon, 16 May 2016 16:16:55 +0000 (19:16 +0300)]
lmtp: Fixed error logging when writing to temp file
Timo Sirainen [Mon, 16 May 2016 13:58:44 +0000 (16:58 +0300)]
lib: Removed ostream.last_failed_errno
It's been identical to ostream.stream_errno for a while now.
Timo Sirainen [Mon, 16 May 2016 13:55:34 +0000 (16:55 +0300)]
lib-compression: Changed impossible errors to asserts.
o_stream_flush() no longer calls the stream's flush() if stream has failed.
Timo Sirainen [Mon, 16 May 2016 13:27:53 +0000 (16:27 +0300)]
lib: istream-file: Code cleanup
No functional changes
Timo Sirainen [Mon, 16 May 2016 13:09:52 +0000 (16:09 +0300)]
global: Don't assume o_stream_send_istream() return bytes sent.
This won't be true soon after its API changes.
Timo Sirainen [Mon, 16 May 2016 12:49:08 +0000 (15:49 +0300)]
global: Use [io]_stream_get_error() insted of %m
Timo Sirainen [Mon, 16 May 2016 12:34:49 +0000 (15:34 +0300)]
global: Code cleanup - remove unnecessary errno changes.
These were left behind from changing %m to [io]_stream_get_error()
Timo Sirainen [Mon, 16 May 2016 12:22:11 +0000 (15:22 +0300)]
dbox: iostream error logging improvements.
Timo Sirainen [Mon, 16 May 2016 18:53:00 +0000 (21:53 +0300)]
global: Replaced all i_stream_read_data() with _more() and _bytes()
Timo Sirainen [Mon, 16 May 2016 18:51:56 +0000 (21:51 +0300)]
global: Fixed slighty wrong i_stream_read_data() with _read_bytes()
These calls were reading one byte more than they were intended to read.
This didn't really cause any problems, but now they're correct.
Aki Tuomi [Wed, 18 May 2016 06:33:15 +0000 (09:33 +0300)]
doveadm-mailbox-delete: Restore recursive parameter
Aki Tuomi [Wed, 18 May 2016 06:29:04 +0000 (09:29 +0300)]
dict: Fix crash when no dictionaries defined
Timo Sirainen [Mon, 16 May 2016 21:00:43 +0000 (00:00 +0300)]
imap: Include sync timing information in tagged command replies.
Show it only when it's larger than 0 to avoid unnecessary output.
Aki Tuomi [Tue, 17 May 2016 20:51:43 +0000 (23:51 +0300)]
doveadm-mail-mailbox: Whitespace fix
Aki Tuomi [Tue, 17 May 2016 20:31:29 +0000 (23:31 +0300)]
doveadm-mailbox: Add update subcommand
Timo Sirainen [Sun, 15 May 2016 11:53:24 +0000 (14:53 +0300)]
lib-mail: Fixed istream-header-filter callback's matched with eoh
Reversed the matched-parameter handling for hdr->eoh, so it's consistent
with non-eoh headers.