]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Thu, 25 Apr 2019 07:23:12 +0000 (10:23 +0300)]
mail-lua: Handle transaction commit error writing metadata
Aki Tuomi [Wed, 24 Apr 2019 13:33:45 +0000 (16:33 +0300)]
lib-lua: Fix bracing in table helper macros
Was left broken in
c304bc76
Aki Tuomi [Tue, 16 Apr 2019 08:42:56 +0000 (11:42 +0300)]
mail-lua: Implement mailbox metadata API
Adds methods for accessing and manipulating mailbox metadata
* user:metadata_get("key", "key", ..) - returns value for keys
* user:metadata_set("key", "value") - sets value for key
* user:metadata_unset("key", "value") - unsets key
* user:metadata_list("prefix", "prefix", ...) - lists keys in dict for prefixes
* mailbox:metadata_get("key", "key", ..) - returns value for keys
* mailbox:metadata_set("key", "value") - sets value for key
* mailbox:metadata_unset("key", "value") - unsets key
* mailbox:metadata_list("prefix", "prefix", ...) - lists keys in dict for prefixes
User metadata is stored under /(private|shared)/vendor/vendor.dovecot/pvt/server to
mailbox INBOX, and is accessible with mailbox metadata methods with INBOX.
Also mail lua exports constants to simplify usage
dovecot.storage.MAILBOX_ATTRIBUTE_PREFIX_DOVECOT
"vendor/vendor.dovecot/"
dovecot.storage.MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT
"vendor/vendor.dovecot/pvt/"
dovecot.storage.MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER
"vendor/vendor.dovecot/pvt/server/"
Aki Tuomi [Wed, 17 Apr 2019 10:20:58 +0000 (13:20 +0300)]
mail-lua: Properly refcount user object
Prevents user object from going away unexpectedly, and makes
sure it gets released correctly.
Aki Tuomi [Wed, 17 Apr 2019 10:12:05 +0000 (13:12 +0300)]
mail-lua: Use userdata for mailbox pointer
Makes it possible to unref mailbox on exit
Aki Tuomi [Mon, 15 Apr 2019 10:02:11 +0000 (13:02 +0300)]
lib-lua: Fix assigment helper macros
The macro names were conflicting with the table values.
Timo Sirainen [Mon, 18 Mar 2019 22:02:06 +0000 (00:02 +0200)]
lib-storage: Fix NO-FS-VALIDATION in mail_location
The setting wasn't being preserved properly, so it was just ignored.
Josef 'Jeff' Sipek [Thu, 14 Mar 2019 19:24:37 +0000 (15:24 -0400)]
lib: event_filter_unref(NULL) is already a no-op
Josef 'Jeff' Sipek [Wed, 27 Mar 2019 14:09:33 +0000 (16:09 +0200)]
lib-http: Fix comment typo
Michael Slusarz [Mon, 25 Mar 2019 17:58:00 +0000 (11:58 -0600)]
doveadm: Add body.preview as a fetch field
Keep body.snippet as a fetch field for backward compatitibility reasons
Michael M Slusarz [Wed, 31 Oct 2018 00:28:49 +0000 (18:28 -0600)]
RFC has changed SHOULD length of preview from 100 to 200
Michael M Slusarz [Wed, 31 Oct 2018 00:28:04 +0000 (18:28 -0600)]
RFC draft has changed from SNIPPET to PREVIEW
The older SNIPPET command will remain for now - it is mostly the same
as the new PREVIEW code, so it's essentially an alias (the only
difference between the two versions is the SNIPPET/PREVIEW identifier
text).
Timo Sirainen [Tue, 2 Apr 2019 10:55:14 +0000 (13:55 +0300)]
dict: Remove unnecessary o_stream_flush()
Added recently by
89e4b2e7fbd17548f3c99fa66368c9b0bc8eb775
Aki Tuomi [Sun, 31 Mar 2019 18:24:40 +0000 (21:24 +0300)]
doveadm-dict: Add missing dict_deinit
Fixes event leak when set is missing parameter.
Aki Tuomi [Sun, 31 Mar 2019 14:01:36 +0000 (17:01 +0300)]
dict: Parse handshake using handshake_args
This ensures the input is properly tab unescaped, also
simplifies the handshake function.
Aki Tuomi [Mon, 8 Oct 2018 08:51:41 +0000 (11:51 +0300)]
dict: Remove obsolete check as getenv() is no longer used for getting dicts
Aki Tuomi [Sun, 31 Mar 2019 13:54:28 +0000 (16:54 +0300)]
dict: Use connection API
Aki Tuomi [Mon, 1 Apr 2019 09:10:10 +0000 (12:10 +0300)]
dict: Use connection struct
Prepares for moving into connection API
Aki Tuomi [Mon, 1 Apr 2019 09:09:33 +0000 (12:09 +0300)]
dict: Create connection with struct master_connection instead of fd
Prepares for moving into connection.c struct
Timo Sirainen [Sun, 20 May 2018 09:27:22 +0000 (12:27 +0300)]
fts: Add fts_enforced=body
Similar to "no", this doesn't enforce FTS indexing for header searches.
Similar to "yes", on FTS lookup failure it won't fallback to reading all
mails.
Timo Sirainen [Wed, 27 Mar 2019 14:44:21 +0000 (16:44 +0200)]
sdbox: Add "sdbox" event category
2cd16e24fb442a066c6c3051c1042c1091b927bb only added it to the "dbox" alias.
Sergey Kitov [Fri, 22 Mar 2019 13:59:53 +0000 (15:59 +0200)]
auth-request: Call auth_request_passdb_lookup_end() for all return paths of auth_request_handle_passdb_callback()
Fixes: Panic: file auth-request.c: line 367 (auth_request_unref):
assertion failed: (array_count(&request->authdb_event) == 0)
The panic happens when auth request results in PASSDB_RESULT_USER_DISABLED.
Josef 'Jeff' Sipek [Wed, 16 Jan 2019 13:58:15 +0000 (08:58 -0500)]
coccinelle: Add all semantic patches used in the past to a new dir
This commit merely imports the semantic patches without providing any
additional tooling to apply them. It also includes macros.h header used by
coccinelle to properly handle some of the more complex macros we have.
Martti Rannanjärvi [Fri, 22 Mar 2019 07:20:11 +0000 (09:20 +0200)]
auth: Make db_oauth2_callback debug print human readable
Sergey Kitov [Thu, 21 Mar 2019 06:39:28 +0000 (08:39 +0200)]
ipc-server: Reconnect on socket input error.
Sergey Kitov [Thu, 21 Mar 2019 13:29:20 +0000 (15:29 +0200)]
ipc-server: Change reconnect timeout to 10 seconds.
Sergey Kitov [Thu, 21 Mar 2019 06:38:52 +0000 (08:38 +0200)]
ipc: Terminate IPC process with master.
Sergey Kitov [Thu, 21 Mar 2019 13:23:51 +0000 (15:23 +0200)]
ipc: Introduce ipc_groups_disconnect_all()
Timo Sirainen [Tue, 4 Oct 2016 13:00:18 +0000 (16:00 +0300)]
lib-ssl-iostream: Minor assert cleanup.
If stream->closed is TRUE then stream->stream_errno != 0 as well. And here
we really want to be sure that stream_errno isn't 0, so make the assert
reflect that.
Olaf Hering [Thu, 3 Jan 2019 19:32:26 +0000 (20:32 +0100)]
config: reproducible output from settings-get.pl
If the same source gets built twice ('build same source on different
hosts at different times') the resulting files may differ.
Fix this by sorting the hash keys before usage.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Stephan Bosch [Wed, 29 Aug 2018 17:01:37 +0000 (19:01 +0200)]
lib-http: client: Fix segfault crash sometimes happening while running sub-ioloop in request callback.
The connection was not completely disconnected before calling the callback.
Running a sub-ioloop means that timeouts and ios that haven't been destroyed yet
for the connection can be triggered, causing all kinds of issues. Therefore, it
is important to disconnect before calling the request callbacks. The fix therefore
consists of calling http_client_connection_disconnect() before calling
http_client_connection_retry_requests() in
http_client_connection_abort_temp_error().
This also amends the test suite to account for these changes, as it is now
unclear which requests will actually succeed.
Stephan Bosch [Sun, 16 Sep 2018 13:36:59 +0000 (15:36 +0200)]
lib-http: client: Abort pending requests at connection destroy rather than disconnect.
This is needed for subsequent changes.
Stephan Bosch [Sun, 16 Sep 2018 13:19:23 +0000 (15:19 +0200)]
lib-http: client: Implement the no_auto_retry setting in http_client_request_retry().
Before, it was implemented in http_client_connection_retry_requests(), but that
would not work after http_client_connection_disconnect().The peer is detached
from the connection there, which makes conn->peer->client->set unavailable.
Instead, we use req->client->set for each request individually to determine
whether it should be retried or not.
Stephan Bosch [Sun, 6 Jan 2019 11:11:26 +0000 (12:11 +0100)]
lib-storage: mail-storage-service: Fix failure prefix composition in mail_storage_service_lookup().
It produced a prefix without the required ": " suffix and in one case it
produced a spurious comma.
Timo Sirainen [Wed, 20 Mar 2019 12:00:51 +0000 (14:00 +0200)]
lib-storage: Fix -Wimplicit-fallthrough compiler warning
Stephan Bosch [Wed, 14 Nov 2018 00:10:13 +0000 (01:10 +0100)]
lib-smtp: test-smtp-payload: Implement connection reuse.
Makes the test as a whole faster and it tests an important aspect of connection
management (which, in fact, we currently don't use).
Timo Sirainen [Mon, 11 Mar 2019 22:03:18 +0000 (00:03 +0200)]
auth: Add missing log prefix to "userdb cache expired" debug line
Aki Tuomi [Fri, 8 Mar 2019 13:39:51 +0000 (15:39 +0200)]
auth: Use request event for messages after lookup has ended
Otherwise the prefix is going to be wrong, and we cannot use
the authdb_event here because the authdb event is wrong
at this point.
Aki Tuomi [Fri, 8 Mar 2019 13:31:49 +0000 (15:31 +0200)]
auth: Ensure authdb_event returns event
We don't want nasty crashes due to lack of event.
Stephan Bosch [Thu, 7 Mar 2019 02:39:34 +0000 (03:39 +0100)]
master: test-master-login-auth - Add request reconnect test.
Stephan Bosch [Thu, 7 Mar 2019 01:44:55 +0000 (02:44 +0100)]
master: test-master-login-auth - Add request disconnect test.
Stephan Bosch [Thu, 7 Mar 2019 01:37:30 +0000 (02:37 +0100)]
master: test-master-login-auth - Add support for retrying requests.
Stephan Bosch [Thu, 7 Mar 2019 01:20:43 +0000 (02:20 +0100)]
master: test-master-login-auth - Run the auth request in a separate function.
Stephan Bosch [Tue, 5 Mar 2019 01:56:52 +0000 (02:56 +0100)]
lib-master: master-login-auth - Make sure connection is disconnected upon error.
Stephan Bosch [Thu, 7 Mar 2019 00:04:52 +0000 (01:04 +0100)]
master: test-auth-client - Add handshake reconnect test.
Stephan Bosch [Wed, 6 Mar 2019 22:34:56 +0000 (23:34 +0100)]
master: test-auth-client - Add handshake disconnect test.
Stephan Bosch [Wed, 6 Mar 2019 23:50:49 +0000 (00:50 +0100)]
master: test-auth-client - Add support for retrying handshakes.
Stephan Bosch [Wed, 6 Mar 2019 23:56:44 +0000 (00:56 +0100)]
master: test-auth-client - Run the auth client in a separate function.
Stephan Bosch [Thu, 7 Mar 2019 00:33:58 +0000 (01:33 +0100)]
master: test-auth-client - Fix duplicate server connection deinit.
Stephan Bosch [Tue, 5 Mar 2019 01:35:45 +0000 (02:35 +0100)]
lib-auth: auth-client-connection - Make sure connection is disconnected upon error.
Stephan Bosch [Wed, 6 Mar 2019 21:45:57 +0000 (22:45 +0100)]
master: test-auth-master - Add userdb lookup reconnect test.
Stephan Bosch [Wed, 6 Mar 2019 21:01:02 +0000 (22:01 +0100)]
master: test-auth-master - Add userdb lookup disconnect test.
Stephan Bosch [Wed, 6 Mar 2019 21:15:50 +0000 (22:15 +0100)]
master: test-auth-master - Add support for retrying userdb lookups.
Stephan Bosch [Wed, 6 Mar 2019 22:00:29 +0000 (23:00 +0100)]
master: test-auth-master - Add passdb lookup reconnect test.
Stephan Bosch [Wed, 6 Mar 2019 21:54:57 +0000 (22:54 +0100)]
master: test-auth-master - Add passdb lookup disconnect test.
Stephan Bosch [Wed, 6 Mar 2019 21:08:04 +0000 (22:08 +0100)]
master: test-auth-master - Add support for retrying passdb lookups.
Stephan Bosch [Mon, 4 Mar 2019 23:48:11 +0000 (00:48 +0100)]
lib-auth: auth-master - Create ioloop before connecting to the auth service.
Stephan Bosch [Tue, 5 Mar 2019 00:43:16 +0000 (01:43 +0100)]
lib-auth: auth-master - Make sure connection is disconnected upon error.
Aki Tuomi [Tue, 26 Feb 2019 09:49:46 +0000 (11:49 +0200)]
auth-policy: Emit event when report finishes
Aki Tuomi [Thu, 21 Feb 2019 12:18:08 +0000 (14:18 +0200)]
auth: db-lua - Add method for creating request event
This is needed to make sure that correct event is used when
prefix logging is wanted.
Stephan Bosch [Thu, 21 Feb 2019 19:23:38 +0000 (20:23 +0100)]
auth: mech-gssapi - Fix compile problem.
Aki Tuomi [Mon, 18 Feb 2019 10:36:07 +0000 (12:36 +0200)]
auth-policy: Move result logging to auth policy code
Removes duplicate and also unnecessary logging of result
Aki Tuomi [Sat, 29 Dec 2018 20:15:38 +0000 (22:15 +0200)]
auth: Use request event for logging in generic logging
Aki Tuomi [Mon, 3 Dec 2018 08:50:48 +0000 (10:50 +0200)]
auth: Use event logging for subsys mech
Automated change
sed -i -e 's/auth_request_log_\(.*\)(\(.*\), AUTH_SUBSYS_MECH,/e_\1(\2->mech_event,/' *.c
Whitespace fixing done with custom script
Aki Tuomi [Mon, 3 Dec 2018 08:48:41 +0000 (10:48 +0200)]
auth: Use event logging for subsys db
Done with automated change
sed -i -e 's/auth_request_log_\(.*\)(\(.*\), AUTH_SUBSYS_DB,/e_\1(\2->authdb_event,/' *.c
Followed by coccinelle
@@
expression E;
@@
-E->authdb_event
+authdb_event(E)
and some manual cleanup
Whitespace fixing done with custom script
Stephan Bosch [Sat, 18 Aug 2018 15:55:24 +0000 (17:55 +0200)]
auth: Add events for passdb/userdb lookups
Aki Tuomi [Wed, 2 Jan 2019 08:08:42 +0000 (10:08 +0200)]
auth: userdb - add userdb_result_to_string
Aki Tuomi [Wed, 2 Jan 2019 08:08:16 +0000 (10:08 +0200)]
auth: passdb - Add passdb_result_to_string
Aki Tuomi [Tue, 20 Nov 2018 12:09:43 +0000 (14:09 +0200)]
auth: auth-worker - Add event
Aki Tuomi [Tue, 16 Oct 2018 10:39:14 +0000 (13:39 +0300)]
auth-policy: Use events
Aki Tuomi [Mon, 18 Feb 2019 11:26:18 +0000 (13:26 +0200)]
auth-policy: Use dedicated pool
Otherwise memory gets released too early.
Aki Tuomi [Thu, 14 Feb 2019 09:58:33 +0000 (11:58 +0200)]
auth-policy: Move callback to helper function
Aki Tuomi [Mon, 26 Nov 2018 12:23:11 +0000 (14:23 +0200)]
auth: Emit event when auth request is finished
Aki Tuomi [Tue, 4 Dec 2018 07:40:19 +0000 (09:40 +0200)]
auth: Add mechanism event
Stephan Bosch [Mon, 20 Aug 2018 22:48:38 +0000 (00:48 +0200)]
auth: Split creation of log identifier from get_log_prefix()
Aki Tuomi [Thu, 21 Feb 2019 06:50:49 +0000 (08:50 +0200)]
auth: Update dummy_set
Add auth_verbose, was forgotten in
b484ab4b55b0d5341f2f4dd98a655a75f0bf1275
Stephan Bosch [Thu, 14 Feb 2019 23:49:04 +0000 (00:49 +0100)]
master: test-master-login-auth - Add test for parallel requests.
Stephan Bosch [Thu, 14 Feb 2019 23:45:55 +0000 (00:45 +0100)]
lib-master: master-login-auth - Fix hang when auth server returns multiple replies at once.
input_args() should return 1 to continue reading input, while 0 stops it.
Stephan Bosch [Thu, 14 Feb 2019 22:13:35 +0000 (23:13 +0100)]
master: test-auth-client - Add test for parallel requests.
Stephan Bosch [Thu, 14 Feb 2019 22:20:13 +0000 (23:20 +0100)]
master: test-auth-client - Add progress timeout.
Martti Rannanjärvi [Thu, 14 Feb 2019 11:35:06 +0000 (13:35 +0200)]
lib-master: master-login-auth - Name auth finished event same way as the others
So change auth_master_client_login_finished to
auth_master_client_login_finished.
Timo Sirainen [Wed, 13 Feb 2019 08:42:31 +0000 (10:42 +0200)]
lib-auth: Fix hang when auth server returns multiple replies at once
input_line() should return 1 to continue reading input, while 0 stops it.
Broken by
a91862deade9dd12275f939f2716b5f56633f89e
Stephan Bosch [Thu, 7 Feb 2019 02:05:53 +0000 (03:05 +0100)]
master: test-auth-client - Drop useless local variable.
This addresses a scan-build report.
Stephan Bosch [Mon, 28 Jan 2019 22:04:57 +0000 (23:04 +0100)]
lib-auth: auth-client - Emit named events.
Stephan Bosch [Mon, 28 Jan 2019 20:19:41 +0000 (21:19 +0100)]
lib-auth: auth-client - Add support for event API and use it for logging.
Stephan Bosch [Sun, 3 Feb 2019 22:33:36 +0000 (23:33 +0100)]
lib-auth: auth-client - Add optional reason argument to auth_client_request_abort().
It is not actually used yet in this commit.
Stephan Bosch [Sun, 27 Jan 2019 21:04:05 +0000 (22:04 +0100)]
lib-auth: auth-client - Use the connection API.
Stephan Bosch [Mon, 28 Jan 2019 20:27:55 +0000 (21:27 +0100)]
lib-auth: auth-client - Free the request in a separate function.
Stephan Bosch [Sun, 27 Jan 2019 16:34:33 +0000 (17:34 +0100)]
lib-auth: auth-client - Rename auth_server_connection* to auth_client_connection*.
Stephan Bosch [Mon, 28 Jan 2019 19:55:16 +0000 (20:55 +0100)]
lib-auth: Move struct auth_client_request from auth-client-request.c to auth-client-private.h.
Stephan Bosch [Sun, 27 Jan 2019 16:29:31 +0000 (17:29 +0100)]
lib-auth: Move content of auth-client-request.h to auth-client-private.h.
Stephan Bosch [Sun, 27 Jan 2019 16:16:21 +0000 (17:16 +0100)]
lib-auth: Move remainder of auth-server-connection.h to auth-client-private.h.
Stephan Bosch [Sun, 27 Jan 2019 16:13:12 +0000 (17:13 +0100)]
lib-auth: Move struct auth_server_connection from auth-server-connection.h to auth-client-private.h.
Stephan Bosch [Sun, 27 Jan 2019 16:09:27 +0000 (17:09 +0100)]
lib-auth: Rename auth-server-connection.c to auth-client-connection.c.
Stephan Bosch [Sun, 27 Jan 2019 16:03:37 +0000 (17:03 +0100)]
doveadm: doveadm-auth-server - Remove useless include for auth-server-connection.h.
Stephan Bosch [Sun, 27 Jan 2019 15:59:32 +0000 (16:59 +0100)]
doveadm: doveadm-auth - Remove useless include for auth-server-connection.h.
Stephan Bosch [Sun, 27 Jan 2019 22:48:14 +0000 (23:48 +0100)]
lib: connection - Add vfunc called when the connection becomes ready after handshake.
Stephan Bosch [Fri, 1 Feb 2019 00:23:35 +0000 (01:23 +0100)]
master: Add unit test for auth-client.
Stephan Bosch [Sun, 3 Feb 2019 14:21:42 +0000 (15:21 +0100)]
lib-auth: auth-client - Add ability to configure the connect timeout.
This is currently only useful and required for unit tests (the default is just
too long).
Stephan Bosch [Sun, 3 Feb 2019 14:41:02 +0000 (15:41 +0100)]
lib-auth: auth-client: Do not connect implicitly in auth_client_init().