]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Mon, 17 Oct 2016 16:38:07 +0000 (19:38 +0300)]
auth-policy: Use request's pool instead of new pool
This fixes existing memory leak in auth_report,
which is caused by using separate memory pool
instead of request's pool.
Thank you for Andrea Carpani for extensive
debugging.
Timo Sirainen [Sun, 16 Oct 2016 19:58:07 +0000 (22:58 +0300)]
dict-sql: Use LIMIT in SQL queries with dict_iterate_set_limit()
Timo Sirainen [Sun, 16 Oct 2016 19:40:18 +0000 (22:40 +0300)]
lib-dict: Added dict_iterate_set_limit()
Aki Tuomi [Mon, 17 Oct 2016 16:21:34 +0000 (19:21 +0300)]
lib-dict: Duplicate result value in mempool
Duplicate the result value already in callback
to avoid it getting lost during async calls.
Reported & tested by Pierre Jaury.
Timo Sirainen [Tue, 18 Oct 2016 07:45:05 +0000 (10:45 +0300)]
lib-fs: Fixed fs_metadata_find() to actually work
Timo Sirainen [Mon, 17 Oct 2016 20:06:48 +0000 (23:06 +0300)]
lib-mail: Fixed infinite loop in istream-attachment-extractor
Broken by
7f74811b7 . Pretty much any larger attachment going through
this istream had a good potential of going into an infinite loop.
Timo Sirainen [Mon, 17 Oct 2016 07:59:34 +0000 (10:59 +0300)]
lib-fs: Added FS_METADATA_WRITE_FNAME to allow renaming a file being written.
Timo Sirainen [Mon, 10 Oct 2016 22:04:39 +0000 (01:04 +0300)]
lib-fs: Added internal fs_metadata_find() helper function
Timo Sirainen [Mon, 10 Oct 2016 21:46:59 +0000 (00:46 +0300)]
lib-fs: Optimize changing FS_METADATA_INTERNAL_PREFIX metadata.
file->metadata_changed doesn't need to change in that situation. It's used
by fs-metawrap to find out if it needs to rewrite metadata during a write,
but internal metadata isn't written to its header.
Timo Sirainen [Mon, 17 Oct 2016 09:41:33 +0000 (12:41 +0300)]
sdbox: Removed duplicated code.
Martti Rannanjärvi [Mon, 17 Oct 2016 07:36:17 +0000 (10:36 +0300)]
lib-dcrypt: change unit test ec curve to secp521r1
This curve is more common, so unit tests will pass on more machines.
Timo Sirainen [Mon, 17 Oct 2016 06:13:39 +0000 (09:13 +0300)]
lib-fs: Lazily initialize timings to save memory.
Aki Tuomi [Fri, 14 Oct 2016 14:13:23 +0000 (17:13 +0300)]
lib-storage: Use MAILDIR_INFO_SEP_S
Replace hardcoded : with MAILDIR_INFO_SEP_S
Aki Tuomi [Fri, 14 Oct 2016 12:28:32 +0000 (15:28 +0300)]
lib-dcrypt: Fix uninitialized memory
Martti Rannanjärvi [Fri, 14 Oct 2016 10:48:41 +0000 (13:48 +0300)]
lib-dcrypt: str_new to t_str_new in some test-crypto tests
str_new from default_pool was not properly freed.
Martti Rannanjärvi [Thu, 13 Oct 2016 20:38:36 +0000 (23:38 +0300)]
lib-dcrypt: enc_key and pw must be NULL on storing unencrypted private key
Add tests for password and key encryption, and get_info on them. Also
give examples of valid cipher values for password and key encryption in
dcrypt.h comment.
Martti Rannanjärvi [Wed, 12 Oct 2016 18:29:51 +0000 (21:29 +0300)]
lib-dcrypt: fix comment of dovecot format v2 to use colon
Version 2 field separator was changed to colon.
Timo Sirainen [Mon, 10 Oct 2016 17:35:17 +0000 (20:35 +0300)]
auth: Compiler warning fix
Stephan Bosch [Sun, 2 Oct 2016 12:14:48 +0000 (14:14 +0200)]
lib: uri-util: Always fully check the syntax of percent encoding while parsing URI components.
Stephan Bosch [Sun, 8 May 2016 20:56:59 +0000 (22:56 +0200)]
uri-util: Added public function for parsing single percent encoding instances.
Stephan Bosch [Sat, 20 Feb 2016 17:47:58 +0000 (19:47 +0200)]
uri-util: Fixed assertion failure for invalid character in path segment.
Aki Tuomi [Fri, 14 Oct 2016 06:49:16 +0000 (09:49 +0300)]
lib-index: unlink_directory has no error
Aki Tuomi [Fri, 14 Oct 2016 06:48:43 +0000 (09:48 +0300)]
imap-hibernate: Adjust API usage for ostream
Aki Tuomi [Fri, 14 Oct 2016 06:45:11 +0000 (09:45 +0300)]
Revert "uri-util: Fixed assertion failure for invalid character in path segment."
This reverts commit
dbbdcc1224f81a40e746a09e6d44af7c4f24ff71 .
Aki Tuomi [Fri, 14 Oct 2016 06:45:09 +0000 (09:45 +0300)]
Revert "lib: uri-util: Always fully check the syntax of percent encoding while parsing URI components."
This reverts commit
5b6dc4c53617362baf8713815621bebbeb38c8cc .
Timo Sirainen [Wed, 18 May 2016 14:45:09 +0000 (17:45 +0300)]
lib: Don't set ostream buffer as blocking
Timo Sirainen [Mon, 16 May 2016 16:33:40 +0000 (19:33 +0300)]
lib: Added ostream.blocking boolean
Similar to istream.blocking.
Stephan Bosch [Sat, 30 Apr 2016 12:10:59 +0000 (14:10 +0200)]
lib: ostream-file: Allow creating derived file output streams.
Stephan Bosch [Sat, 30 Apr 2016 11:55:52 +0000 (13:55 +0200)]
lib: ostream-file: Split o_stream_file_writev() from o_stream_file_writev_full().
Stephan Bosch [Sat, 30 Apr 2016 11:51:59 +0000 (13:51 +0200)]
lib: ostream-file: Renamed o_stream_writev() to o_stream_file_writev_full().
Stephan Bosch [Sat, 30 Apr 2016 11:29:47 +0000 (13:29 +0200)]
lib: ostream-file: Renamed iov_size to iov_count everywhere and made it unsigned int for consistency.
Aki Tuomi [Wed, 12 Oct 2016 09:04:10 +0000 (12:04 +0300)]
auth: Pass userdb fields to worker
If this is not done, then those userdb handlers
that need access to userdb variables for e.g.
interpolation, cannot access them.
Timo Sirainen [Tue, 11 Oct 2016 10:18:53 +0000 (13:18 +0300)]
auth: Don't re-insert userdb results from auth cache data back to cache.
This was also breaking TTLs for the cached userdb results, because each
re-insert reset the TTL.
Timo Sirainen [Mon, 10 Oct 2016 18:22:15 +0000 (21:22 +0300)]
lib-program-client: Fixed potential panic in test-program-client-local
If the run finished before io_loop_run(), it would panic with:
Panic: BUG: No IOs or timeouts set. Not waiting for infinity.
Timo Sirainen [Mon, 10 Oct 2016 18:19:34 +0000 (21:19 +0300)]
lib-program-client: Fixed program_client_run() that succeeds rapidly.
program_client_run_async() could have called the callback with result=0
before io_loop_run(). This happened with local client.
Fixes in test-program-client-local:
Panic: BUG: No IOs or timeouts set. Not waiting for infinity.
Timo Sirainen [Mon, 10 Oct 2016 20:53:55 +0000 (23:53 +0300)]
fs-metawrap: Don't assert-crash when trying to write an empty file.
Fixes:
Panic: file fs-metawrap.c: line 401 (fs_metawrap_write_stream_finish): assertion failed: (file->super_output->offset > 0 || file->super_output->stream_errno != 0)
Timo Sirainen [Mon, 10 Oct 2016 21:31:17 +0000 (00:31 +0300)]
lib-fs: Renamed internal i_stream_mail_read() to i_stream_fs_stats_read()
Just to make backtraces look clearer. Originally forgot to change this
after copy&pasting code from istream-mail.c
Timo Sirainen [Mon, 10 Oct 2016 17:58:53 +0000 (20:58 +0300)]
lib-program-client: Fixed running test-program-client-local as root.
uid/gid == -1 isn't treated as "don't change" in here.
Matwey V. Kornilov [Wed, 21 Sep 2016 07:55:47 +0000 (10:55 +0300)]
auth: Fix default SASL bind for LDAP
User may configure Dovecot to use SASL bind as default bind method. This can
be the case when ldapi:/// (or ldaps:///) with SASL EXTERNAL is used.
Currently, Dovecot returns LDAP connection to wrong bind state after first
successful auth bind, LDAP simple bind always used to rebind. This may broke
setup when ACL in LDAP configured not to allow search/bind for such simple
bind.
Matwey V. Kornilov [Wed, 21 Sep 2016 07:50:02 +0000 (10:50 +0300)]
auth: Introduce db_ldap_bind_sasl() function
Do refactoring in db_ldap_connect() before fixing the SASL bind issue in the next commit.
Timo Sirainen [Thu, 6 Oct 2016 12:22:13 +0000 (15:22 +0300)]
doveadm director kick: Added -f <passdb field> parameter.
This works for all the user_* passdb fields.
Timo Sirainen [Thu, 6 Oct 2016 12:19:51 +0000 (15:19 +0300)]
doveadm director kick: Escape username properly.
This only mattered if the username contained \001, TAB or LF characters,
which isn't normal.
Timo Sirainen [Thu, 6 Oct 2016 12:13:30 +0000 (15:13 +0300)]
director: Escape username when handling USER-KICK.
This could have caused problems if username parameter contained TABs or LFs,
which of course shouldn't normally happen.
Timo Sirainen [Thu, 6 Oct 2016 11:54:51 +0000 (14:54 +0300)]
doveadm proxy kick: Support multiple user parameters.
Timo Sirainen [Thu, 6 Oct 2016 11:53:11 +0000 (14:53 +0300)]
doveadm proxy kick: Added -f <passdb field> parameter.
This works for all the user_* passdb fields.
Timo Sirainen [Thu, 6 Oct 2016 11:38:04 +0000 (14:38 +0300)]
doveadm proxy list: Show all user_* fields in output.
Timo Sirainen [Wed, 5 Oct 2016 20:22:56 +0000 (23:22 +0300)]
*-login: Store user_* passdb fields to client->alt_usernames.
Timo Sirainen [Mon, 10 Oct 2016 14:37:27 +0000 (17:37 +0300)]
last-login: Don't execute last_login on IMAP unhibernation.
Timo Sirainen [Mon, 10 Oct 2016 14:19:32 +0000 (17:19 +0300)]
quota: Don't execute quota_over_script if userdb lookup was over 10 secs ago
Timo Sirainen [Mon, 10 Oct 2016 14:19:16 +0000 (17:19 +0300)]
imap-hibernate: Preserve mail_user.session_create_time through hibernation
Timo Sirainen [Mon, 10 Oct 2016 14:19:06 +0000 (17:19 +0300)]
lib-storage: Added mail_user.session_create_time and .session_restored
Aki Tuomi [Thu, 6 Oct 2016 11:54:24 +0000 (14:54 +0300)]
imap-hibernate: Properly fix hibernation
The previous fix did not properly fix hibernation
as the clients still dropped out of hibernate.
Also the tag used was no longer following. This
change will track tag changes and keeps the
hibernation process going on until the user enters
something else than DONE\r\ntag IDLE\r\n in same
packet.
Timo Sirainen [Mon, 10 Oct 2016 10:40:41 +0000 (13:40 +0300)]
cassandra: Added latency_aware_routing connect-parameter.
There's currently no way to change the default settings for it.
Timo Sirainen [Mon, 10 Oct 2016 10:59:57 +0000 (13:59 +0300)]
lmtp: Handle lmtp_user_concurrency_limit before lmtp_rcpt_check_quota
The quota lookup is more expensive, so it shouldn't be done unnecessarily.
Aki Tuomi [Mon, 10 Oct 2016 07:37:24 +0000 (10:37 +0300)]
doveadm-sync: Document end-date flag
Aki Tuomi [Mon, 10 Oct 2016 07:36:52 +0000 (10:36 +0300)]
doveadm-sync: Add end-date support
Aki Tuomi [Mon, 10 Oct 2016 07:13:12 +0000 (10:13 +0300)]
doveadm-sync: Document start date
Timo Sirainen [Sun, 9 Oct 2016 20:34:18 +0000 (23:34 +0300)]
lib-compression: Fixed compler warnings and wrongly triggering asserts.
Broken by
7f74811b7 .
Timo Sirainen [Thu, 6 Oct 2016 10:50:59 +0000 (13:50 +0300)]
global: Make sure i_stream_read() calls handle 0 and -2 return values correctly.
Timo Sirainen [Thu, 6 Oct 2016 10:39:21 +0000 (13:39 +0300)]
log: Minor error logging and comment improvement.
Timo Sirainen [Thu, 6 Oct 2016 10:09:46 +0000 (13:09 +0300)]
imapc: Added imapc_max_line_length to limit maximum memory usage.
The default is still unlimited, but this should be set to something smaller
for untrusted servers.
Timo Sirainen [Thu, 6 Oct 2016 09:10:28 +0000 (12:10 +0300)]
lib-index: Added test-mail-index-modseq unit test
Timo Sirainen [Wed, 5 Oct 2016 13:34:16 +0000 (16:34 +0300)]
lib-storage: Fixed assert-crash in mailbox_save_cancel()
Broken by
05150df8f . Fixes:
Panic: file mail-storage.c: line 2137 (mailbox_save_context_reset): assertion failed: (ctx->saving)
Timo Sirainen [Tue, 27 Sep 2016 13:15:42 +0000 (16:15 +0300)]
lib: If connect() fails with EADDRNOTAVAIL, retry it 4 more times.
This is needed on busy systems. Nicely explained in:
https://idea.popcount.org/2014-04-03-bind-before-connect/
Phil Carmody [Wed, 5 Oct 2016 12:03:05 +0000 (15:03 +0300)]
plugins/fts - make storage errors more informative
There are 3 different ways to fail ending a transaction (one
of which is itself just a record that something now unknown
previously failed). Identify which one in the logs.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Timo Sirainen [Tue, 4 Oct 2016 14:31:26 +0000 (17:31 +0300)]
lib-storage: autoexpunge mailboxes with wildcards didn't work with namespace prefix.
Timo Sirainen [Tue, 27 Sep 2016 16:48:14 +0000 (19:48 +0300)]
lib-index: If view syncing sees index is reset, always mark the view as inconsistent.
Not only when the mailbox has messages, because that could still mess up
assumptions about UIDs. A somewhat better check could have been to do this
only when next_uid>1 (= there have been messages at some point in this
mailbox), but it's safer to just always mark the view as inconsistent.
Timo Sirainen [Tue, 27 Sep 2016 16:45:57 +0000 (19:45 +0300)]
lib-index: When finding a view is reset, don't attempt any further syncing.
This could cause various errors to be logged, such as:
Error: Append with UID 7103, but next_uid = 7242
Timo Sirainen [Tue, 27 Sep 2016 16:41:25 +0000 (19:41 +0300)]
lib-index: Fixed potential assert-crash when view syncing sees a reset marker.
It should never try to use main index map at that point, because
view_sync_have_expunges() looks changes only before the reset marker.
Fixes:
Error: Index .../dovecot.index lost messages without expunging (36 -> 27)
Timo Sirainen [Tue, 27 Sep 2016 16:39:59 +0000 (19:39 +0300)]
lib-storage: Make sure mailbox_sync*() fails if view is inconsistent afterwards.
Timo Sirainen [Tue, 27 Sep 2016 16:38:26 +0000 (19:38 +0300)]
imap: If mailbox is inconsistent after syncing, don't try to sync message counts.
This fixes (e.g. after doveadm force-resync):
Panic: Message count decreased
Stephan Bosch [Sun, 2 Oct 2016 12:18:35 +0000 (14:18 +0200)]
lib-http: uri: Removed unnecessary checking of percent encoding of query and fragment parts.
This is now always performed in lib/uri-util.
Stephan Bosch [Sun, 2 Oct 2016 12:14:48 +0000 (14:14 +0200)]
lib: uri-util: Always fully check the syntax of percent encoding while parsing URI components.
Aki Tuomi [Mon, 3 Oct 2016 07:08:45 +0000 (10:08 +0300)]
lib-test: Fix memory leak in test-ostream
Aki Tuomi [Mon, 3 Oct 2016 07:08:31 +0000 (10:08 +0300)]
lib-test: Fix illegal memory access in test-ostream
Aki Tuomi [Mon, 3 Oct 2016 06:11:23 +0000 (09:11 +0300)]
io: Add source filename
This will make debugging alot easier
when you can see what the filename is as well.
Timo Sirainen [Fri, 30 Sep 2016 10:42:45 +0000 (13:42 +0300)]
lib-test: Added test_ostream for testing nonblocking ostreams.
Timo Sirainen [Fri, 30 Sep 2016 10:10:13 +0000 (13:10 +0300)]
lib-test: Moved test_istream code to its own test-istream.c file.
Timo Sirainen [Fri, 30 Sep 2016 10:04:48 +0000 (13:04 +0300)]
lib-test: Allow test_istream_set_*() for test-istream's children.
It will internally find the test_istream from parents. This simplifies the
testing code so that it doesn't have to keep track of both the test_istream
and the final istream.
Timo Sirainen [Tue, 27 Sep 2016 17:21:55 +0000 (20:21 +0300)]
director: Ignore duplicates in director_servers setting.
Timo Sirainen [Fri, 30 Sep 2016 09:36:33 +0000 (12:36 +0300)]
lib-storage: mail_user_dup() should duplicate also userdb_fields.
Timo Sirainen [Thu, 29 Sep 2016 11:15:32 +0000 (14:15 +0300)]
lib-storage: Don't reset mail_save_context.saving too early.
If mailbox_save_using_mail() ended up in mail_storage_copy(), saving was set
to FALSE before the copy() method was finished running. This caused e.g.
notify plugin to think that this was a copy event instead of a save event.
Added comments and asserts to clarify how the logic should work between
all the different copying/moving/saving flags.
Timo Sirainen [Thu, 29 Sep 2016 11:00:49 +0000 (14:00 +0300)]
lib-storage: If mailbox_move() fails, reset mail_save_context.moving==FALSE
Timo Sirainen [Tue, 27 Sep 2016 12:50:11 +0000 (15:50 +0300)]
master: Removed hardcoded listen() backlog limit.
If it's already too large, the kernel will truncate it automatically. So
there shouldn't be any reason for us to explicitly limit it.
Timo Sirainen [Mon, 26 Sep 2016 12:38:27 +0000 (15:38 +0300)]
dict-client: Fixed lock and ioloop wait timings in log messages.
Previously it was logging the total amount of time spent on lock waits or on
ioloop during the existence of the entire process, rather than how much time
the command itself was spending on those. This wasn't very useful.
Now it also tries to separate the time spent on the main ioloop and in
dict_wait().
Timo Sirainen [Mon, 26 Sep 2016 13:44:21 +0000 (16:44 +0300)]
dict-client: Don't return "Dict server timeout" too early.
This could have happened when many dict commands were being run without
the timeout being reset in the middle.
Timo Sirainen [Mon, 26 Sep 2016 13:34:23 +0000 (16:34 +0300)]
dict-client: Remove timeout when there are only background commands.
Normally the timeout wasn't added in the first place, but it was if a
non-background command was added first and it was followed by a background
command.
Timo Sirainen [Wed, 21 Sep 2016 10:47:05 +0000 (13:47 +0300)]
lib: Fixed ostream-failure-at with blocking parent stream.
Blocking ostream returns either a full success or a full failure. It can't
return that only n/m bytes were written.
Fixes assert:
Panic: file ostream.c: line 255 (o_stream_sendv_int): assertion failed: (!stream->blocking)
Timo Sirainen [Mon, 19 Sep 2016 08:08:08 +0000 (11:08 +0300)]
lib-ssl-iostream: The final fix to make the SSL plugin loading not fail..
Timo Sirainen [Sun, 18 Sep 2016 13:33:07 +0000 (16:33 +0300)]
lib-ssl-iostream: Fixed OpenSSL module to be actually initialized.
Timo Sirainen [Fri, 16 Sep 2016 05:39:24 +0000 (08:39 +0300)]
lib-http: Link test-http-client libssl_iostream_openssl.so directly.
This way it can be run without having to do make install first.
Timo Sirainen [Fri, 16 Sep 2016 05:35:55 +0000 (08:35 +0300)]
lib-ssl-iostream: Use more standard _init() & _deinit() to initialize SSL plugin
This is mainly to make it easier for test programs to link to the plugin
directly.
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.
Timo Sirainen [Fri, 9 Sep 2016 14:40:58 +0000 (17:40 +0300)]
fts-squat: Fixed memory leak on corrupted uidlist handling
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.
Timo Sirainen [Tue, 11 Oct 2016 08:03:06 +0000 (11:03 +0300)]
lib: iostream-temp: Fixed o_stream_send_istream() with >2GB files
8051312f9 wasn't quite enough.
Timo Sirainen [Mon, 10 Oct 2016 11:42:24 +0000 (14:42 +0300)]
lib-program-client: Compiler warning fixes
Timo Sirainen [Mon, 10 Oct 2016 11:20:16 +0000 (14:20 +0300)]
lib-program-client: Avoid busy-looping while waiting for ostream to have space.
Aki Tuomi [Fri, 7 Oct 2016 16:49:24 +0000 (19:49 +0300)]
lib-program-client: Add test suite for program client
Aki Tuomi [Fri, 7 Oct 2016 16:48:59 +0000 (19:48 +0300)]
lib-program-client: Expose asynchronous API