]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Teemu Huovila [Mon, 30 May 2016 09:40:00 +0000 (12:40 +0300)]
lib-fts: Add stopword files for more languages.
Teemu Huovila [Mon, 30 May 2016 08:54:26 +0000 (11:54 +0300)]
lib-fts: Move stopwords to subdirectory.
All files incluided in dist are explicitly mentioned. The whole
subdirectory 'stopwords' could also be distributed, but that is
more error prone.
Timo Sirainen [Wed, 1 Jun 2016 21:52:37 +0000 (00:52 +0300)]
dict: Pipelined iteration replies may have been hanging.
For example:
- lookup start
- iterate start
- iterate finished, but can't reply yet
- lookup finished
- iterate reply can be sent now, but wasn't previously
Timo Sirainen [Wed, 1 Jun 2016 21:51:26 +0000 (00:51 +0300)]
dict: Fixed crash when reaching max (5) pending commands.
Timo Sirainen [Wed, 1 Jun 2016 15:11:29 +0000 (18:11 +0300)]
global: Use i_stream_get_max_buffer_size() wherever possible
After
7be8ba0c0 it's no longer correct to access stream->max_buffer_size
directly. These changes fix using istream-chain with various wrapper
streams.
Timo Sirainen [Wed, 1 Jun 2016 15:09:48 +0000 (18:09 +0300)]
lib: i_stream_get_max_buffer_size() checks also parents' max sizes
This fixes i_stream_get_max_buffer_size() to work correctly with
istream-chain.
Timo Sirainen [Wed, 1 Jun 2016 15:03:58 +0000 (18:03 +0300)]
lib: istream-chain didn't update its max_buffer_size
I had this code at some point earlier, but looks like it got lost from the
final commit.
Timo Sirainen [Wed, 1 Jun 2016 14:52:23 +0000 (17:52 +0300)]
lib-compression: istream.max_buffer_size == 0 isn't unlimited.
Timo Sirainen [Wed, 1 Jun 2016 14:18:23 +0000 (17:18 +0300)]
fs-metawrap: Removed unnecessary code.
As mentioned in
a0cf7d392 , this can't happen.
Timo Sirainen [Wed, 1 Jun 2016 14:12:51 +0000 (17:12 +0300)]
lib-fs: Improved unit tests.
Timo Sirainen [Wed, 1 Jun 2016 14:12:10 +0000 (17:12 +0300)]
fs-metawrap: Removed unnecessary code.
The caller already set success==FALSE if ostream was closed.
Timo Sirainen [Wed, 1 Jun 2016 14:11:53 +0000 (17:11 +0300)]
lib-fs: Added more asserts
Timo Sirainen [Wed, 1 Jun 2016 14:06:28 +0000 (17:06 +0300)]
lib-fs: Clarified fs_write_stream_abort() API and dropped its _async().
We can't handle an abort after an async fs_write_stream_finish() is already
going.
Timo Sirainen [Wed, 1 Jun 2016 12:15:19 +0000 (15:15 +0300)]
lib-fs: Added fs_write_stream_abort_async()
Stephan Bosch [Sat, 14 May 2016 20:49:53 +0000 (22:49 +0200)]
lib-mail: istream-qp-decoder: For efficiency, avoid copying data between decode buffer and stream buffer.
Instead, use the decode buffer directly as stream buffer.
Timo Sirainen [Wed, 4 May 2016 15:24:03 +0000 (18:24 +0300)]
lib: istream's max_buffer_size=0 means 0, not unlimited.
Make sure we don't grow the buffer size then.
Timo Sirainen [Wed, 1 Jun 2016 10:30:22 +0000 (13:30 +0300)]
lib: Fix to previous istream-chain max_buffer_size handling
We were casting the wrong stream.
Timo Sirainen [Tue, 31 May 2016 19:33:32 +0000 (22:33 +0300)]
fs-metawrap: Fixed buffer size while reading metadata header.
It's not enough to have the buffer size set to "large enough" at the time of
the stream creation, because i_stream_set_max_buffer_size() could be called
afterwards.
Timo Sirainen [Tue, 31 May 2016 19:19:37 +0000 (22:19 +0300)]
lib: Fixed max_buffer_size handling in istream-chain
The default max_buffer_size=256 was wrong in all situations.
We're now assuming that the underlying istreams' max_buffer_size is always
correct. While gluing together two streams we're now allocating enough
memory to hold all of the wanted data (instead of assert-crashing as could
have happened earlier). This means that the max memory usage is actually
the two streams' max_buffer_size summed together. Ideally this would be
fixed to limit the max_buffer_size to maximum of the two, but that would
require further changes.
Aki Tuomi [Wed, 1 Jun 2016 05:43:23 +0000 (08:43 +0300)]
doveadm: Do not use INT64 with mail cmds yet
Timo Sirainen [Tue, 31 May 2016 23:01:10 +0000 (02:01 +0300)]
lib-dcrypt: Fixed check program dependencies
Timo Sirainen [Tue, 31 May 2016 21:19:41 +0000 (00:19 +0300)]
lib-dcrypt: Fixed dcrypt_openssl_generate_keypair()
Timo Sirainen [Tue, 31 May 2016 14:16:17 +0000 (17:16 +0300)]
dict-client: Fixed idle_msecs setting.
Timo Sirainen [Tue, 31 May 2016 14:06:29 +0000 (17:06 +0300)]
lib-fs: Don't duplicate backend name in fs_init() errors.
fs_init() already adds the "backend: " prefix to the error_r, so the callers
shouldn't do it again.
Aki Tuomi [Mon, 30 May 2016 19:39:39 +0000 (22:39 +0300)]
lib-dcrypt: Use base64 encoded test samples
Aki Tuomi [Mon, 30 May 2016 19:33:29 +0000 (22:33 +0300)]
lib-dcrypt: Fix strict type-punning warning
Aki Tuomi [Mon, 30 May 2016 19:30:31 +0000 (22:30 +0300)]
lib-dcrypt: Fix various OpenSSL API usage issues
Aki Tuomi [Mon, 30 May 2016 19:05:22 +0000 (22:05 +0300)]
lib-dcrypt: Remove duplication of samples
Timo Sirainen [Mon, 30 May 2016 18:14:53 +0000 (21:14 +0300)]
lib-dcrypt: Always allow error_r to be NULL.
Especially dcrypt_openssl_private_to_public_key() was called with
error_r=NULL by the dcrypt.c itself.
Timo Sirainen [Mon, 30 May 2016 16:38:22 +0000 (19:38 +0300)]
lib-dcrypt: sample-v2.bin shouldn't be executable
Timo Sirainen [Mon, 30 May 2016 12:36:17 +0000 (15:36 +0300)]
lib-dcrypt: Compiler warning fixes
Timo Sirainen [Fri, 27 May 2016 19:18:17 +0000 (22:18 +0300)]
doveadm mailbox delete: Added --unsafe option.
Timo Sirainen [Fri, 27 May 2016 19:15:07 +0000 (22:15 +0300)]
lib-storage: Added MAILBOX_FLAG_DELETE_UNSAFE
Aki Tuomi [Thu, 5 May 2016 21:29:16 +0000 (00:29 +0300)]
configure: Include lib-dcrypt in core
Aki Tuomi [Wed, 27 Apr 2016 11:08:00 +0000 (14:08 +0300)]
lib-dcrypt: Initial implementation
Aki Tuomi [Mon, 30 May 2016 11:45:09 +0000 (14:45 +0300)]
doveadm-director: Fix commands so that they compile
Timo Sirainen [Fri, 27 May 2016 08:29:09 +0000 (11:29 +0300)]
doveadm mailbox delete: Added -e parameter to delete only empty mailboxes.
Aki Tuomi [Wed, 24 Feb 2016 10:10:19 +0000 (12:10 +0200)]
doveadm-director: Convert to ver2 infra
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 [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:25:06 +0000 (18:25 +0300)]
dict-sql: Fixed memory leak
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 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 [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.
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:26:50 +0000 (22:26 +0300)]
lib-fs: istream-metawrap can't have a readable fd currently
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 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.
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:31:29 +0000 (23:31 +0300)]
doveadm-mailbox: Add update subcommand
Timo Sirainen [Thu, 12 May 2016 21:45:34 +0000 (17:45 -0400)]
lib-ldap: Fixed assert-crash when killing LDAP connection.
libldap may have already closed the fd, so with epoll io_remove() would
try to remove it and crash with:
Panic: epoll_ctl(del, 12) failed: Bad file descriptor
Phil Carmody [Mon, 8 Feb 2016 16:32:10 +0000 (18:32 +0200)]
lib: istream - provide alternatives to i_stream_read_data()
Providing as a parameter the number of bytes that you would be
disappointed to receive was confusing compared to providing the
number that you would be happy to receive. This lets us get rid
of all the '-1's in the callers. The callers which used 0 as
a parameter were so common that it's worth providing a separate
API just to simplify their demands.
Deep down, these are still the same underlying function. Currently
we route the new API through the old one, but eventually, the old
API can be routed through the new one, so that the friendlier
interface has the simplest implementation.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Aki Tuomi [Sun, 15 May 2016 14:25:17 +0000 (17:25 +0300)]
lib-ldap: Do not create new context and lose settings
Timo Sirainen [Sat, 14 May 2016 22:17:18 +0000 (01:17 +0300)]
lib-ldap: Compiling fix - don't pass through void return
Timo Sirainen [Wed, 11 May 2016 20:57:33 +0000 (16:57 -0400)]
lib-sql: Memory leak fix when freeing sql dbs from cache
Normally happened only at deinit.
Timo Sirainen [Fri, 6 May 2016 10:42:11 +0000 (13:42 +0300)]
dict-redis: Fixed memory leak in async commit
Timo Sirainen [Fri, 13 May 2016 18:22:40 +0000 (14:22 -0400)]
imap: Set command start timestamps earlier.
Previously timing statistics in taglines weren't shown commands that didn't
read any parameters.
Also the timings now include the time speng reading command parameters from
client. For example:
a list "" {1}
+ OK
%
* LIST (\HasNoChildren) "/" INBOX
a OK List completed (0.001 + 1.214 secs).
Timo Sirainen [Fri, 13 May 2016 17:35:50 +0000 (13:35 -0400)]
lib: Fixed istream_seekable.stat() to return correct size.
It was supposed to read until end of the stream, but it did it only when
stat() was called while stream was still fully in memory.
Timo Sirainen [Fri, 13 May 2016 13:56:08 +0000 (09:56 -0400)]
lib-fs: Make sure fs-metawrap catches all write errors.
The full istream may not have been written in case ostream only partially
wrote the data (e.g. out of disk space?)
Timo Sirainen [Fri, 13 May 2016 13:48:13 +0000 (09:48 -0400)]
lib-fs: If fs-metawrap sees truncated header, it should return error.
Timo Sirainen [Fri, 13 May 2016 13:23:52 +0000 (09:23 -0400)]
lib: Fixed potential crash in i_stream_stat() failures.
We shouldn't have been copying parent's stream_errno here. Especially
because the parent can be NULL.
Timo Sirainen [Thu, 12 May 2016 19:10:47 +0000 (15:10 -0400)]
lib-fs: Added FS_PROPERTY_FASTCOPY_CHANGED_METADATA
Timo Sirainen [Thu, 28 Apr 2016 09:45:01 +0000 (12:45 +0300)]
lib-fs: Allow multiple fs_read_stream() calls to seekable istreams.
This fixes for example calling fs_default_copy() for an istream which was
already opened:
Panic: file fs-api.c: line 528 (fs_read_stream): assertion failed: (!file->istream_open)
Timo Sirainen [Thu, 28 Apr 2016 09:47:02 +0000 (12:47 +0300)]
lib-fs: Fixed multiple concurrent fs_read_stream() calls
Return a new limit-istream, so each istream can have its own independent
offset.
Timo Sirainen [Thu, 12 May 2016 12:09:56 +0000 (08:09 -0400)]
lib-http: Queue's delayed timeout handler wasn't removed after work was done.
Timo Sirainen [Wed, 11 May 2016 20:58:59 +0000 (16:58 -0400)]
dict-sql: Cache reading settings files.
The settings were read for every dict init, which was done for every new
dict connection. This was using a lot of CPU. There are usually only a
couple dict-sql settings files, so we cache all of the ones we read.
Timo Sirainen [Thu, 12 May 2016 11:24:39 +0000 (07:24 -0400)]
lib-fs: Minor code cleanup
Timo Sirainen [Thu, 12 May 2016 11:23:51 +0000 (07:23 -0400)]
lib-fs: Set fs error on fs_write_stream_abort()
Probably would be nice for fs_write_stream_abort() to have an error string
parameter, which could be used instead of this generic error.
Timo Sirainen [Thu, 12 May 2016 11:23:04 +0000 (07:23 -0400)]
lib-fs: Added asserts to make sure async writes are finished before close
Timo Sirainen [Thu, 12 May 2016 11:21:38 +0000 (07:21 -0400)]
fs-metawrap: Minor code cleanup
temp_output==NULL, so these calls are equal.
Timo Sirainen [Thu, 12 May 2016 11:18:49 +0000 (07:18 -0400)]
fs-metawrap: Propagate fs_write_stream_abort() to parent always
It needed to be done also when temp_output==NULL, because we had already
started sending it to parent, but async parent wasn't being finished.
Timo Sirainen [Thu, 12 May 2016 11:15:41 +0000 (07:15 -0400)]
fs-randomfail: Set fs error always when injecting failure.
It was done in some places, but not everywhere.
Timo Sirainen [Tue, 10 May 2016 21:35:43 +0000 (17:35 -0400)]
lib-ldap: Reverted previous commit for now.
We don't have libdovecot built at at this stage. But we can't build it
earlier, because it needs lib-dict-extra, which needs lib-ldap. So we have
cyclical dependencies now.
Timo Sirainen [Tue, 10 May 2016 21:25:20 +0000 (17:25 -0400)]
lib-ldap: Add libdovecot dependency to libdovecot-ldap
Required for linking to work on OSX.
Timo Sirainen [Tue, 10 May 2016 20:22:23 +0000 (16:22 -0400)]
lib: Fixed crash when closing a failed istream-concat
i_stream_concat_seek() could have set cur_input==NULL and we still
attempted to seek the cur_input at close time.
Timo Sirainen [Tue, 10 May 2016 14:42:33 +0000 (10:42 -0400)]
lib-index: "first saved UID of the day" wasn't updated right always.
It was using the UID of the first append. But it may not have been the
lowest UID. Do this after the appends are first sorted by their UID.
Stephan Bosch [Mon, 9 May 2016 22:42:51 +0000 (00:42 +0200)]
Added liblzma bug to Valgrind suppressions file.
It caused `make test` to fail with valgrind.
Occurred at least for Debian Jessie with liblzma package version 5.1.1alpha+
20120614 -2+b3.
Timo Sirainen [Mon, 9 May 2016 05:04:39 +0000 (08:04 +0300)]
README: Added missing supported RFCs
Timo Sirainen [Thu, 5 May 2016 21:17:31 +0000 (00:17 +0300)]
lib-http: If connect fails, include attempt count and total time in error.
This will produce errors such as:
9002 connect(1.2.3.4:801) failed: Connection timed out in 1.001 secs (4 attempts in 4.706 secs)
Timo Sirainen [Fri, 6 May 2016 14:35:10 +0000 (17:35 +0300)]
dict-client: Added idle_msecs=<n> parameter
This can be useful when connected to dict-async server where extra idling
connections don't matter so much as with blocking dict servers.
Timo Sirainen [Fri, 6 May 2016 19:24:20 +0000 (22:24 +0300)]
imap: Avoid assert-crash after a failed mailbox sync.
We didn't close the mailbox and we didn't update message counts, so we could
have crashed with:
Panic: Message count decreased