]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Martti Rannanjärvi [Thu, 8 Sep 2016 16:01:54 +0000 (19:01 +0300)]
lib-index: limit mail_index error prints to one per ioloop_time
This is to prevent log flooding.
Timo Sirainen [Fri, 9 Sep 2016 00:05:39 +0000 (03:05 +0300)]
lib-test: test_expect_errors() now works for the entire log string, not just format parameter
Timo Sirainen [Thu, 8 Sep 2016 22:42:50 +0000 (01:42 +0300)]
imap-hibernate: Increased imap-master communication timeout from 5s to 30s
Looks like 5s isn't enough in loaded environments. It's also not really a
problem if the timeout is large, it's just going to take a while longer to
restore the connection. When timeout is reached the client would just get
disconnected anyway.
Timo Sirainen [Thu, 8 Sep 2016 22:08:59 +0000 (01:08 +0300)]
stats: Include PIDs in "Duplicate session ID" errors.
Timo Sirainen [Thu, 8 Sep 2016 19:08:11 +0000 (22:08 +0300)]
lib-index: mail_index_modseq_get_next_log_offset() shouldn't return offset beyond view's head
This also allows removing the same workaround from dsync code.
Aki Tuomi [Thu, 8 Sep 2016 20:00:56 +0000 (23:00 +0300)]
imap-acl: acl plugin deinit returns 1 on non-empty
Aki Tuomi [Thu, 8 Sep 2016 19:59:58 +0000 (22:59 +0300)]
acl: Deinit will return 1 on non-empty
Timo Sirainen [Thu, 8 Sep 2016 18:31:37 +0000 (21:31 +0300)]
lib: Allow static analyzers to check for t_pop() leaks.
They should be able to detect the missing free() call from code paths
missing a t_pop().
Timo Sirainen [Thu, 8 Sep 2016 18:31:25 +0000 (21:31 +0300)]
configure: Added --enable-static-checker parameter
Timo Sirainen [Wed, 7 Sep 2016 08:52:00 +0000 (11:52 +0300)]
imap: Avoid wrongly assert-crashing in client_check_command_hangs()
Fixes assert:
Panic: file imap-client.c: line 837 (client_check_command_hangs): assertion failed: (client->io != NULL)
Timo Sirainen [Thu, 8 Sep 2016 17:23:35 +0000 (20:23 +0300)]
stats plugin: Don't send any stats before CONNECT was successfully sent.
After stats write failures this fixes warnings like:
Warning: stats: Couldn't find session ID: smqAXQE8pIp/AAAB
Timo Sirainen [Thu, 8 Sep 2016 17:18:46 +0000 (20:18 +0300)]
lib-stats: stats_connection_send() now returns whether it succeeded or not
Timo Sirainen [Thu, 8 Sep 2016 13:50:02 +0000 (16:50 +0300)]
doveadm flags: Sync mailbox after committing transaction.
Aki Tuomi [Wed, 7 Sep 2016 13:45:09 +0000 (16:45 +0300)]
acl-plugin: Adjust to API changes
Aki Tuomi [Wed, 7 Sep 2016 19:06:55 +0000 (22:06 +0300)]
lmtp: Always read settings before dropping privs
If lmtp is ran explicitly as root, settings were not read.
Timo Sirainen [Wed, 7 Sep 2016 19:00:14 +0000 (22:00 +0300)]
imap: Fixed assert-crash if un-hibernation failed to initialize user.
master_service_client_connection_destroyed() was also being called in
imap_master_client_destroy() so it was done twice.
Fixes:
Panic: file master-service.c: line 775 (master_service_client_connection_destroyed): assertion failed: (service->total_available_count > 0)
Aki Tuomi [Mon, 5 Sep 2016 09:42:08 +0000 (12:42 +0300)]
fs-api: Retrieve errno before dest->copy_output is NULL'ed
CID 10144: When aborting output, errno retrieval
is attempted after dest->copy_output has already
been unreffed. Found by coverity.
Aki Tuomi [Sat, 3 Sep 2016 12:26:39 +0000 (15:26 +0300)]
acl-plugin: Whitespace fixes
Aki Tuomi [Sat, 3 Sep 2016 12:23:11 +0000 (15:23 +0300)]
acl-plugin: Deinit acl_iter on deinit too
Aki Tuomi [Sat, 3 Sep 2016 10:14:29 +0000 (13:14 +0300)]
acl-plugin: Make iterators more conforming
The *_next functions return true/false, deinit will
report errors and end result.
Aki Tuomi [Tue, 6 Sep 2016 06:24:06 +0000 (09:24 +0300)]
lib-storage: Check that UID is set before caching
Aki Tuomi [Tue, 6 Sep 2016 06:23:54 +0000 (09:23 +0300)]
lib-imap-storage: Check that UID is assigned before caching
Aki Tuomi [Mon, 5 Sep 2016 12:56:05 +0000 (15:56 +0300)]
zlib-plugin: Check that UID is assigned
When caching, code has to check whether UID is
assigned to avoid reusing cache for different
email since they all have UID = 0 before they
are actually committed.
Aki Tuomi [Tue, 6 Sep 2016 13:17:13 +0000 (16:17 +0300)]
quota: Flush quota after recalc
Correctly fix issue where the dict commit
is left unfinished.
Timo Sirainen [Mon, 5 Sep 2016 23:56:39 +0000 (02:56 +0300)]
lib-dcrypt: Avoid infinite loop if istream header is too large.
We'll return an error now instead. We can't just return -2 here, because nothing
was actually being returned to the caller. Attempting to do that would just trigger
an assert:
Panic: file istream.c: line 182 (i_stream_read): assertion failed: (_stream->skip != _stream->pos)
Ville Savolainen [Mon, 5 Sep 2016 08:21:30 +0000 (11:21 +0300)]
dovecot.service.in: removed ExecStartPre and ExecStopPost default definitions
Additional definitions currently added to dovecot.service.d/ by packaging
Aki Tuomi [Thu, 25 Aug 2016 09:27:51 +0000 (12:27 +0300)]
dcrypt: Test for stream prefetch
Aki Tuomi [Thu, 25 Aug 2016 09:26:55 +0000 (12:26 +0300)]
dcrypt: Allow stream prefetch
We might get stream that has already been buffered, so we
must try read it in case buffer is full.
Timo Sirainen [Thu, 1 Sep 2016 05:41:28 +0000 (08:41 +0300)]
lib: If DEBUG is enabled, use a pointer type for data_stack_frame_t
This allows telling static analyzers to treat t_push() and t_pop() similarly
to malloc()/free() and check for leaks.
Timo Sirainen [Thu, 1 Sep 2016 05:24:19 +0000 (08:24 +0300)]
lib: Changed t_pop() API to make it a bit more like free()
Timo Sirainen [Thu, 1 Sep 2016 05:34:22 +0000 (08:34 +0300)]
lib-master: master_service_init_finish() now verifies that t_pop() wasn't leaked
Timo Sirainen [Thu, 1 Sep 2016 05:31:14 +0000 (08:31 +0300)]
lib: Created data_stack_frame_t type for data_stack_frame
Timo Sirainen [Thu, 1 Sep 2016 05:13:36 +0000 (19:13 -1000)]
lib: Small code cleanup to data-stack - use explicit data_stack_initialized
This will make it easier to change data_stack_frame's type.
Timo Sirainen [Thu, 1 Sep 2016 05:11:46 +0000 (19:11 -1000)]
lib: Minor t_push() optimization - use unlikely()
Stephan Bosch [Sun, 28 Aug 2016 22:03:54 +0000 (00:03 +0200)]
lib: var-expand: Removed var_expand_table_build().
Replaced it with explicit table construction at the one place it was used.
Clang -Wvargargs complained about passing a char argument to va_start().
Phil Carmody [Wed, 31 Aug 2016 17:14:41 +0000 (20:14 +0300)]
Fix control flow and T_BEGIN/T_END hygiene
You mustn't goto, break, continue, or return from out of a
T_BEGIN {...} T_END block, as that will lose a t_pop().
This has been seen in the wild: Panic: Leaked t_pop() call
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Aki Tuomi [Wed, 31 Aug 2016 06:20:49 +0000 (09:20 +0300)]
lib-fs: Do not abort parent of parent
Stephan Bosch [Mon, 29 Aug 2016 08:40:24 +0000 (10:40 +0200)]
configure.ac: Forgot to invoke DOVECOT_WANT_VPOPMAIL.
It was thereby impossible to enable Vpopmail support.
Aki Tuomi [Sun, 28 Aug 2016 15:40:01 +0000 (18:40 +0300)]
doveadm-server: Reset error code between calls
Aki Tuomi [Sun, 28 Aug 2016 16:55:29 +0000 (19:55 +0300)]
stats: Reset nearly all global mail stats
We leave num_connected_sessions alone.
Aki Tuomi [Sun, 28 Aug 2016 16:14:08 +0000 (19:14 +0300)]
stats: Fix user login counters
Before we would count all users twice,
because the same counters would get increment
in both CONNECT and ADD-USER. Now we do not
increment them at all on ADD-USER.
Stephan Bosch [Sun, 28 Aug 2016 15:00:30 +0000 (17:00 +0200)]
auth: GSSAPI mechanism: Fix CLang -Wstrict-bool warnings.
The GSS_ERROR() macro yields an integer rather than an actual bool value.
The krb5_kuserok() function returns a krb_boolean type, which is unsigned int rather than a bool.
Josef 'Jeff' Sipek [Wed, 24 Aug 2016 07:56:44 +0000 (03:56 -0400)]
lib-master: don't leak config path
The config path can already be non-NULL thanks to the default config path
code or the CONFIG_PATH environmental variable.
Aki Tuomi [Tue, 23 Aug 2016 20:31:40 +0000 (23:31 +0300)]
lib-fs: abort parent in fs_file_write_stream_abort_parent
Timo Sirainen [Tue, 23 Aug 2016 10:06:09 +0000 (13:06 +0300)]
imap: Track how much time was spent on waiting for locks.
Timo Sirainen [Tue, 23 Aug 2016 09:55:24 +0000 (12:55 +0300)]
dict-client: In slow query warnings, log time spent in ioloop and lock waits.
Possibly we want to remove the warnings entirely if most of the time has been
spent on lock waits (or alternatively: not spent in ioloop).
Timo Sirainen [Tue, 23 Aug 2016 09:48:21 +0000 (12:48 +0300)]
lib: Track how much time has been spent on waiting for locks.
Aki Tuomi [Tue, 23 Aug 2016 17:12:47 +0000 (20:12 +0300)]
lib-fts: Add missing include
Timo Sirainen [Tue, 23 Aug 2016 11:08:11 +0000 (14:08 +0300)]
imap: Fixed expunge handling when un-hiberanting
Fixes these errors:
Failed to import client state: Message count mismatch after handling expunges
Message UIDs CRC32 mismatch
Timo Sirainen [Tue, 16 Aug 2016 11:07:14 +0000 (14:07 +0300)]
lib: Changed unlink_directory() API to return error string.
There are many different reasons why it could fail, which a simple errno
can't very clearly indicate.
Timo Sirainen [Fri, 19 Aug 2016 10:15:09 +0000 (13:15 +0300)]
global: Added uchar_empty_ptr and use it instead of &uchar_nul.
This makes Coverity happier about not treating a char as an array.
For now this is a pointer to a 0, but could as well become a pointer
that crashes if dereferenced. Shouldn't be NULL anyway because clang's
-fsanitize=nonnull-attribute will complain about them.
Timo Sirainen [Tue, 23 Aug 2016 10:41:38 +0000 (13:41 +0300)]
lib-fs: Fixes to previous fs_write_stream_abort*() changes.
Timo Sirainen [Tue, 23 Aug 2016 10:40:50 +0000 (13:40 +0300)]
lib-storage: Fixed istream-attachment-extractor error handling.
Timo Sirainen [Tue, 23 Aug 2016 10:40:35 +0000 (13:40 +0300)]
lib-mail: Clarify istream-attachment-extractor's error handling API usage.
Aki Tuomi [Mon, 22 Aug 2016 06:42:26 +0000 (09:42 +0300)]
lib-fs: Add fs_write_stream_abort_parent and use it
Will do all the things abort_error does, but leaves
error untouched. You are expected to set one yourself.
Aki Tuomi [Fri, 19 Aug 2016 15:57:23 +0000 (18:57 +0300)]
lib-fs: Remove fs_write_stream_abort
Do not use fs_write_stream_abort anymore, instead use
fs_write_stream_abort_error to provide upstream some
reason when it's used.
Aki Tuomi [Fri, 19 Aug 2016 13:00:30 +0000 (16:00 +0300)]
fs-api: Add and use fs_write_stream_abort_error
This lets caller to specify error instead of setting it
with fs_error. Doing it like this lets us percolate the
error upwards.
Timo Sirainen [Tue, 23 Aug 2016 07:53:28 +0000 (10:53 +0300)]
lib-storage: Added mailbox_recent_flags_expunge_uid()
For storage backends where it's useful.
Teemu Huovila [Mon, 22 Aug 2016 20:41:05 +0000 (23:41 +0300)]
lib-fts: Change normalizer filter to use new truncate.
Teemu Huovila [Sun, 21 Aug 2016 19:12:33 +0000 (22:12 +0300)]
lib-fts: Cut overlong strings in lowercase filter.
Added new common truncate function for filters. It also removes any partial
characters, that would remain from plain truncation.
Teemu Huovila [Wed, 17 Aug 2016 13:47:19 +0000 (16:47 +0300)]
lib-fts: Add max_length to common filter struct. Reorder fields.
The latter is for for imaginary alignment enhancements.
Timo Sirainen [Mon, 22 Aug 2016 13:13:32 +0000 (16:13 +0300)]
fs-metawrap: Added assert to make sure we don't create empty files.
It seems like this could be happening in some situation.
Aki Tuomi [Fri, 19 Aug 2016 11:47:33 +0000 (14:47 +0300)]
quota-dict: Make sure all transactions complete
Aki Tuomi [Thu, 18 Aug 2016 10:37:28 +0000 (13:37 +0300)]
systemd.service: Add required attributes
Aki Tuomi [Thu, 18 Aug 2016 11:48:50 +0000 (14:48 +0300)]
pop3: Fix deleted_count expansion
Phil Carmody [Mon, 8 Aug 2016 15:14:07 +0000 (18:14 +0300)]
lib: test-json-tree - decouple from internals
Use the new helper functions, so that implementation can change without
needing to change the tests.
Patch best viewed with git diff/show --color-words.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Wed, 22 Jun 2016 08:17:09 +0000 (11:17 +0300)]
lib: json-tree - API change to permit more featureful implementation
Provide accessors for the innards of the tree's nodes, so that the node
internals can be changed freely (needed for DAPI). Constify params where
sensible.
NOTE: this enforced const-correctness may *break* (cause a failure to build)
some clients that didn't use const where they could have. Only obox2 is known
to break.
Add sibling functions with more parameters to expand the range of functionality,
and inline rewire the old simple functions to call the more generic ones.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Timo Sirainen [Thu, 18 Aug 2016 08:22:09 +0000 (11:22 +0300)]
lmtp: Support %{userdb:*} variables in mail_log_prefix
Timo Sirainen [Mon, 15 Aug 2016 20:43:33 +0000 (23:43 +0300)]
quota, last-login: Disable "slow dict commit" warnings
Anything (especially long lock waits) can happen between the commit and when
we read their replies.
Timo Sirainen [Mon, 15 Aug 2016 20:40:59 +0000 (23:40 +0300)]
lib-dict: Added dict_transaction_no_slowness_warning()
Timo Sirainen [Mon, 15 Aug 2016 20:36:13 +0000 (23:36 +0300)]
dict-client: Keep transaction's pointer in command until it's finished.
Timo Sirainen [Mon, 15 Aug 2016 20:16:03 +0000 (23:16 +0300)]
dict-client: Improve "slow dict operation" warnings in error conditions.
There's no need to log both an error and a warning.
Martti Rannanjärvi [Wed, 17 Aug 2016 14:57:16 +0000 (17:57 +0300)]
imap-hibernate: fix input_pending check in client_unhibernate_cmp
Check c2->input_pending instead of c1->input_pending when calculating
comparison value for c2.
Timo Sirainen [Wed, 17 Aug 2016 14:20:21 +0000 (17:20 +0300)]
lib-dcrypt: Fixed accessing out-of-bounds data in istream.
Also some small cleanups to make it clearer what's actually happening.
Timo Sirainen [Wed, 17 Aug 2016 13:25:12 +0000 (16:25 +0300)]
lib-dcrypt: Fixed partial reads in header and limit header's max size.
Also fixes test-stream to actually test nonblocking reads correctly.
Aki Tuomi [Tue, 16 Aug 2016 11:49:35 +0000 (14:49 +0300)]
fts-squat: Ensure child is not NULL
Makes static analysers happy
Aki Tuomi [Tue, 16 Aug 2016 11:47:35 +0000 (14:47 +0300)]
lib-master: Check for NULL in input/output
Makes static analysers happy
Aki Tuomi [Tue, 16 Aug 2016 11:46:08 +0000 (14:46 +0300)]
auth: Ensure username can't be left unset in APOP
Makes static analysers happy
Aki Tuomi [Tue, 16 Aug 2016 11:42:41 +0000 (14:42 +0300)]
imapc: Make sure imail.stream is not NULL
Makes static analysers happy
Aki Tuomi [Tue, 16 Aug 2016 11:39:37 +0000 (14:39 +0300)]
lib-storage: Make sure data->stream isn't NULL
Makes static analysers happy
Aki Tuomi [Tue, 16 Aug 2016 11:36:07 +0000 (14:36 +0300)]
auth: Check for NULL auth token
Makes static analysers happy
Aki Tuomi [Tue, 16 Aug 2016 10:49:01 +0000 (13:49 +0300)]
lib: Fix SENTRY_CHAR to different kind of number
Makes static analysers happier
Aki Tuomi [Tue, 16 Aug 2016 10:46:09 +0000 (13:46 +0300)]
lib-http: Ensure fstream is not NULL in test
Makes static analysers happier
Aki Tuomi [Tue, 16 Aug 2016 10:44:27 +0000 (13:44 +0300)]
lib-index: Do not do pointless memmove
Makes static analysers happier, since moving the data
when days is 0 or days is 8 is effectively non-op.
Aki Tuomi [Tue, 16 Aug 2016 10:31:48 +0000 (13:31 +0300)]
test-priorityq: Ensure item is not NULL
Makes static analysers happy
Aki Tuomi [Tue, 16 Aug 2016 10:30:36 +0000 (13:30 +0300)]
md5: Initialize block
Makes static analysers happy
Timo Sirainen [Tue, 16 Aug 2016 14:15:16 +0000 (17:15 +0300)]
config: Fixed pkgsysconfdir path in ssl_dh warnings.
Aki Tuomi [Tue, 16 Aug 2016 09:41:00 +0000 (12:41 +0300)]
doveconf: Fix ssl_dh parameter handling some more
Move empty check to master-service ssl settings,
also handle ENOENT in read as well. Do not touch
the setting if it could not be composed due to
no such file.
Aki Tuomi [Tue, 16 Aug 2016 09:28:27 +0000 (12:28 +0300)]
doveconf: hide ssl_key and ssl_dh without -P
Timo Sirainen [Tue, 16 Aug 2016 11:53:24 +0000 (14:53 +0300)]
lib-storage: If chdir to home doesn't work, chdir to root instead.
Most importantly this fixes unlink_directory() when current directory
after dropping privileges can't be open()ed.
Timo Sirainen [Tue, 16 Aug 2016 11:04:13 +0000 (14:04 +0300)]
lib-storage: Minor error message fix
Timo Sirainen [Tue, 16 Aug 2016 08:05:25 +0000 (11:05 +0300)]
lib-mail: Compiling fix for message-snippet change - U'x' isn't standard.
nikwrt [Tue, 29 Mar 2016 20:30:17 +0000 (22:30 +0200)]
fts-squat: fix Corrupted squat uidlist bug
Aki Tuomi [Tue, 16 Aug 2016 07:11:04 +0000 (10:11 +0300)]
config: Only require ssl_dh is ssl is turned on
Aki Tuomi [Mon, 15 Aug 2016 16:22:31 +0000 (19:22 +0300)]
lib-mail: Fix snippet generation
Now we won't add leading whitespace for no reason, and also
strip BOM when found.
Aki Tuomi [Mon, 15 Aug 2016 10:30:44 +0000 (13:30 +0300)]
dcrypt: Fix encrypted test keys
Aki Tuomi [Mon, 15 Aug 2016 08:32:31 +0000 (11:32 +0300)]
dcrypt: Update v2 sample
Aki Tuomi [Mon, 15 Aug 2016 08:27:04 +0000 (11:27 +0300)]
dcrypt: Retrieve key length correctly
Martti Rannanjärvi [Fri, 12 Aug 2016 23:26:16 +0000 (02:26 +0300)]
lib-storage: remove set_cache_corrupted_reason from mail_vfuncs
Change set_cache_corrupted signature to what set_cache_corrupted_reason
used to be.
Timo Sirainen [Sat, 13 Aug 2016 11:31:08 +0000 (14:31 +0300)]
lib: Avoid compiler warning if off_t has the same size as ssize_t.