]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
9 years agopop3-migration: Fixed crash when not specifying pop3_migration_mailbox setting.
Timo Sirainen [Thu, 15 Sep 2016 07:23:41 +0000 (10:23 +0300)] 
pop3-migration: Fixed crash when not specifying pop3_migration_mailbox setting.

9 years agoiostream-temp: If write() to temp file fails at any time, move it back to memory.
Timo Sirainen [Wed, 14 Sep 2016 11:19:39 +0000 (14:19 +0300)] 
iostream-temp: If write() to temp file fails at any time, move it back to memory.

Similarly to if the write() to temp fails during the initial move attempt.
This way even if write() fails due to out of disk space, it's not visible
to caller. An error message is logged in any case.

9 years agopop3-migration: Avoid unnecessarily using stream's hdr_size.
Timo Sirainen [Wed, 14 Sep 2016 16:06:29 +0000 (19:06 +0300)] 
pop3-migration: Avoid unnecessarily using stream's hdr_size.

Shouldn't change any behavior, except reduce CPU usage a little bit.

9 years agoimapc: mail_get_stream() shouldn't return cached hdr_size
Timo Sirainen [Wed, 14 Sep 2016 15:57:43 +0000 (18:57 +0300)] 
imapc: mail_get_stream() shouldn't return cached hdr_size

9 years agodoveadm: refactor mailbox attribute get/set/unset/list to share more code
Josef 'Jeff' Sipek [Wed, 14 Sep 2016 11:13:50 +0000 (07:13 -0400)] 
doveadm: refactor mailbox attribute get/set/unset/list to share more code

9 years agodoveadm: allow access to server attributes via empty mailbox name
Josef 'Jeff' Sipek [Tue, 13 Sep 2016 11:50:04 +0000 (07:50 -0400)] 
doveadm: allow access to server attributes via empty mailbox name

9 years agolib-storage: remove attribute accessibility checks
Josef 'Jeff' Sipek [Tue, 13 Sep 2016 11:49:41 +0000 (07:49 -0400)] 
lib-storage: remove attribute accessibility checks

index_storage_attribute_{set,get} should assume that the caller performed
due diligence and checked whether or not the user is allowed to store under
the key.

9 years agodoveadm: lowercase attribute names before trying to parse them
Josef 'Jeff' Sipek [Tue, 13 Sep 2016 07:33:06 +0000 (03:33 -0400)] 
doveadm: lowercase attribute names before trying to parse them

This now matches what the imap server does.

9 years agolib-storage: document mailbox and server attribute handling
Josef 'Jeff' Sipek [Tue, 13 Sep 2016 07:32:06 +0000 (03:32 -0400)] 
lib-storage: document mailbox and server attribute handling

9 years agolib-http: client: Fixed hang occurring when nested ioloops are used in response callb...
Stephan Bosch [Tue, 13 Sep 2016 20:54:02 +0000 (22:54 +0200)] 
lib-http: client: Fixed hang occurring when nested ioloops are used in response callbacks.

To prevent missing disconnect events, i_stream_read() is called once a change in ioloop is detected.
However, if something was actually read into the stream, the input handler was never called.
So, a response could linger in the stream buffer, without being handled, thereby causing the connection to hang indefinitely.
An additional input event could end the hang, but sometimes this doesn't happen before the request times out.

This problem was seen in test-http-payload once in about 10 invocations.
Obox uses nested ioloops, to this applies there.

9 years agolib-http: test-http-payload: Fixed problem in nested ioloop test.
Stephan Bosch [Sun, 11 Sep 2016 20:10:44 +0000 (22:10 +0200)] 
lib-http: test-http-payload: Fixed problem in nested ioloop test.

The running ioloop was not always stopped properly at the end of the test.
This caused an assert failure in the running ioloop.

9 years agolib-http: test-http-payload: Improved logging of nested ioloop tests.
Stephan Bosch [Sun, 11 Sep 2016 20:06:54 +0000 (22:06 +0200)] 
lib-http: test-http-payload: Improved logging of nested ioloop tests.

9 years agodoveadm-auth: Handle unexpected auth "continue" request without crashing.
Timo Sirainen [Sat, 10 Sep 2016 08:32:28 +0000 (11:32 +0300)] 
doveadm-auth: Handle unexpected auth "continue" request without crashing.

9 years agolib-lda: Cleanup error handling in LMTP client code.
Timo Sirainen [Sat, 10 Sep 2016 08:28:38 +0000 (11:28 +0300)] 
lib-lda: Cleanup error handling in LMTP client code.

If there are no successful recipients, we'll need to deinit the client.
But at that point we've already called all the callbacks, so the line
parameter to lmtp_client_fail_full() isn't actually used anywhere.
This was confusing static analyzer because global_fail_string was used
as parameter, which could have been NULL and wouldn't have been valid
for the callbacks.

9 years agolib-master: Fixed memory leak when IPC server is handling commands.
Timo Sirainen [Sat, 10 Sep 2016 08:16:05 +0000 (11:16 +0300)] 
lib-master: Fixed memory leak when IPC server is handling commands.

This mainly meant that when login processes responded to doveadm proxy
list/kick commands memory was leaked.

9 years agodoveadm: Don't allow doveadm_print_header(title==NULL) anymore.
Timo Sirainen [Sat, 10 Sep 2016 08:15:00 +0000 (11:15 +0300)] 
doveadm: Don't allow doveadm_print_header(title==NULL) anymore.

It's not used anywhere, and if it was used it would have crashed with at
least "tab" backend.

9 years agodict-client: Don't crash if dict-server returns broken reply.
Timo Sirainen [Sat, 10 Sep 2016 08:13:58 +0000 (11:13 +0300)] 
dict-client: Don't crash if dict-server returns broken reply.

Just treat missing <tab>value as empty value.

9 years agoauth: Make sure auth_request_log_info() doesn't crash when there are no passdbs
Timo Sirainen [Fri, 9 Sep 2016 15:18:32 +0000 (18:18 +0300)] 
auth: Make sure auth_request_log_info() doesn't crash when there are no passdbs

auth_request_is_disabled_master_user() could have caused such crash.

9 years agoauth: Explicitly ignore return value to make static analyzer happier.
Timo Sirainen [Fri, 9 Sep 2016 15:12:41 +0000 (18:12 +0300)] 
auth: Explicitly ignore return value to make static analyzer happier.

9 years agoAdded asserts to make static analyzer happier.
Timo Sirainen [Fri, 9 Sep 2016 15:10:29 +0000 (18:10 +0300)] 
Added asserts to make static analyzer happier.

9 years agoRemoved dead code to make static analyzer happier.
Timo Sirainen [Fri, 9 Sep 2016 15:07:15 +0000 (18:07 +0300)] 
Removed dead code to make static analyzer happier.

9 years agolib-storage: Fix potential crash when userdb-returns "key+=value" for a nonexistent...
Timo Sirainen [Fri, 9 Sep 2016 14:55:20 +0000 (17:55 +0300)] 
lib-storage: Fix potential crash when userdb-returns "key+=value" for a nonexistent setting.

type would have also happened to be initialized to SET_STR for the crash to
happen.

9 years agolib-test: Fixed NULL pointer dereference when using --enable-static-checker
Timo Sirainen [Fri, 9 Sep 2016 14:50:43 +0000 (17:50 +0300)] 
lib-test: Fixed NULL pointer dereference when using --enable-static-checker

9 years agopgsql: Fixed clearing sql_commit_result.error_type
Timo Sirainen [Fri, 9 Sep 2016 14:46:51 +0000 (17:46 +0300)] 
pgsql: Fixed clearing sql_commit_result.error_type

error was correctly set to NULL with the earlier memset(), but error_type
may have been garbage. This shouldn't have caused any actual problems.

9 years agofts-squat: Fixed memory leak on corrupted uidlist handling
Timo Sirainen [Fri, 9 Sep 2016 14:40:58 +0000 (17:40 +0300)] 
fts-squat: Fixed memory leak on corrupted uidlist handling

9 years agodict-file: Don't leak a lock on temp file creation failure.
Timo Sirainen [Fri, 9 Sep 2016 14:39:43 +0000 (17:39 +0300)] 
dict-file: Don't leak a lock on temp file creation failure.

9 years agolib-imap-urlauth: Don't access freed memory on errors.
Timo Sirainen [Fri, 9 Sep 2016 14:36:39 +0000 (17:36 +0300)] 
lib-imap-urlauth: Don't access freed memory on errors.

9 years agoimap, pop3: Added rawlog_dir setting to store IMAP/POP3 traffic logs.
Timo Sirainen [Tue, 13 Sep 2016 04:22:03 +0000 (07:22 +0300)] 
imap, pop3: Added rawlog_dir setting to store IMAP/POP3 traffic logs.

This at least partially replaces the "rawlog" post-login binary. For now
the "rawlog" binary supports some parameters, which aren't configurable
for rawlog_dir.

9 years agoconfigure: hardening logic is backwards
Josef 'Jeff' Sipek [Mon, 12 Sep 2016 20:22:24 +0000 (16:22 -0400)] 
configure: hardening logic is backwards

Before this change, the argument parsing was busted.  The --help string only
compounded the incorrect behavior by suggesting that --disable-hardening
could take a yes/no argument.

                                      | before   | after
        ------------------------------+----------+--------
        <no option>                   | enable   | enable
        --enable-hardening            | disable  | enable
        --enable-hardening=yes        | disable  | enable
        --enable-hardening=no         | enable   | disable
        --disable-hardening           | enable   | disable
        --disable-hardening=yes       | error    | error
        --disable-hardening=no        | error    | error

9 years agopop3-migration-plugin: Add to index after successful retry
Aki Tuomi [Fri, 9 Sep 2016 12:51:43 +0000 (15:51 +0300)] 
pop3-migration-plugin: Add to index after successful retry

Also change return value to indicate that the hash
has been assigned to header.

9 years agodoveconf: Hide any _api_key
Aki Tuomi [Mon, 12 Sep 2016 06:47:26 +0000 (09:47 +0300)] 
doveconf: Hide any _api_key

9 years agoplugins: fts - replace i_assert under _expunge_log_subtract with warning (API change)
Phil Carmody [Mon, 5 Sep 2016 13:26:56 +0000 (16:26 +0300)] 
plugins: fts - replace i_assert under _expunge_log_subtract with warning (API change)

The helper whose interface is changing currently has no other known
clients (there's little need for it to be exposed at all).

This should never happen, but if it does, just tally the number of times
it happened, and squirt out a warning message after the whole subtract.
If it happens at all, there's no reason not to expect a lot, so only
warn once per file.

In particular - do not assert crash when this is seen - it has been seen
on live test systems where file corruption seems to have occured. As
this can only be associated with corrupt fts indexes, seeing this error
implies that the whole FTS index should be rebuilt for that user.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
9 years agolib-storage: Limit folder full name only
Aki Tuomi [Wed, 10 Aug 2016 10:07:01 +0000 (13:07 +0300)] 
lib-storage: Limit folder full name only

Before we had limit of 16 levels and 255 bytes per name
which is same as 4096 bytes. Now we limit only the total
length of the name to MAILBOX_LIST_NAME_MAX_LENGTH. For
compability reasons, we are restricting individual component
names to 255 characters.

9 years agofs-metawrap: Fixed assert that checks we don't create empty files.
Timo Sirainen [Fri, 9 Sep 2016 11:34:12 +0000 (14:34 +0300)] 
fs-metawrap: Fixed assert that checks we don't create empty files.

If the entire write failed, offset could be 0.

9 years agolib-storage: Fixed accessing user as root when user has no uid.
Timo Sirainen [Fri, 9 Sep 2016 11:07:11 +0000 (14:07 +0300)] 
lib-storage: Fixed accessing user as root when user has no uid.

This shouldn't normally be done, but might as well fix it. Fixes:

Fatal: mail-storage-service: seteuid(4294967295) failed: Invalid argument

9 years agolib-test: Added missing va_end() call.
Timo Sirainen [Fri, 9 Sep 2016 07:38:10 +0000 (10:38 +0300)] 
lib-test: Added missing va_end() call.

9 years agolib-index: Fixed mail_index_modseq_get_next_log_offset() when accessing .log.2
Timo Sirainen [Thu, 8 Sep 2016 21:59:53 +0000 (00:59 +0300)] 
lib-index: Fixed mail_index_modseq_get_next_log_offset() when accessing .log.2

file->sync_offset was set only after header, so sync_highest_modseq was also
same as initial_modseq. The previous code then just returned offset pointing
to sync_offset, which was too early.

9 years agolib-index: Make sure new dovecot.index.log files start tracking modseqs.
Timo Sirainen [Thu, 8 Sep 2016 20:54:22 +0000 (23:54 +0300)] 
lib-index: Make sure new dovecot.index.log files start tracking modseqs.

This will make mail_index_modseq_get_next_log_offset() work correctly even
if modseqs haven't been explicitly enabled.

9 years agolib-storage: Code cleanup for mailbox_get_expunge*()
Timo Sirainen [Tue, 23 Aug 2016 19:36:08 +0000 (22:36 +0300)] 
lib-storage: Code cleanup for mailbox_get_expunge*()

The previous code did actually work as well, but it wasn't very obvious that
it did.

9 years agoimap: When hibernating, wait for old imap process to cleanup before creating new...
Timo Sirainen [Thu, 8 Sep 2016 22:31:46 +0000 (01:31 +0300)] 
imap: When hibernating, wait for old imap process to cleanup before creating new ones.

This fixes stats errors:

stats: Error: FIFO input error: CONNECT: Duplicate session ID Y7Q6E4U7xO1/AAAB for user testuser service imap
stats: Warning: Couldn't find session ID: Y7Q6E4U7xO1/AAAB

9 years agolib-fs: Moved fs_write_stream_abort_parent() to fs-api-private.h
Timo Sirainen [Thu, 8 Sep 2016 23:50:27 +0000 (02:50 +0300)] 
lib-fs: Moved fs_write_stream_abort_parent() to fs-api-private.h

Only fs wrapper drivers are supposed to call it.

9 years agofs-randomfail: Fixed assert-crash in fs_write_stream_abort_error()
Timo Sirainen [Thu, 8 Sep 2016 23:48:45 +0000 (02:48 +0300)] 
fs-randomfail: Fixed assert-crash in fs_write_stream_abort_error()

9 years agolib-index: limit mail_index error prints to one per ioloop_time
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.

9 years agolib-test: test_expect_errors() now works for the entire log string, not just format...
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

9 years agoimap-hibernate: Increased imap-master communication timeout from 5s to 30s
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.

9 years agostats: Include PIDs in "Duplicate session ID" errors.
Timo Sirainen [Thu, 8 Sep 2016 22:08:59 +0000 (01:08 +0300)] 
stats: Include PIDs in "Duplicate session ID" errors.

9 years agolib-index: mail_index_modseq_get_next_log_offset() shouldn't return offset beyond...
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.

9 years agoimap-acl: acl plugin deinit returns 1 on non-empty
Aki Tuomi [Thu, 8 Sep 2016 20:00:56 +0000 (23:00 +0300)] 
imap-acl: acl plugin deinit returns 1 on non-empty

9 years agoacl: Deinit will return 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

9 years agolib: Allow static analyzers to check for t_pop() leaks.
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().

9 years agoconfigure: Added --enable-static-checker parameter
Timo Sirainen [Thu, 8 Sep 2016 18:31:25 +0000 (21:31 +0300)] 
configure: Added --enable-static-checker parameter

9 years agoimap: Avoid wrongly assert-crashing in client_check_command_hangs()
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)

9 years agostats plugin: Don't send any stats before CONNECT was successfully sent.
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

9 years agolib-stats: stats_connection_send() now returns whether it succeeded or not
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

9 years agodoveadm flags: Sync mailbox after committing transaction.
Timo Sirainen [Thu, 8 Sep 2016 13:50:02 +0000 (16:50 +0300)] 
doveadm flags: Sync mailbox after committing transaction.

9 years agoacl-plugin: Adjust to API changes
Aki Tuomi [Wed, 7 Sep 2016 13:45:09 +0000 (16:45 +0300)] 
acl-plugin: Adjust to API changes

9 years agolmtp: Always read settings before dropping privs
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.

9 years agoimap: Fixed assert-crash if un-hibernation failed to initialize user.
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)

9 years agofs-api: Retrieve errno before dest->copy_output is NULL'ed
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.

9 years agoacl-plugin: Whitespace fixes
Aki Tuomi [Sat, 3 Sep 2016 12:26:39 +0000 (15:26 +0300)] 
acl-plugin: Whitespace fixes

9 years agoacl-plugin: Deinit acl_iter on deinit too
Aki Tuomi [Sat, 3 Sep 2016 12:23:11 +0000 (15:23 +0300)] 
acl-plugin: Deinit acl_iter on deinit too

9 years agoacl-plugin: Make iterators more conforming
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.

9 years agolib-storage: Check that UID is set before caching
Aki Tuomi [Tue, 6 Sep 2016 06:24:06 +0000 (09:24 +0300)] 
lib-storage: Check that UID is set before caching

9 years agolib-imap-storage: Check that UID is assigned 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

9 years agozlib-plugin: Check that UID is assigned
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.

9 years agoquota: Flush quota after recalc
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.

9 years agolib-dcrypt: Avoid infinite loop if istream header is too large.
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)

9 years agodovecot.service.in: removed ExecStartPre and ExecStopPost default definitions
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

9 years agodcrypt: Test for stream prefetch
Aki Tuomi [Thu, 25 Aug 2016 09:27:51 +0000 (12:27 +0300)] 
dcrypt: Test for stream prefetch

9 years agodcrypt: Allow 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.

9 years agolib: If DEBUG is enabled, use a pointer type for data_stack_frame_t
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.

9 years agolib: Changed t_pop() API to make it a bit more like free()
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()

9 years agolib-master: master_service_init_finish() now verifies that t_pop() wasn't leaked
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

9 years agolib: Created data_stack_frame_t type for data_stack_frame
Timo Sirainen [Thu, 1 Sep 2016 05:31:14 +0000 (08:31 +0300)] 
lib: Created data_stack_frame_t type for data_stack_frame

9 years agolib: Small code cleanup to data-stack - use explicit data_stack_initialized
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.

9 years agolib: Minor t_push() optimization - use unlikely()
Timo Sirainen [Thu, 1 Sep 2016 05:11:46 +0000 (19:11 -1000)] 
lib: Minor t_push() optimization - use unlikely()

9 years agolib: var-expand: Removed var_expand_table_build().
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().

9 years agoFix control flow and T_BEGIN/T_END hygiene
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>
9 years agolib-fs: Do not abort parent of parent
Aki Tuomi [Wed, 31 Aug 2016 06:20:49 +0000 (09:20 +0300)] 
lib-fs: Do not abort parent of parent

9 years agoconfigure.ac: Forgot to invoke DOVECOT_WANT_VPOPMAIL.
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.

9 years agodoveadm-server: Reset error code between calls
Aki Tuomi [Sun, 28 Aug 2016 15:40:01 +0000 (18:40 +0300)] 
doveadm-server: Reset error code between calls

9 years agostats: Reset nearly all global mail stats
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.

9 years agostats: Fix user login counters
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.

9 years agoauth: GSSAPI mechanism: Fix CLang -Wstrict-bool warnings.
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.

9 years agolib-master: don't leak config path
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.

9 years agolib-fs: abort parent in fs_file_write_stream_abort_parent
Aki Tuomi [Tue, 23 Aug 2016 20:31:40 +0000 (23:31 +0300)] 
lib-fs: abort parent in fs_file_write_stream_abort_parent

9 years agoimap: Track how much time was spent on waiting for locks.
Timo Sirainen [Tue, 23 Aug 2016 10:06:09 +0000 (13:06 +0300)] 
imap: Track how much time was spent on waiting for locks.

9 years agodict-client: In slow query warnings, log time spent in ioloop and lock waits.
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).

9 years agolib: Track how much time has been spent on waiting for locks.
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.

9 years agolib-fts: Add missing include
Aki Tuomi [Tue, 23 Aug 2016 17:12:47 +0000 (20:12 +0300)] 
lib-fts: Add missing include

9 years agoimap: Fixed expunge handling when un-hiberanting
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

9 years agolib: Changed unlink_directory() API to return error string.
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.

9 years agoglobal: Added uchar_empty_ptr and use it instead of &uchar_nul.
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.

9 years agolib-fs: Fixes to previous fs_write_stream_abort*() changes.
Timo Sirainen [Tue, 23 Aug 2016 10:41:38 +0000 (13:41 +0300)] 
lib-fs: Fixes to previous fs_write_stream_abort*() changes.

9 years agolib-storage: Fixed istream-attachment-extractor error handling.
Timo Sirainen [Tue, 23 Aug 2016 10:40:50 +0000 (13:40 +0300)] 
lib-storage: Fixed istream-attachment-extractor error handling.

9 years agolib-mail: Clarify istream-attachment-extractor's error handling API usage.
Timo Sirainen [Tue, 23 Aug 2016 10:40:35 +0000 (13:40 +0300)] 
lib-mail: Clarify istream-attachment-extractor's error handling API usage.

9 years agolib-fs: Add fs_write_stream_abort_parent and use it
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.

9 years agolib-fs: Remove fs_write_stream_abort
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.

9 years agofs-api: Add and use fs_write_stream_abort_error
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.

9 years agolib-storage: Added mailbox_recent_flags_expunge_uid()
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.