]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Mon, 25 Feb 2019 14:40:46 +0000 (16:40 +0200)]
doveadm: server-connection - Remove redundant ssl verification
Certificate validation is done by lib-ssl-iostream already,
don't do it here again.
Fixes ssl_client_require_valid_cert=no for doveadm sync
Aki Tuomi [Mon, 25 Feb 2019 14:46:59 +0000 (16:46 +0200)]
doveadm: Make sure SSL settings are always available
Aki Tuomi [Mon, 25 Feb 2019 16:07:45 +0000 (18:07 +0200)]
lib-ssl-iostream: Add comment about using ssl_iostream_check_cert_validity
Aki Tuomi [Mon, 25 Feb 2019 15:22:57 +0000 (17:22 +0200)]
lib-ssl-iostream: Add comment about verifying certs in callbacks
Aki Tuomi [Mon, 25 Feb 2019 15:44:09 +0000 (17:44 +0200)]
lib-ssl-iostream: Call ssl_iostream_check_cert_validity as default
Unless callback is specified, call ssl_iostream_check_cert_validity
instead of ssl_iostream_cert_match_name to make sure we perform
same checks consistently.
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 [Wed, 20 Feb 2019 21:19:03 +0000 (22:19 +0100)]
lib-http: http-client-connection - Create function for obtaining client settings reliably.
This fixes and prevents segfaults occurring when settings are needed while the
connection is detached. In that case, the shared client context settings need
to be used rather than the client settings. Before, the attachment of a peer was
assumed for obtaining the settings when it actually could be absent in rare
cases, causing a NULL dereference.
Stephan Bosch [Thu, 14 Feb 2019 21:02:03 +0000 (22:02 +0100)]
lib-http: http-client-connection - Make sure the request timeout is stopped when no more request are pending.
Stephan Bosch [Thu, 14 Feb 2019 20:16:26 +0000 (21:16 +0100)]
lib-http: http-client-connection - Descend event from client context rather than client.
The connection is potentially switched between clients often causing the
client event prefix to make no sense.
Stephan Bosch [Wed, 6 Feb 2019 23:35:10 +0000 (00:35 +0100)]
lib-smtp: smtp-client-transaction - Add event field for the amount of data sent.
Stephan Bosch [Sat, 9 Feb 2019 12:55:22 +0000 (13:55 +0100)]
lib-smtp: smtp-client - Perform the LF -> CRLF conversion for the message data in the transaction.
Before, it was performed in the DATA/BDAT command code, which makes it very
difficult to extract post-conversion size statistics.
Stephan Bosch [Sat, 9 Feb 2019 12:41:40 +0000 (13:41 +0100)]
lib-smtp: smtp-client-command.h - Reformat the comments for the standard commands.
Stephan Bosch [Wed, 6 Feb 2019 22:06:38 +0000 (23:06 +0100)]
lib-smtp: smtp-client-transaction - Emit named recipient events.
Stephan Bosch [Sun, 16 Dec 2018 18:16:37 +0000 (19:16 +0100)]
lib-smtp: smtp-client-transaction - Emit named events.
Stephan Bosch [Sun, 3 Feb 2019 23:48:58 +0000 (00:48 +0100)]
lib-smtp: smtp-client-transaction - Pass last reply to smtp_client_transaction_finish().
Stephan Bosch [Sat, 9 Feb 2019 13:39:24 +0000 (14:39 +0100)]
lib-smtp: smtp-client-transaction - Record the first failure reply of the DATA command.
This is needed when the DATA command yields more than a single reply (LMTP).
Stephan Bosch [Sat, 9 Feb 2019 12:22:38 +0000 (13:22 +0100)]
lib-smtp: smtp-client-transaction - Record recipient statistics in the transaction.
Stephan Bosch [Sat, 9 Feb 2019 12:01:01 +0000 (13:01 +0100)]
lib-smtp: smtp-client-transaction - Drop smtp_client_transaction_rcpt_drop_pending() as a separate function.
It is now merged into smtp_client_transaction_rcpt_approved() to make the code
less confusing.
Stephan Bosch [Sat, 9 Feb 2019 11:50:12 +0000 (12:50 +0100)]
lib-smtp: smtp-client-transaction - Drop the rcpt->failed flag.
It is no longer needed.
Stephan Bosch [Sat, 9 Feb 2019 11:44:04 +0000 (12:44 +0100)]
lib-smtp: smtp-client-transaction - Explicitly keep track of whether a recipient is already finished.
Stephan Bosch [Sat, 9 Feb 2019 11:32:44 +0000 (12:32 +0100)]
lib-smtp: smtp-client-transaction - Free the rcpt object in smtp_client_transaction_rcpt_fail_reply().
Stephan Bosch [Sat, 9 Feb 2019 11:22:40 +0000 (12:22 +0100)]
lib-smtp: smtp-client-transaction - Handle recipient failure callback in a separate _rcpt function.
Stephan Bosch [Sat, 9 Feb 2019 11:17:40 +0000 (12:17 +0100)]
lib-smtp: smtp-client-transaction - Handle recipient DATA callback in a separate _rcpt function.
Stephan Bosch [Sat, 9 Feb 2019 11:14:21 +0000 (12:14 +0100)]
lib-smtp: smtp-client-transaction - Handle RCPT reply in a separate _rcpt function.
Stephan Bosch [Sat, 9 Feb 2019 13:30:53 +0000 (14:30 +0100)]
lib-smtp: smtp-client-transaction - Free the mail object in smtp_client_transaction_mail_fail_reply().
Stephan Bosch [Sat, 9 Feb 2019 13:26:48 +0000 (14:26 +0100)]
lib-smtp: smtp-client-transaction - Handle MAIL failure callback in a separate _mail function.
Stephan Bosch [Sat, 9 Feb 2019 13:18:02 +0000 (14:18 +0100)]
lib-smtp: smtp-client-transaction - Handle MAIL reply in a separate _mail function.
Stephan Bosch [Wed, 6 Feb 2019 22:47:31 +0000 (23:47 +0100)]
lib-smtp: smtp-params - Add support for adding RCPT parameters to an event.
Stephan Bosch [Wed, 6 Feb 2019 22:31:25 +0000 (23:31 +0100)]
lib-smtp: smtp-params - Add support for adding MAIL parameters to an event.
Stephan Bosch [Mon, 4 Feb 2019 00:26:44 +0000 (01:26 +0100)]
lib-smtp: smtp-client-command - Emit named events.
Stephan Bosch [Mon, 4 Feb 2019 00:31:40 +0000 (01:31 +0100)]
lib-smtp: smtp-client-command - Create local variable for "was_sent" command status.
The condition is amended with (state < SMTP_CLIENT_COMMAND_STATE_FINISHED),
because that part is now checked after the intiialization of this variable
(causing the function to exit). It is important that the content of this
variable makes sense immediately (for future changes), rather than only after
the if statement that checks the added condition.
Stephan Bosch [Mon, 4 Feb 2019 00:29:08 +0000 (01:29 +0100)]
lib-smtp: smtp-client-command - Rename "waslocked" to "was_locked" in smtp_client_command_abort().
Stephan Bosch [Mon, 4 Feb 2019 00:25:59 +0000 (01:25 +0100)]
lib-smtp: smtp-reply - Add smtp_reply_add_to_event().
This sets standard reply fields in the provided pass-through event.
Stephan Bosch [Fri, 30 Nov 2018 01:05:13 +0000 (02:05 +0100)]
lib-smtp: smtp-client-connection - Add peer fields to the connection events.
Stephan Bosch [Thu, 29 Nov 2018 22:44:23 +0000 (23:44 +0100)]
lib-smtp: smtp-client - Replace smtp_*_debug() with e_debug().
Stephan Bosch [Mon, 24 Dec 2018 00:23:57 +0000 (01:23 +0100)]
lib-smtp: smtp-client - Replace smtp_*_warning() with e_warning().
Stephan Bosch [Mon, 24 Dec 2018 00:06:11 +0000 (01:06 +0100)]
lib-smtp: smtp-client - Replace smtp_*_error() with e_error().
Stephan Bosch [Sun, 23 Dec 2018 23:52:54 +0000 (00:52 +0100)]
lib-smtp: smtp-client - Replace i_error() with e_error().
Stephan Bosch [Thu, 29 Nov 2018 22:08:48 +0000 (23:08 +0100)]
lib-smtp: smtp-client - Remove redundant debug logging checks.
Stephan Bosch [Thu, 29 Nov 2018 21:55:08 +0000 (22:55 +0100)]
lib-smtp: smtp-client - Add support for event API.
Stephan Bosch [Fri, 30 Nov 2018 01:25:36 +0000 (02:25 +0100)]
lib-smtp: smtp-client-command - Split command name extraction from label construction.
Stephan Bosch [Sun, 3 Feb 2019 23:53:36 +0000 (00:53 +0100)]
lib-smtp: smtp-reply - Add smtp_reply_get_message().
Returns only the message of the reply without statuses as a single line.
Aki Tuomi [Sun, 17 Feb 2019 21:02:16 +0000 (23:02 +0200)]
doveadm-server: Load SSL settings
Otherwise operations that might use ssl can lead
into invalid memory access.
Timo Sirainen [Tue, 19 Feb 2019 08:49:37 +0000 (10:49 +0200)]
lib: test-istream-seekable - Add asserts to make sure blocking state changes at EOF
Timo Sirainen [Tue, 19 Feb 2019 08:22:43 +0000 (10:22 +0200)]
lib-storage: mail_get_*stream*() - Assert that returned streams are blocking
Several callers already rely on them being blocking. Making these asserts
explicit makes sure that any bugs are caught early.
Timo Sirainen [Tue, 19 Feb 2019 08:17:45 +0000 (10:17 +0200)]
lib: istream-seekable - Change stream to be blocking=TRUE after reaching EOF
After EOF is reached, the stream is now fully read into file or memory.
read()s can no longer return 0, so blocking=TRUE can be used.
Some callers were reusing the seekable stream in places that required
blocking=TRUE.
Fixes at least with imapsieve vnd.dovecot report extension:
Panic: file ostream.c: line 427 (o_stream_nsend_istream): assertion failed: (instream->blocking)
Stephan Bosch [Tue, 19 Feb 2019 10:31:45 +0000 (11:31 +0100)]
lib-ssl-iostream: iostream-ssl-test - Update the test certificate to have very long expiry period.
The old certificate expired after one year, which causes all kinds of unit test
failures.
Sergey Kitov [Thu, 14 Feb 2019 14:03:02 +0000 (16:03 +0200)]
auth: Add caching to passdb-oauth.
Sergey Kitov [Tue, 5 Feb 2019 07:43:09 +0000 (09:43 +0200)]
auth: Add support for oauth2 password grant
Sergey Kitov [Tue, 5 Feb 2019 07:45:07 +0000 (09:45 +0200)]
lib-oauth2: Implement password grant authentication.
Sergey Kitov [Thu, 31 Jan 2019 08:36:49 +0000 (10:36 +0200)]
lib-oauth2: Take http_client_request_url_str in use for oauth2 requests.
Sergey Kitov [Thu, 31 Jan 2019 08:31:43 +0000 (10:31 +0200)]
lib-http: Expose origin_url of the struct http_client_request
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.
Stephan Bosch [Wed, 13 Feb 2019 21:21:21 +0000 (22:21 +0100)]
submission-login: Only overwrite XCLIENT fields in the client when a value is assigned.
Before, omitted fields in the XCLIENT command would cause the values in the
client to be reset to the equivalent of zero.
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
Aki Tuomi [Fri, 8 Feb 2019 18:47:42 +0000 (20:47 +0200)]
lib-smtp: Mark default as unreached in smtp_client_command_abort
Satisfies static analyzers
Stephan Bosch [Thu, 7 Feb 2019 01:37:27 +0000 (02:37 +0100)]
lib-smtp: smtp-client-command - Avoid calling the callback for the DATA command during submission.
This causes a race condition in which the command object is already freed when
it is returned from smtp_client_command_data_submit(). This scenario occurs when
reading data for the first BDAT command fails.
Stephan Bosch [Wed, 6 Feb 2019 19:54:26 +0000 (20:54 +0100)]
lib-smtp: smtp-client - Send correct size value for BDAT command when the data lacks CR.
The addition of CR was ignored in the size specification because the original
unaltered stream was used for the size calculations.
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 [Wed, 6 Feb 2019 21:34:32 +0000 (22:34 +0100)]
lib-smtp: smtp-client - Fix sending of duplicate QUIT command.
The command name comparison function was broken after the command was sent. Made
the function robust against addition/removal of CRLF to the command line.
Timo Sirainen [Tue, 22 Jan 2019 20:45:33 +0000 (22:45 +0200)]
lib: istreams - Don't lose IO pending state when unsetting and setting io
This makes sure that the pending state stays even after io_remove() when
io_add_istream() is again called.
Timo Sirainen [Tue, 22 Jan 2019 10:59:57 +0000 (12:59 +0200)]
lib: Fix i_stream_set_input_pending() when IO is set later
After i_stream_set_io() is called to set the IO, it should already be marked
as pending.
This fixes at least running imaptest with SSL.
Timo Sirainen [Tue, 22 Jan 2019 20:43:53 +0000 (22:43 +0200)]
lib: Add io_is_pending()
Aki Tuomi [Wed, 16 Jan 2019 16:28:57 +0000 (18:28 +0200)]
auth: Do not import empty certificate username
Aki Tuomi [Wed, 16 Jan 2019 16:24:20 +0000 (18:24 +0200)]
auth: Fail authentication if certificate username was unexpectedly missing
Aki Tuomi [Tue, 15 Jan 2019 15:36:37 +0000 (17:36 +0200)]
login-common: Ensure we get username from certificate
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.