]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
10 years agopush-notification: Log about unexpectedly failing mailbox functions.
Timo Sirainen [Sun, 27 Sep 2015 18:48:34 +0000 (21:48 +0300)] 
push-notification: Log about unexpectedly failing mailbox functions.
Found by Coverity.

10 years agoAdded NULL-check asserts to make static analyzer happier.
Timo Sirainen [Sun, 27 Sep 2015 18:42:17 +0000 (21:42 +0300)] 
Added NULL-check asserts to make static analyzer happier.
These shouldn't be happening.

10 years agolib-storage: Removed unnecessary code - nnode is never NULL at this point.
Timo Sirainen [Sun, 27 Sep 2015 18:34:48 +0000 (21:34 +0300)] 
lib-storage: Removed unnecessary code - nnode is never NULL at this point.
Found by Coverity.

10 years agodsync: Removed unnecessary code - cur_mail is never NULL at this point.
Timo Sirainen [Sun, 27 Sep 2015 18:33:30 +0000 (21:33 +0300)] 
dsync: Removed unnecessary code - cur_mail is never NULL at this point.
Found by Coverity.

10 years agoimapc: Fixed crash if imapc_host or imapc_password setting was missing.
Timo Sirainen [Sun, 27 Sep 2015 18:30:56 +0000 (21:30 +0300)] 
imapc: Fixed crash if imapc_host or imapc_password setting was missing.
Instead of giving a nice error message about it.
Found by Coverity.

10 years agodict-client: Avoid crash if server disconnects during transaction commit.
Timo Sirainen [Sun, 27 Sep 2015 18:28:25 +0000 (21:28 +0300)] 
dict-client: Avoid crash if server disconnects during transaction commit.
Found by Coverity.

10 years ago*-login: Session ID generator wasn't encoding remote port number correctly to it.
Timo Sirainen [Sun, 27 Sep 2015 18:25:59 +0000 (21:25 +0300)] 
*-login: Session ID generator wasn't encoding remote port number correctly to it.
The upper 8bits of the port number were always written as 0.
This could have lead to duplicate session ID strings in some rare cases.
Found by Coverity.

10 years agolib-http: Avoid compiler warnings in printf() strings.
Timo Sirainen [Sun, 27 Sep 2015 17:47:20 +0000 (20:47 +0300)] 
lib-http: Avoid compiler warnings in printf() strings.
Cast fields explicitly as long, which should be large enough.

10 years agoFixed compiler warnings in some systems.
Timo Sirainen [Sun, 27 Sep 2015 17:46:29 +0000 (20:46 +0300)] 
Fixed compiler warnings in some systems.
major() and minor() are unsigned ints nowadays, but in Solaris it's major_t.
Cast them explicitly to avoid compiler warnings, and use unsigned longs
instead of unsigned ints just in case.

10 years agoMake static analyzer happier.
Timo Sirainen [Sun, 27 Sep 2015 16:03:31 +0000 (19:03 +0300)] 
Make static analyzer happier.

10 years agolib-http: Removed "pure" attribute from http_header_field_find_unique().
Timo Sirainen [Sun, 27 Sep 2015 15:58:08 +0000 (18:58 +0300)] 
lib-http: Removed "pure" attribute from http_header_field_find_unique().
It's a bit questionable if returning a pointer via parameter is allowed for
a pure function. Also having this attribute seems to confuse clang static
analyzer, because it gives false positives for code using
http_header_field_find_unique(). It's not important for performance anyway,
so better to avoid using it.

10 years agodict-sql: If value isn't a hexblob as expected, log an error instead of killing the...
Timo Sirainen [Fri, 25 Sep 2015 15:16:56 +0000 (18:16 +0300)] 
dict-sql: If value isn't a hexblob as expected, log an error instead of killing the whole process.

10 years agocassandra: copy&paste mistake - use monotonic timestamp generator, not server side..
Timo Sirainen [Thu, 24 Sep 2015 17:58:04 +0000 (20:58 +0300)] 
cassandra: copy&paste mistake - use monotonic timestamp generator, not server side..

10 years agocassandra: Added "version" parameter to specify a protocol version.
Timo Sirainen [Thu, 24 Sep 2015 17:51:16 +0000 (20:51 +0300)] 
cassandra: Added "version" parameter to specify a protocol version.
Mainly to avoid warnings logged when connecting to an older Cassandra
server.

10 years agodoveconf: Don't if _password value is empty, don't hide it.
Timo Sirainen [Thu, 24 Sep 2015 17:28:51 +0000 (20:28 +0300)] 
doveconf: Don't if _password value is empty, don't hide it.

10 years agocassandra: Use a local monotonic timestamp generator.
Timo Sirainen [Thu, 24 Sep 2015 16:40:41 +0000 (19:40 +0300)] 
cassandra: Use a local monotonic timestamp generator.
Otherwise we run into race conditions on server side timestamps, which cause
problems.

10 years agovirtual plugin: Auto-close mailboxes by hooking into backend's mailbox_open()
Timo Sirainen [Thu, 24 Sep 2015 16:27:10 +0000 (19:27 +0300)] 
virtual plugin: Auto-close mailboxes by hooking into backend's mailbox_open()
This is a more reliable way of doing it. The earlier version had problems
that all the backend mailboxes could be opened when doing a search on the
virtual mailbox (for getting the GUID of the mailboxes).

10 years agovirtual plugin: Fixed assert-crash when closing a virtual mailbox consisting of many...
Timo Sirainen [Thu, 24 Sep 2015 16:07:12 +0000 (19:07 +0300)] 
virtual plugin: Fixed assert-crash when closing a virtual mailbox consisting of many real mailboxes.

10 years agodict-client: Verify that the correct transaction ID is returned for commit reply.
Timo Sirainen [Thu, 24 Sep 2015 15:42:58 +0000 (18:42 +0300)] 
dict-client: Verify that the correct transaction ID is returned for commit reply.

10 years agoquota: Avoid triggering quota recalc in dict transaction commit callback.
Timo Sirainen [Thu, 24 Sep 2015 15:41:48 +0000 (18:41 +0300)] 
quota: Avoid triggering quota recalc in dict transaction commit callback.
This mainly causes trouble if it again does more dict accesses.

10 years agopgsql: Avoid crash in multi-command transaction if one of the queries couldn't be...
Timo Sirainen [Thu, 24 Sep 2015 13:41:10 +0000 (16:41 +0300)] 
pgsql: Avoid crash in multi-command transaction if one of the queries couldn't be sent to server.

10 years agoindexer: Use a slightly different session ID than the session that requested indexing.
Timo Sirainen [Thu, 24 Sep 2015 13:30:23 +0000 (16:30 +0300)] 
indexer: Use a slightly different session ID than the session that requested indexing.
Required to avoid "duplicate session ID" errors in stats process.

Alternative would have been to change the stats protocol a bit and always
send the service name along with session ID, and use those two together as
the primary key. Maybe this could be done in future if we get more of these
kind of processes.

10 years agodoveconf: Unless -P parameter is used, hide all keys ending with "_password"
Timo Sirainen [Thu, 24 Sep 2015 13:16:43 +0000 (16:16 +0300)] 
doveconf: Unless -P parameter is used, hide all keys ending with "_password"
A little bit ugly way, but implementing a proper SET_PASSWORD type was
getting too difficult with the current config code. Then again as a bonus
this also hides plugin { *_password } settings, if there are any, which
wouldn't have been possible with SET_PASSWORD.

10 years agolib: Fixed __builtin_object_size() usage in buffer.h
Timo Sirainen [Thu, 24 Sep 2015 12:19:53 +0000 (15:19 +0300)] 
lib: Fixed __builtin_object_size() usage in buffer.h
With type=3 size for unknown objects is set to 0, which causes a compiler
failure. With type=1 it's (size_t)-1, which passes the check.

10 years agoDon't try to pass through void function's return value
Timo Sirainen [Thu, 24 Sep 2015 09:32:24 +0000 (12:32 +0300)] 
Don't try to pass through void function's return value
I wish gcc or clang complained about these.

10 years agopush-notification: Added missing newlines to end of files to prevent compiler warnings.
Timo Sirainen [Thu, 24 Sep 2015 07:11:29 +0000 (10:11 +0300)] 
push-notification: Added missing newlines to end of files to prevent compiler warnings.

10 years agomaster: stdlib.h wasn't supposed to be removed from systemd's sd-daemon.c
Timo Sirainen [Wed, 23 Sep 2015 22:13:36 +0000 (01:13 +0300)] 
master: stdlib.h wasn't supposed to be removed from systemd's sd-daemon.c
It's not using our lib.h

10 years agopgsql: Fixed committing a single sql_update_get_rows() transaction.
Timo Sirainen [Wed, 23 Sep 2015 22:04:00 +0000 (01:04 +0300)] 
pgsql: Fixed committing a single sql_update_get_rows() transaction.
The rows weren't being set.

10 years agopgsql: Fixed committing multiple transactions.
Timo Sirainen [Wed, 23 Sep 2015 22:02:32 +0000 (01:02 +0300)] 
pgsql: Fixed committing multiple transactions.
This code is quite horrible and could use a larger redesign. But it appears
to be working for now..

10 years agolib-sql: sqlpool needs to change transaction queries' transaction pointer
Timo Sirainen [Wed, 23 Sep 2015 22:00:45 +0000 (01:00 +0300)] 
lib-sql: sqlpool needs to change transaction queries' transaction pointer
Otherwise query->trans points to the sqlpool's transaction, while our
backends want it to point to the backend's transaction.

10 years agodict: Include PID in the log prefix.
Timo Sirainen [Wed, 23 Sep 2015 20:01:27 +0000 (23:01 +0300)] 
dict: Include PID in the log prefix.

10 years agodict-client: Improved broken iterate reply logging.
Timo Sirainen [Wed, 23 Sep 2015 20:00:30 +0000 (23:00 +0300)] 
dict-client: Improved broken iterate reply logging.

10 years agodict-client: If dict iteration was aborted, the rest of the connection state became...
Timo Sirainen [Wed, 23 Sep 2015 19:59:55 +0000 (22:59 +0300)] 
dict-client: If dict iteration was aborted, the rest of the connection state became broken.
We never continued skipping over the rest of the iteration, instead the
iteration replies were treated as replies to the following commands.

10 years agodict-client: Catch more invalid protocol replies.
Timo Sirainen [Wed, 23 Sep 2015 19:57:55 +0000 (22:57 +0300)] 
dict-client: Catch more invalid protocol replies.

10 years agodict-client: Disconnect from server on unexpected errors.
Timo Sirainen [Wed, 23 Sep 2015 19:49:41 +0000 (22:49 +0300)] 
dict-client: Disconnect from server on unexpected errors.

10 years agoAdded signature for changeset 60057d955db3
Timo Sirainen [Wed, 23 Sep 2015 13:10:27 +0000 (16:10 +0300)] 
Added signature for changeset 60057d955db3

10 years agoAdded tag 2.2.19.rc1 for changeset 60057d955db3
Timo Sirainen [Wed, 23 Sep 2015 13:10:24 +0000 (16:10 +0300)] 
Added tag 2.2.19.rc1 for changeset 60057d955db3

10 years agoReleased v2.2.19.rc1. 2.2.19.rc1
Timo Sirainen [Wed, 23 Sep 2015 13:10:24 +0000 (16:10 +0300)] 
Released v2.2.19.rc1.

10 years agovirtual: The virtual index may have sometimes been unnecessarily deleted.
Timo Sirainen [Wed, 23 Sep 2015 13:09:47 +0000 (16:09 +0300)] 
virtual: The virtual index may have sometimes been unnecessarily deleted.
Due to uninitialized broken_r value.

10 years agoexample-config: Added imap_hibernate_timeout
Timo Sirainen [Wed, 23 Sep 2015 13:08:33 +0000 (16:08 +0300)] 
example-config: Added imap_hibernate_timeout

10 years agoRemove now-unnecessary direct stdlib.h #includes.
Teemu Huovila [Wed, 23 Sep 2015 11:52:45 +0000 (14:52 +0300)] 
Remove now-unnecessary direct stdlib.h #includes.

10 years agolib: Include stdlib.h in lib.h.
Teemu Huovila [Wed, 23 Sep 2015 11:52:44 +0000 (14:52 +0300)] 
lib: Include stdlib.h in lib.h.
It's already included in so many files that we might as well include it in
lib.h for everything. This is especially needed to be able to use sort.h,
which currently is included in lib.h anyway.

10 years agoAdded push-notification plugin
Michael M Slusarz [Wed, 23 Sep 2015 04:33:41 +0000 (22:33 -0600)] 
Added push-notification plugin

10 years agolib-http: client: Tunneled https peer addresses were not compared properly.
Stephan Bosch [Tue, 22 Sep 2015 18:16:51 +0000 (21:16 +0300)] 
lib-http: client: Tunneled https peer addresses were not compared properly.
The https_name field was ignored in that case.

10 years agolib-http: client: Fixed bug that caused queues to be duplicated over time when host...
Stephan Bosch [Tue, 22 Sep 2015 18:16:34 +0000 (21:16 +0300)] 
lib-http: client: Fixed bug that caused queues to be duplicated over time when host has multiple IPs.
The peer address comparison did not account for the fact that the initial
queue address has no IP assigned.

10 years agolib-http: client: Improved hash function for peer addresses.
Stephan Bosch [Tue, 22 Sep 2015 18:15:45 +0000 (21:15 +0300)] 
lib-http: client: Improved hash function for peer addresses.

10 years agolib-storage: If stats plugin is enabled, set fs_settings.enable_timings=TRUE.
Timo Sirainen [Tue, 22 Sep 2015 13:40:58 +0000 (16:40 +0300)] 
lib-storage: If stats plugin is enabled, set fs_settings.enable_timings=TRUE.

10 years agolib-fs: debug and enable_timing settings weren't being permanently copied to fs->set
Timo Sirainen [Tue, 22 Sep 2015 13:38:59 +0000 (16:38 +0300)] 
lib-fs: debug and enable_timing settings weren't being permanently copied to fs->set

10 years agolib: Added timing_get_sum()
Timo Sirainen [Tue, 22 Sep 2015 13:09:41 +0000 (16:09 +0300)] 
lib: Added timing_get_sum()

10 years agoimap: Fix typo in error message.
Teemu Huovila [Tue, 22 Sep 2015 11:33:33 +0000 (14:33 +0300)] 
imap: Fix typo in error message.

10 years agoauth: Remove redundant if
Teemu Huovila [Tue, 22 Sep 2015 11:32:51 +0000 (14:32 +0300)] 
auth: Remove redundant if

10 years agoMake static analyzer happier.
Timo Sirainen [Tue, 22 Sep 2015 11:26:25 +0000 (14:26 +0300)] 
Make static analyzer happier.

10 years agoquota: Make sure the limit return value is initialized when quota_get_resource()...
Timo Sirainen [Tue, 22 Sep 2015 11:26:08 +0000 (14:26 +0300)] 
quota: Make sure the limit return value is initialized when quota_get_resource() returns 0
Later on a debug log message in quota_over_flag_check_root() was accessing
the limit, which wasn't necessarily initialized.

Also initialized value return value just as well to be safe.

10 years agolib-master: Slightly improved "process_limit reached?" error message.
Timo Sirainen [Tue, 22 Sep 2015 10:53:47 +0000 (13:53 +0300)] 
lib-master: Slightly improved "process_limit reached?" error message.

10 years agovirtual plugin: Disable caching via mailbox list indexes.
Timo Sirainen [Tue, 22 Sep 2015 10:50:08 +0000 (13:50 +0300)] 
virtual plugin: Disable caching via mailbox list indexes.
Otherwise e.g. STATUS can give stale replies.

10 years agolib-http: Optimized http_client_request_send_payload() fix
Timo Sirainen [Mon, 21 Sep 2015 22:05:09 +0000 (01:05 +0300)] 
lib-http: Optimized http_client_request_send_payload() fix
Badly copy&pasted my original fix, instead of noticing that Stephan's fix
was slightly different. Probably shouldn't have made actual difference
other than for performance.

10 years agolib-http: Avoid crashes on failing http_client_request_send_payload() calls
Timo Sirainen [Mon, 21 Sep 2015 21:55:15 +0000 (00:55 +0300)] 
lib-http: Avoid crashes on failing http_client_request_send_payload() calls
It HTTP server connection died, ioloop might not have anything to do
anymore:

Panic: file ioloop-epoll.c: line 187 (io_loop_handler_run_internal): assertion failed: (msecs >= 0)

10 years agoMakefile: Added missing sort.h
Timo Sirainen [Mon, 21 Sep 2015 21:40:14 +0000 (00:40 +0300)] 
Makefile: Added missing sort.h

10 years agolib: timings - added quantiles
Phil Carmody [Mon, 21 Sep 2015 16:52:32 +0000 (19:52 +0300)] 
lib: timings - added quantiles
Just sub-sample the stream. On the assumption that the samples come from
one distribution, then any randomly selected subset will share the same
distribution. Therefore the quantiles should be at approximately the same
value.

However, that's a big assumption, as there will almost certainly be time
dependency, and periodicity (24hrs, 7 days).

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib: extract sort-helpers into separate sort.h file
Phil Carmody [Mon, 21 Sep 2015 16:51:05 +0000 (19:51 +0300)] 
lib: extract sort-helpers into separate sort.h file
The macro definition was nothing to do with strings, and we can put
trivial common-type comparators here. They didn't need to be static
inline, as they can never be inlined anyway, being only used via
function pointers, but that preserves the closest equivalent to
the current code.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib-storage: Forgot to add index-mailbox-size.h to e29d2f7fe53f
Timo Sirainen [Mon, 21 Sep 2015 14:03:19 +0000 (17:03 +0300)] 
lib-storage: Forgot to add index-mailbox-size.h to e29d2f7fe53f

10 years agofts: Send session ID to indexer and indexer-worker for logging purposes.
Timo Sirainen [Mon, 21 Sep 2015 14:01:05 +0000 (17:01 +0300)] 
fts: Send session ID to indexer and indexer-worker for logging purposes.

10 years agoquota: Added "count" backend, which simply sums up mailboxes' vsizes.
Timo Sirainen [Mon, 21 Sep 2015 13:36:05 +0000 (16:36 +0300)] 
quota: Added "count" backend, which simply sums up mailboxes' vsizes.
In a way this is similar to the simple "dirsize" backend, but much more
efficient. As long as mailbox_list_index=yes, the quota can typically be
looked up only by reading the dovecot.list.index* files.

This backend enforces using quota_vsizes=yes setting to keep the performance
good, because physical sizes don't have a similar optimized vsize header.
There's also no especially good reason why this backend should support
physical sizes - they were originally mainly used to allow quickly stat()ing
Maildir files.

10 years agolib-storage: Update mailbox vsize header on save/copy/expunge.
Timo Sirainen [Mon, 21 Sep 2015 13:32:27 +0000 (16:32 +0300)] 
lib-storage: Update mailbox vsize header on save/copy/expunge.
This allows always efficiently looking up maiboxes' vsizes after they're
initially calculated.

The expunge handling is unfortunately done currently in quota handling code,
so it works only if quota is enabled. Ideally this would be solved in v2.3
with some lib-storage core changes.

10 years agoquota: Added quota_vsizes=yes setting to count quotas using virtual sizes instead...
Timo Sirainen [Mon, 21 Sep 2015 13:24:30 +0000 (16:24 +0300)] 
quota: Added quota_vsizes=yes setting to count quotas using virtual sizes instead of physical sizes.
This doesn't work with all the quota backends.

10 years agoquota: Commit expunge transaction instead of rolling back.
Timo Sirainen [Mon, 21 Sep 2015 13:12:43 +0000 (16:12 +0300)] 
quota: Commit expunge transaction instead of rolling back.
This likely won't make much of a difference, since it should have accessed
only expunged mails. But it's a bit cleaner this way.

10 years agoquota: Code cleanup - extract default init() handling to quota_root_default_init()
Timo Sirainen [Mon, 21 Sep 2015 13:09:37 +0000 (16:09 +0300)] 
quota: Code cleanup - extract default init() handling to quota_root_default_init()

10 years agoimap: If client disconnects, log the in-progress commands' input/output bytes.
Timo Sirainen [Mon, 21 Sep 2015 12:41:49 +0000 (15:41 +0300)] 
imap: If client disconnects, log the in-progress commands' input/output bytes.

10 years agoimap: If client disconnects, log how long the in-progress commands were running.
Timo Sirainen [Mon, 21 Sep 2015 12:32:02 +0000 (15:32 +0300)] 
imap: If client disconnects, log how long the in-progress commands were running.

10 years agoCompiler warning fix.
Timo Sirainen [Mon, 21 Sep 2015 11:18:51 +0000 (14:18 +0300)] 
Compiler warning fix.

10 years agoimap: Improved command timing information reporting.
Timo Sirainen [Mon, 21 Sep 2015 11:02:47 +0000 (14:02 +0300)] 
imap: Improved command timing information reporting.
We now report also the time we spent waiting on ioloop. Also fixed reporting
command timing information when multiple commands were running in parallel
(e.g. SEARCH + FETCH). If multiple commands are running in parallel they all
report the same ioloop wait time, because there's no easy way to know which
one of them caused the wait.

10 years agolib: Added io_loop_get_wait_usecs()
Timo Sirainen [Mon, 21 Sep 2015 10:59:41 +0000 (13:59 +0300)] 
lib: Added io_loop_get_wait_usecs()

10 years agoimap: When running SEARCH on "background", run it through command_exec()
Timo Sirainen [Mon, 21 Sep 2015 10:59:22 +0000 (13:59 +0300)] 
imap: When running SEARCH on "background", run it through command_exec()
Otherwise all the timing information isn't right and the pre/post hooks
weren't being called so stats counting was also wrong.

10 years agolib-index: Added mail_index_sync_have_any_expunges()
Timo Sirainen [Sun, 20 Sep 2015 19:25:11 +0000 (22:25 +0300)] 
lib-index: Added mail_index_sync_have_any_expunges()
This can be used to quickly check before mail_index_sync_begin() if there
are likely to be any expunges that will be synced.

10 years agoauth: The mechanisms configured using the auth_mechanisms setting were not enforced.
Stephan Bosch [Sun, 20 Sep 2015 18:49:51 +0000 (21:49 +0300)] 
auth: The mechanisms configured using the auth_mechanisms setting were not enforced.
The login service would check whether the mechanism is supported by auth,
but auth performed no such check of its own. This means that any
implemented mechanism was accessible from a login, even though was
presumably disabled.

10 years agolib: file_wait_lock*(): Improve the panic log message on EDEADLOCK.
Timo Sirainen [Sat, 19 Sep 2015 22:04:50 +0000 (01:04 +0300)] 
lib: file_wait_lock*(): Improve the panic log message on EDEADLOCK.

10 years agolib-fs: Fixed compiling with some OSes
Timo Sirainen [Wed, 16 Sep 2015 22:33:22 +0000 (07:33 +0900)] 
lib-fs: Fixed compiling with some OSes

10 years agolib-fs: timing_deinit()s was called too late - fs was already freed.
Timo Sirainen [Wed, 16 Sep 2015 22:33:01 +0000 (07:33 +0900)] 
lib-fs: timing_deinit()s was called too late - fs was already freed.

10 years agocassandra: With debugging, log also how many rows were iterated.
Timo Sirainen [Wed, 16 Sep 2015 22:26:49 +0000 (07:26 +0900)] 
cassandra: With debugging, log also how many rows were iterated.

10 years agocassandra: With debugging, log also how long result was used for before it was freed.
Timo Sirainen [Wed, 16 Sep 2015 22:24:28 +0000 (07:24 +0900)] 
cassandra: With debugging, log also how long result was used for before it was freed.
This includes the time spent on SELECT query's iterator.

10 years agocassandra: Don't crash if connection to Cassandra failed.
Timo Sirainen [Wed, 16 Sep 2015 22:20:32 +0000 (07:20 +0900)] 
cassandra: Don't crash if connection to Cassandra failed.

10 years agocassandra: If log_level=debug, log also how long the queries take.
Timo Sirainen [Wed, 16 Sep 2015 22:07:57 +0000 (07:07 +0900)] 
cassandra: If log_level=debug, log also how long the queries take.

10 years agolib: file_wait_lock_error() assert-crashes now on EDEADLOCK
Timo Sirainen [Wed, 16 Sep 2015 01:46:44 +0000 (10:46 +0900)] 
lib: file_wait_lock_error() assert-crashes now on EDEADLOCK
It's always a bug and a crash can help debug it.

10 years agolib-fs: Track operation timing statistics if enable_timing setting is set.
Timo Sirainen [Tue, 15 Sep 2015 20:01:40 +0000 (05:01 +0900)] 
lib-fs: Track operation timing statistics if enable_timing setting is set.

10 years agolib: Added a simple timing.h API for tracking min/max/avg for events.
Timo Sirainen [Tue, 15 Sep 2015 19:44:37 +0000 (04:44 +0900)] 
lib: Added a simple timing.h API for tracking min/max/avg for events.

10 years agocassandra: Added delete_consistency parameter.
Timo Sirainen [Tue, 15 Sep 2015 06:20:08 +0000 (15:20 +0900)] 
cassandra: Added delete_consistency parameter.

10 years agolib: file_create_locked() may have leaked memory on some race conditions.
Timo Sirainen [Sun, 13 Sep 2015 13:42:32 +0000 (16:42 +0300)] 
lib: file_create_locked() may have leaked memory on some race conditions.

10 years agodoveadm mailbox metadata list: Fixed not giving the prefix parameter.
Timo Sirainen [Sat, 12 Sep 2015 10:00:58 +0000 (13:00 +0300)] 
doveadm mailbox metadata list: Fixed not giving the prefix parameter.

10 years agodoveadm mailbox attribute list: Prefix parameter was ignored.
Timo Sirainen [Fri, 11 Sep 2015 11:02:21 +0000 (14:02 +0300)] 
doveadm mailbox attribute list: Prefix parameter was ignored.

10 years agolib-storage: Fixed iterating attribute prefix that matched the attribute itself.
Timo Sirainen [Fri, 11 Sep 2015 11:02:01 +0000 (14:02 +0300)] 
lib-storage: Fixed iterating attribute prefix that matched the attribute itself.
So if attribute key was "foo", iterating "foo" returned garbage because it
skipped over the trailing \0.

10 years agomaster: systemd's sd_listen_fds() error handling was wrong.
Timo Sirainen [Thu, 10 Sep 2015 22:20:28 +0000 (01:20 +0300)] 
master: systemd's sd_listen_fds() error handling was wrong.

10 years agolib-storage: Fixed crash in mailbox list index notifying caused by fa979ccfa34c
Timo Sirainen [Wed, 9 Sep 2015 08:31:41 +0000 (11:31 +0300)] 
lib-storage: Fixed crash in mailbox list index notifying caused by fa979ccfa34c

10 years agolib: test-strnum - do not invite undetectable errors
Phil Carmody [Tue, 8 Sep 2015 16:28:31 +0000 (19:28 +0300)] 
lib: test-strnum - do not invite undetectable errors
The very numbers which could cause a broken parser to over-run, the ones we
are testing, are the ones which will be parsed as having a value similar to
'value', so check that no value was returned by using a number completely
dissimilar to that. Otherwise, there might be an accidental mis-parse that
overwrote value, but left its value the same.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib-storage: Replaced some unlink()s with i_unlink*()s where we could.
Timo Sirainen [Tue, 8 Sep 2015 16:12:26 +0000 (19:12 +0300)] 
lib-storage: Replaced some unlink()s with i_unlink*()s where we could.
This changes some mail_storage_set_critical() calls to i_error()s, but
because these unlink() failures don't actually fail the operation it doesn't
matter.

10 years agolib-index: Replaced some unlink()s with i_unlink*()s where we could.
Timo Sirainen [Tue, 8 Sep 2015 16:11:45 +0000 (19:11 +0300)] 
lib-index: Replaced some unlink()s with i_unlink*()s where we could.
This changes some mail_index_set_error() calls to i_error()s, but because
these unlink() failures don't actually fail the operation it doesn't matter.
In fact it may be even better that it doesn't overwrite the existing
index->error if it exists.

10 years agoReplaced unlink() calls with i_unlink*() wherever possible.
Timo Sirainen [Tue, 8 Sep 2015 16:07:02 +0000 (19:07 +0300)] 
Replaced unlink() calls with i_unlink*() wherever possible.

10 years agolib: Added i_unlink() and i_unlink_if_exists()
Timo Sirainen [Tue, 8 Sep 2015 15:49:00 +0000 (18:49 +0300)] 
lib: Added i_unlink() and i_unlink_if_exists()
These log the error message on a failed unlink(). They also include the
source code file and line number to make it easier to find which unlink()
actually failed if the path itself doesn't already clearly identify it.
This can be especially useful if the path is (null), "" or contains some
corrupted garbage.

10 years agolib-storage: Mailbox deletion shouldn't fail when trying to delete read-only attributes.
Timo Sirainen [Tue, 8 Sep 2015 15:45:57 +0000 (18:45 +0300)] 
lib-storage: Mailbox deletion shouldn't fail when trying to delete read-only attributes.

10 years agolib-storage: Use MAIL_ERROR_NOTPOSSIBLE if mailbox_attribute_*set() fails for read...
Timo Sirainen [Tue, 8 Sep 2015 15:45:28 +0000 (18:45 +0300)] 
lib-storage: Use MAIL_ERROR_NOTPOSSIBLE if mailbox_attribute_*set() fails for read-only attribute.
MAIL_ERROR_PARAMS indicates that there was something wrong with the
parameters itself. But the caller can't know (at least with current APIs)
if it's a read-only attribute it's trying to change before actually doing it.

10 years agolib-storage: If mail_attribute_dict is set, ignore non-authority rank internal attrib...
Timo Sirainen [Tue, 8 Sep 2015 10:41:21 +0000 (13:41 +0300)] 
lib-storage: If mail_attribute_dict is set, ignore non-authority rank internal attributes.
This way dsync can still sync things like Sieve scripts, but it doesn't
attempt to sync anything that actually requires dict.