]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Thu, 23 Feb 2017 09:47:20 +0000 (11:47 +0200)]
imap-hibernate: Support userdb in var_expand
Timo Sirainen [Sun, 26 Feb 2017 14:10:58 +0000 (16:10 +0200)]
lib-index: Fix test-mail-index-transaction-update
It was broken with TZ=Australia/ACT. Fixing it seems too troublesome, so
just use TZ=UTC during the test.
Timo Sirainen [Sun, 26 Feb 2017 14:09:13 +0000 (16:09 +0200)]
lib-index: Minor fix to day_first_uid updating
mktime() was getting a bit confused around day changes. Giving it only
year/month/day makes it less confused.
Aki Tuomi [Sat, 11 Mar 2017 17:20:30 +0000 (19:20 +0200)]
doveadm: Do not crash doveadm-server if input file missing
save commands expects valid input file for it to work,
if we are not running for cli, and input file is not
provided, provide EINVAL error to caller via i_stream_error.
Aki Tuomi [Thu, 16 Mar 2017 07:36:23 +0000 (09:36 +0200)]
lib-dcrypt: Add asserts
Fixes several static analysis reports
Josef 'Jeff' Sipek [Mon, 27 Feb 2017 23:13:54 +0000 (18:13 -0500)]
lib-storage & imap: add MAIL_ERROR_UNAVAILABLE as [UNAVAILABLE]
[UNAVAILABLE] is defined in RFC 5530 and we were just missing a MAIL_ERROR_*
constant to make use of it.
Timo Sirainen [Wed, 8 Mar 2017 20:39:34 +0000 (15:39 -0500)]
imap, pop3, indexer-worker: Add (deinit) to process title before autoexpunging runs.
lmtp should also do this, but it needs a bit larger changes.
Timo Sirainen [Wed, 8 Mar 2017 22:09:12 +0000 (17:09 -0500)]
pop3: Add client.destroyed boolean
Timo Sirainen [Mon, 13 Mar 2017 12:23:11 +0000 (14:23 +0200)]
auth: Auth workers shouldn't return username if it wasn't changed
This continues the previous fix where username was always added to
passdb/userdb cache, even if the username wasn't changed. That could have
resulted in wrongly changing usernames if the cache key didn't uniquely
identify the user.
Timo Sirainen [Mon, 13 Mar 2017 11:49:04 +0000 (13:49 +0200)]
auth: passdb/userdb lookups via auth-worker cached too much of the replies
Only the fields returned by the lookup itself were supposed to be cached.
This was especially problematic if the lookup via auth-worker didn't
uniquely identify the user. For example doing a passdb lookup for an
attribute shared by multiple users could have caused the reply to contain
the previous cached user's all extra fields.
Aki Tuomi [Wed, 15 Mar 2017 11:29:11 +0000 (13:29 +0200)]
auth: Properly hide all fields with passwords
client reply line wasn't hiding all items
which contain 'pass' substring. This was
inconsistent behaviour since elsewhere this was done.
Timo Sirainen [Wed, 15 Mar 2017 16:20:31 +0000 (18:20 +0200)]
*-login: Change API for how login_plugins hook into client allocation.
The previous API worked badly when there were more than one plugin.
The current behavior works similarly to how mail_plugins work.
Timo Sirainen [Mon, 13 Mar 2017 20:52:41 +0000 (22:52 +0200)]
cassandra: Treat CASS_ERROR_SERVER_UNAVAILABLE as "write success is uncertain"
Looks like the write could still have actually gone through.
Timo Sirainen [Wed, 15 Mar 2017 23:22:09 +0000 (01:22 +0200)]
lib-oauth2: Don't free oauth2_request too early.
Move the freeing explicitly to only after calling the callback. The
previous method of freeing it on when http_request was destroyed could
have happened too early when oauth2_parse_json() called i_stream_unref(),
which released the last reference to the http_request.
Timo Sirainen [Wed, 15 Mar 2017 23:12:57 +0000 (01:12 +0200)]
lib-oauth2: Fix memory leak if HTTP URL parsing fails.
Also delay calling the callback. The callers don't necessarily expect an
immediate callback (auth/db-oauth2.c doesn't).
Timo Sirainen [Wed, 15 Mar 2017 22:54:44 +0000 (00:54 +0200)]
auth: oauth2 - cleanup db_oauth2_lookup_callback_t
db parameter isn't needed, because request->db already contains it.
Also moved request parameter to be the first.
Timo Sirainen [Wed, 15 Mar 2017 22:51:15 +0000 (00:51 +0200)]
auth: oauth2 - make it easier to see where db_oauth2_callback() is called
Doesn't fix anything, but places the db_oauth2_callback() calls into the end
of _continue() calls so it's clearer that they're always being called
exactly once.
Timo Sirainen [Wed, 15 Mar 2017 23:35:38 +0000 (01:35 +0200)]
auth: oauth2 - Clarify token validation success/valid error handling
result->error is NULL only if result->success && !result->valid.
Also !result->success is the more important error handling case.
Write out these cases explicitly so it's easier to understand.
Timo Sirainen [Wed, 15 Mar 2017 22:42:28 +0000 (00:42 +0200)]
auth: oauth2 - remove db_oauth2_request.failed
It is an unnecessary duplication of passdb_result.
Timo Sirainen [Wed, 15 Mar 2017 22:38:39 +0000 (00:38 +0200)]
auth: oauth2 - remove db_oauth2_request.result
It's not a persistent state. When it's set, the callback needs to be called.
This way it's more difficult to forget to set it.
Timo Sirainen [Wed, 15 Mar 2017 22:33:24 +0000 (00:33 +0200)]
auth: oauth2 - Template expand failure should be an internal error
Not the default "password mismatch". Also changed the API to be closer to
the other nearby functions.
Timo Sirainen [Wed, 15 Mar 2017 22:32:01 +0000 (00:32 +0200)]
auth: oauth2 - make db_oauth2_template_export() static
It's not used outside db-oauth2.c
Timo Sirainen [Wed, 15 Mar 2017 22:25:19 +0000 (00:25 +0200)]
auth: oauth2 - introspection lookup error should be internal failure
Not the default, which is "password mismatch".
Timo Sirainen [Wed, 15 Mar 2017 22:15:10 +0000 (00:15 +0200)]
auth: oauth2 - Make sure db_oauth2_request.req is set to NULL when it gets freed.
Doesn't fix anything, but makes it clearer that req->req must not be
aborted anymore after this stage, because it gets freed anyway.
Timo Sirainen [Wed, 15 Mar 2017 22:13:08 +0000 (00:13 +0200)]
auth: oauth2 - Fix aborting auth requests on deinit.
The auth_request needs to be finished by calling the callback.
Aki Tuomi [Mon, 6 Mar 2017 12:59:46 +0000 (14:59 +0200)]
auth: Do not double-expand key in passdb dict when authenticating
Broken by
79042f8c
Timo Sirainen [Thu, 9 Mar 2017 16:32:21 +0000 (11:32 -0500)]
*-login: Remove unused client.proxy_state
Timo Sirainen [Thu, 9 Mar 2017 15:48:33 +0000 (10:48 -0500)]
pop3-login: Remove usage of client.common.proxy_state
Timo Sirainen [Thu, 9 Mar 2017 15:46:36 +0000 (10:46 -0500)]
pop3-login: Log proxy state as human-readable string.
Timo Sirainen [Thu, 9 Mar 2017 15:41:52 +0000 (10:41 -0500)]
imap-login: Log proxy state as human-readable string.
Separate sent/received state and log them as strings.
Timo Sirainen [Thu, 9 Mar 2017 15:31:39 +0000 (10:31 -0500)]
*-login: Add client.proxy_get_state() for providing human-readable proxy state
If not implemented, it defaults to the old method of returning proxy_state
number.
Timo Sirainen [Tue, 7 Mar 2017 19:36:45 +0000 (14:36 -0500)]
pop3: Set process title before syncing mailbox.
The syncing could be taking a long time, so it's useful to have the username
in the process title during that.
Timo Sirainen [Wed, 8 Mar 2017 15:07:37 +0000 (10:07 -0500)]
imap: If unhibernation fails due to a mailbox error, log the mailbox name.
Timo Sirainen [Wed, 8 Mar 2017 14:28:14 +0000 (09:28 -0500)]
imap: When disconnecting due to FETCH failure, include "FETCH" in the log message.
Aki Tuomi [Tue, 7 Mar 2017 16:10:57 +0000 (18:10 +0200)]
lib-sasl: Fix xoauth2 data format
Authentication data was missing user=
Aki Tuomi [Tue, 7 Mar 2017 08:09:20 +0000 (10:09 +0200)]
db-oauth2: Make sure request is removed only once
Callback might be called twice.
Aki Tuomi [Tue, 7 Mar 2017 08:08:08 +0000 (10:08 +0200)]
lib-oauth2: Use http client destroy callback
Avoids freeing memory early.
Fixes signal 11 crash in auth
Aki Tuomi [Mon, 6 Mar 2017 11:16:12 +0000 (13:16 +0200)]
auth: Apply skips to first passdb
This is required to apply filters to first
passdb, so that mechanism filters can be
applied.
Aki Tuomi [Fri, 3 Mar 2017 06:31:50 +0000 (08:31 +0200)]
lib-oauth2: Add missing content-type header
Timo Sirainen [Thu, 20 Oct 2016 09:08:09 +0000 (12:08 +0300)]
lib: Added i_strchr_to_next()
Martti Rannanjärvi [Wed, 1 Mar 2017 10:29:17 +0000 (12:29 +0200)]
fts: Don't add NULL content disposition or type to HTTP header
Aki Tuomi [Mon, 27 Feb 2017 18:40:43 +0000 (20:40 +0200)]
doveadm: Add missing newline to proxy kick output
Aki Tuomi [Mon, 27 Feb 2017 18:38:43 +0000 (20:38 +0200)]
doveadm: Ensure -- is added to command line before positional arguments for non-mails commands as well
Was forgotten from
967efe37d1f10a28c0a086cc5919d4ce8917bed8
Aki Tuomi [Mon, 27 Feb 2017 17:12:32 +0000 (19:12 +0200)]
doveadm: Ensure -- is added to command line before positional arguments
This prevents parser from choking on dash.
Aki Tuomi [Mon, 27 Feb 2017 17:04:55 +0000 (19:04 +0200)]
doveadm: Fix allow-empty-mailbox-name handling
It was supposed to be handled for metadata commands only.
Broken in
26c41874cf6019c3e39f0ed630b2a07a92b2635f
Timo Sirainen [Mon, 27 Feb 2017 12:21:48 +0000 (14:21 +0200)]
doveadm move: Use mailbox_move() instead of copy+expunge
This allows for some optimizations to be done.
Martti Rannanjärvi [Mon, 27 Feb 2017 07:39:06 +0000 (09:39 +0200)]
master: add cassandra to printed build options
Timo Sirainen [Sat, 25 Feb 2017 19:47:01 +0000 (21:47 +0200)]
lib-dcrypt: Replace #if OPENSSL_VERSION_NUMBER with more explicit checks
Timo Sirainen [Sat, 25 Feb 2017 19:41:03 +0000 (21:41 +0200)]
lib-dcrypt: Move most of the OpenSSL #if handling to macros
This avoids #if calls being littered all over the file.
This change can cause HMAC_CTX_free(NULL) to be called, but that seems to
work fine without crashing.
Timo Sirainen [Sun, 26 Feb 2017 13:37:36 +0000 (15:37 +0200)]
lib: Fix t_strf*time() unit tests
Timezone isn't part of the standard struct tm, so %z doesn't necessarily
expand as expected outside Linux.
Timo Sirainen [Sun, 26 Feb 2017 13:21:13 +0000 (15:21 +0200)]
dsync: Fix syncing attributes with large values.
This mainly meant that large Sieve scripts weren't synced properly, because
their last_change field was never deserialized, so it was set to 0.
Timo Sirainen [Sun, 26 Feb 2017 12:32:44 +0000 (14:32 +0200)]
lazy-expunge: Use mailbox_move() instead of mailbox_copy()
This allows some optimizations to be performed that are only possible when
moving messages.
It's slightly strange now that mail_expunge() is triggered twice for the
same source mail, but lazy_expunge plugin is called very early so most
plugins won't see it called twice. Currently only acl plugin sees it, and
it doesn't care.
Timo Sirainen [Fri, 24 Feb 2017 10:27:02 +0000 (12:27 +0200)]
mail-filter: Add missing error handling in ostream-ext-filter
Timo Sirainen [Fri, 24 Feb 2017 10:17:21 +0000 (12:17 +0200)]
auth: Removed dead code from oauth2 mechanism
Timo Sirainen [Fri, 24 Feb 2017 10:13:36 +0000 (12:13 +0200)]
acl plugin: Fix Coverity warning
Just switch the MALLOC_ADD() parameters, so that arithmetic doesn't get
inside a sizeof().
Stephan Bosch [Thu, 23 Feb 2017 18:38:31 +0000 (19:38 +0100)]
lib-http: client: Fixed i_unreached() failure occurring when a host's list of IPs changes while a connection is still pending.
In that case, the IP of the pending connection may no longer be associated with that host.
If the IP was not found anymore, the i_unreached() error occurred.
Aki Tuomi [Thu, 23 Feb 2017 09:29:17 +0000 (11:29 +0200)]
auth: Export oauth2 pass_attrs to passdb reply
Timo Sirainen [Wed, 22 Feb 2017 23:24:43 +0000 (01:24 +0200)]
virtual: Include virtual mailbox name in "Mailbox ID unexpectedly lost" error
Timo Sirainen [Wed, 22 Feb 2017 13:29:34 +0000 (15:29 +0200)]
lib-storage: Allow mail_storage_set_error() to use existing error_string
Fixes some code that may be attempting to copy an error from one storage to
another, but actually ends up trying to copy within the same storage.
Timo Sirainen [Tue, 1 Nov 2016 16:43:57 +0000 (18:43 +0200)]
lib-mail: istream-attachment-connector now allows msg_size=-1 for "unknown".
Timo Sirainen [Tue, 1 Nov 2016 16:42:31 +0000 (18:42 +0200)]
lib-mail: Make sure istream-attachment-connector detects wrong mail size.
Timo Sirainen [Fri, 23 Dec 2016 19:15:49 +0000 (14:15 -0500)]
lib-mail: Fix memory leak in test-istream-attachment
Timo Sirainen [Fri, 23 Dec 2016 18:08:59 +0000 (13:08 -0500)]
lib-mail: Improve istream-attachment-extractor unit test for EIO errors
Timo Sirainen [Fri, 23 Dec 2016 17:59:13 +0000 (12:59 -0500)]
lib-mail: istream-attachment-extractor - use EIO for internal errors
These happen only if the attachment writing failed for some reason.
The input stream itself can't have any errors, so EINVAL isn't proper.
Timo Sirainen [Fri, 23 Dec 2016 17:56:24 +0000 (12:56 -0500)]
lib-mail: istream-attachment-extractor - remove unnecessary code
It's enough to set the stream_errno.
Timo Sirainen [Tue, 1 Nov 2016 16:35:48 +0000 (18:35 +0200)]
lib: Added i_stream_create_min_sized*()
Timo Sirainen [Fri, 23 Dec 2016 17:52:45 +0000 (12:52 -0500)]
lib: istream-sized - consistently set stream_errno=EINVAL if stream is too large
Earlier it was sometimes done and sometimes not, depending on whether the
parent istream happened to stop at the expected boundary.
Timo Sirainen [Fri, 23 Dec 2016 17:51:41 +0000 (12:51 -0500)]
lib: istream-sized - set stream_errno=EPIPE if stream is too small
Timo Sirainen [Fri, 23 Dec 2016 17:26:17 +0000 (12:26 -0500)]
lib: istream-sized - remove explicit i_error() logging
The stream_errno is set, so it's the caller's responsibility to log the
error. There's no need to log it twice.
Timo Sirainen [Mon, 16 May 2016 17:17:41 +0000 (20:17 +0300)]
lib: istream-sized should log errors with its own name, not parent's name
Martti Rannanjärvi [Mon, 9 May 2016 08:08:33 +0000 (11:08 +0300)]
lib: remove failed bool from sized_istream struct
This is no longer needed as we are now checking for
stream_errno also in istream.c
Timo Sirainen [Tue, 1 Nov 2016 12:47:05 +0000 (14:47 +0200)]
lib: Added i_stream_create_sized_range()
This is just a small wrapper to i_stream_create_sized() to specify stream's
start offset.
Timo Sirainen [Wed, 22 Feb 2017 18:05:16 +0000 (20:05 +0200)]
maildir: Fix checking vsize caching decision in "is this pop3 user?"
If vsize extension is used, it's practically the same as if vsize's caching
decision was YES.
Timo Sirainen [Wed, 22 Feb 2017 18:04:28 +0000 (20:04 +0200)]
pop3c: Remove unnecessarily duplicated code setting vsize to cache
This is important now that the vsize can be added also to index's vsize
extension.
Timo Sirainen [Wed, 22 Feb 2017 18:03:43 +0000 (20:03 +0200)]
pop3c: Prefetched streams didn't call istream_opened() or set virtual_size
Timo Sirainen [Wed, 22 Feb 2017 15:45:34 +0000 (17:45 +0200)]
trash plugin: Use correct hook for overriding mail_user vfuncs
This was always wrong to do, and it crashes after
f32382d2da479a4371e08c443679528db37ea988
Timo Sirainen [Wed, 22 Feb 2017 15:21:56 +0000 (17:21 +0200)]
expire plugin: Use correct hook for overriding mail_user vfuncs
This was always wrong to do, and it crashes after
f32382d2da479a4371e08c443679528db37ea988
Timo Sirainen [Wed, 22 Feb 2017 13:32:19 +0000 (15:32 +0200)]
lazy-expunge: Fix error handling for GUID lookups
If the mail is already expunged, the error should be ignored.
In other situations the original error string should be preserved as
part of the logged error message.
Timo Sirainen [Wed, 22 Feb 2017 14:09:07 +0000 (16:09 +0200)]
lib-storage: Add missing service_user ref when creating shared mailbox's user.
Was forgotten from
d1bf4ae66b8bf3b9e28df1823d6d4adda2b923b6
Fixes:
Panic: file mail-storage-service.c: line 1513 (mail_storage_service_user_unref): assertion failed: (user->refcount > 0)
Timo Sirainen [Mon, 30 Jan 2017 19:53:01 +0000 (21:53 +0200)]
lib-mail: Fix message_part_data_is_plain_7bit()
Content-Type parameters weren't handled exactly right.
Broken by recent changes.
Timo Sirainen [Wed, 22 Feb 2017 11:02:27 +0000 (13:02 +0200)]
quota: Don't log "Internal quota calculation error"
It's not very informative and we can't give a better error message without
changing the APIs. The real error should have been logged already anyway,
so this is just duplication of an error. I think originally this was added
because some backend forgot to log an error.
Timo Sirainen [Wed, 22 Feb 2017 11:30:00 +0000 (13:30 +0200)]
global: Replace mail_storage_service_user_free() with _unref()
Timo Sirainen [Wed, 22 Feb 2017 11:28:43 +0000 (13:28 +0200)]
lib-storage: Use refcounting for mail_storage_service_user
doveadm import was freeing the user too early, which resulted
mail_user._service_user pointing to freed memory. More importantly,
after
34512eaad8b1b2f929e6d6e3a2f7252c29fba97b user->set was pointing
to already freed memory.
Timo Sirainen [Wed, 22 Feb 2017 08:44:00 +0000 (10:44 +0200)]
lib-lda: Fix pigeonhole testsuite to not crash
Timo Sirainen [Tue, 21 Feb 2017 20:34:14 +0000 (22:34 +0200)]
lib: Fix again test-utc-mktime with 32bit time_t
Timo Sirainen [Tue, 21 Feb 2017 10:38:10 +0000 (12:38 +0200)]
lib-lda: Fix delivery logging when Sieve performs multiple actions
Previous code assumed that it would work like:
- save/copy
- transaction commit
- mail_deliver_ctx_get_log_var_expand_table()
- repeat for transaction 2
While it really works:
- transaction 1: save/copy
- transaction 2: save/copy
- transaction 1: commit
- mail_deliver_ctx_get_log_var_expand_table()
- transaction 2: commit
- mail_deliver_ctx_get_log_var_expand_table()
So the cache needs to be stored per transaction. This code still wouldn't
work correctly if Sieve saved mails multiple times within the same
transaction, but that doesn't happen (at least currently).
Timo Sirainen [Tue, 21 Feb 2017 10:36:52 +0000 (12:36 +0200)]
lib-lda: Refactor - mail_deliver_log_update_cache() doesn't need entire deliver_ctx
Timo Sirainen [Tue, 21 Feb 2017 10:34:59 +0000 (12:34 +0200)]
lib-lda: Refactor - Add struct mail_deliver_mailbox
Timo Sirainen [Tue, 21 Feb 2017 17:55:48 +0000 (19:55 +0200)]
lib: Fix test-utc-mktime with 32bit time_t
Martti Rannanjärvi [Tue, 21 Feb 2017 14:25:48 +0000 (16:25 +0200)]
lib-mail: Place input/output of message-date tests in one struct
Define both input and output of a message date test case in a single
struct so it is easier to follow and less error prone. Also add some
leap second tests.
Martti Rannanjärvi [Tue, 21 Feb 2017 15:00:14 +0000 (17:00 +0200)]
lib: Place input/output of utc_mktime tests in one struct
Define both input and output of a utc_mktime test case in a single
struct so it is easier to follow and less error prone.
Martti Rannanjärvi [Tue, 21 Feb 2017 14:25:25 +0000 (16:25 +0200)]
lib: Accept leap second in utc_mktime
Accept leap second at any time in utc_mktime since utc_mktime is being
used before applying the timezone offset everywhere.
Timo Sirainen [Tue, 21 Feb 2017 12:42:01 +0000 (14:42 +0200)]
imap: Fix error message in failed FETCH's NO reply.
This was broken only with the new imap_fetch_failure = no-after setting.
Timo Sirainen [Tue, 21 Feb 2017 13:44:09 +0000 (15:44 +0200)]
imapc: Error handling wasn't setting storage error everywhere.
This would have used the previous error, which might not have been correct.
Aki Tuomi [Mon, 20 Feb 2017 13:47:33 +0000 (15:47 +0200)]
lib-index: Unconstifty pointer array
clang complained about the extra const.
Aki Tuomi [Mon, 20 Feb 2017 13:35:02 +0000 (15:35 +0200)]
lib-index: Add missing initialization for chained hooks
Aki Tuomi [Mon, 20 Feb 2017 13:28:36 +0000 (15:28 +0200)]
lib,lib-storage: Move hook building code to lib
This allows it to be reused elsewhere
Aki Tuomi [Mon, 20 Feb 2017 12:34:25 +0000 (14:34 +0200)]
lib-index: Allow multiple hooks for transaction creation
Timo Sirainen [Tue, 21 Feb 2017 12:20:22 +0000 (14:20 +0200)]
lib-storage: Fix mail.access_type for search prefetches
Timo Sirainen [Tue, 21 Feb 2017 11:48:36 +0000 (13:48 +0200)]
lmtp: Fix lmtp_user_concurrency_limit when userdb changes the username
Anvil LOOKUP was done with the original username, while CONNECT/DISCONNECT
was done with the changed username. So LOOKUP always thought that there
were zero concurrent sessions for the user.