]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Mon, 27 Jul 2020 05:48:49 +0000 (08:48 +0300)]
lib-auth: Send event after setting all fields
Timo Sirainen [Thu, 6 Aug 2020 16:38:33 +0000 (19:38 +0300)]
man: doveadm-auth - List more -x fields
Timo Sirainen [Thu, 6 Aug 2020 11:13:29 +0000 (14:13 +0300)]
auth: Add some unit testing for auth_request_import/export()
Timo Sirainen [Thu, 6 Aug 2020 11:10:50 +0000 (14:10 +0300)]
auth: Escape exported session ID string in protocol replies
Session ID is normally coming only from trusted sources, so the lack of
escaping shouldn't have mattered too much.
Timo Sirainen [Wed, 5 Aug 2020 19:48:40 +0000 (22:48 +0300)]
auth: Worker commands: Rename "id" event field to "command_id"
Now that auth_request events are inherited from worker command events, the
"id" field was also inherited. This is rather confusing and might conflict
with other IDs in the future, so better to rename it already.
Timo Sirainen [Wed, 5 Aug 2020 19:45:30 +0000 (22:45 +0300)]
auth: Support inheritance for master auth_requests' events
Requests created by auth worker will inherit from the command's event, while
other events inherit from the global auth_event for now (since
auth-master-connection doesn't have its own event yet).
Timo Sirainen [Wed, 5 Aug 2020 19:43:55 +0000 (22:43 +0300)]
auth: Inherit auth client connection event from the global auth_event
Timo Sirainen [Thu, 25 Jun 2020 17:03:57 +0000 (20:03 +0300)]
doveadm auth: Support forward and extra fields with -x parameter
Using "forward_" prefix assumes that it's a forwarded field. Otherwise
all unknown parameters are assumed to be extra fields.
Timo Sirainen [Wed, 5 Aug 2020 19:25:12 +0000 (22:25 +0300)]
lib-auth: auth-client - Support sending extra_fields.
Stephan Bosch [Thu, 28 May 2020 21:10:41 +0000 (23:10 +0200)]
lib-auth: auth-master - Support sending extra_fields.
Timo Sirainen [Tue, 4 Aug 2020 14:35:30 +0000 (17:35 +0300)]
auth: Add more event fields
Timo Sirainen [Tue, 4 Aug 2020 14:34:42 +0000 (17:34 +0300)]
auth: Set event fields immediately when they're changed in auth_request_fields
This way the fields are available for all auth events, not just the final
events.
Timo Sirainen [Thu, 6 Aug 2020 09:29:07 +0000 (12:29 +0300)]
auth: Remove "username" and "domain" event fields
They're not very useful in event fields, since event filtering can just do
user=username@* or user=*@domain.
Timo Sirainen [Tue, 4 Aug 2020 14:30:02 +0000 (17:30 +0300)]
auth: Remove "credentials_scheme" event field
This field wasn't set for plaintext authentication, and in general it's not
quite what it was intended to be. Better to remove it entirely to avoid
confusion.
Timo Sirainen [Tue, 4 Aug 2020 14:29:32 +0000 (17:29 +0300)]
auth: Rename auth_request.credentials_scheme to wanted_credentials_scheme
Also add comments explaining what it actually does.
Timo Sirainen [Tue, 4 Aug 2020 13:46:15 +0000 (16:46 +0300)]
auth: Rename "orig_user" event field to "original_user"
It's a bit more understandable to use the full name. There's now also
%{original_user} variable alias.
Timo Sirainen [Tue, 4 Aug 2020 13:30:59 +0000 (16:30 +0300)]
auth: Rename "mech" event field to "mechanism"
It's a bit more understandable to use the full name. There's now also
%{mechanism} variable alias.
Timo Sirainen [Mon, 3 Aug 2020 15:51:33 +0000 (18:51 +0300)]
auth: Keep auth_request_fields const for most of the code
This way there's a compiler warning/error if anything outside
auth-request-fields.c attempts to modify them. It makes it easier to
keep the values synced with events.
Timo Sirainen [Tue, 4 Aug 2020 13:16:18 +0000 (16:16 +0300)]
auth: test-mech - Fix include ordering
Required by the following change.
Timo Sirainen [Tue, 4 Aug 2020 11:48:23 +0000 (14:48 +0300)]
auth: Add and use auth_request_set_delayed_credentials()
Timo Sirainen [Tue, 4 Aug 2020 11:44:00 +0000 (14:44 +0300)]
auth: Add and use auth_request_set_login_username_forced()
Timo Sirainen [Tue, 4 Aug 2020 11:28:28 +0000 (14:28 +0300)]
auth: LIST - Use auth_request_import() to set missing "service"
Timo Sirainen [Tue, 4 Aug 2020 11:26:08 +0000 (14:26 +0300)]
auth: Use auth_request_init_userdb_reply() always for initializing userdb_reply
Timo Sirainen [Tue, 4 Aug 2020 11:23:18 +0000 (14:23 +0300)]
auth: auth_request_init_userdb_reply() - Add add_default_fields parameter
Timo Sirainen [Tue, 4 Aug 2020 11:22:16 +0000 (14:22 +0300)]
auth: Move auth_request_init_userdb_reply() to auth-request-fields.c
Timo Sirainen [Tue, 4 Aug 2020 09:42:22 +0000 (12:42 +0300)]
auth: Add and use auth_request_set_password_verified()
Timo Sirainen [Tue, 4 Aug 2020 09:32:27 +0000 (12:32 +0300)]
auth: Add and use auth_request_set_auth_successful()
Timo Sirainen [Mon, 3 Aug 2020 14:32:34 +0000 (17:32 +0300)]
auth: Add and use auth_request_set_realm()
Timo Sirainen [Mon, 3 Aug 2020 14:25:59 +0000 (17:25 +0300)]
auth: Add and use auth_request_set_username_forced()
Timo Sirainen [Tue, 4 Aug 2020 11:41:42 +0000 (14:41 +0300)]
auth: Change auth_request_fix_username() to return int
Timo Sirainen [Tue, 4 Aug 2020 11:35:49 +0000 (14:35 +0300)]
auth: Optimize memory usage when auth_username_format is set
The per-request memory pool was used unnecessarily to allocate the username
before the formatting was applied.
Timo Sirainen [Mon, 3 Aug 2020 14:16:12 +0000 (17:16 +0300)]
auth: Move auth_request_fields initialization code to auth_request_fields_init()
Timo Sirainen [Mon, 3 Aug 2020 14:11:14 +0000 (17:11 +0300)]
auth: Move auth_request_master_lookup_finish() to auth-request-fields.c
Also rename it to auth_request_master_user_login_finish().
Timo Sirainen [Mon, 3 Aug 2020 14:07:22 +0000 (17:07 +0300)]
auth: Move username changing functions to auth-request-fields.c
Timo Sirainen [Mon, 3 Aug 2020 14:06:23 +0000 (17:06 +0300)]
auth: Change auth_request_get_log_prefix_db() to be public
Timo Sirainen [Mon, 3 Aug 2020 13:49:00 +0000 (16:49 +0300)]
auth: test-lua - Use auth_request_set_username()
Instead of changing the user directly.
Timo Sirainen [Mon, 3 Aug 2020 13:43:56 +0000 (16:43 +0300)]
auth: test-lua - Deduplicate code into test_db_lua_auth_request_new()
Timo Sirainen [Mon, 3 Aug 2020 13:28:57 +0000 (16:28 +0300)]
auth: auth_request_fix_username() - Don't temporarily modify auth_request_fields.user
Use the new username parameter in auth_request_get_var_expand_table_full()
instead.
Timo Sirainen [Mon, 3 Aug 2020 13:26:11 +0000 (16:26 +0300)]
auth: auth_cache_insert() - Don't temporarily modify auth_request_fields.user
Use the new username parameter in auth_request_get_var_expand_table_full()
instead.
Timo Sirainen [Mon, 3 Aug 2020 13:18:00 +0000 (16:18 +0300)]
auth: auth_request_get_var_expand_table_full() - Add username parameter
Timo Sirainen [Tue, 4 Aug 2020 13:45:19 +0000 (16:45 +0300)]
auth: Add %{original_*} aliases for %{orig_*}
Timo Sirainen [Tue, 4 Aug 2020 13:19:29 +0000 (16:19 +0300)]
auth: Add %{mechanism} alias for %{mech}
Timo Sirainen [Mon, 27 Apr 2020 13:43:39 +0000 (16:43 +0300)]
auth: Add %{[real_]local/remote_ip/port} aliases for %{[real_]lip/rip/lport/rport)
Timo Sirainen [Mon, 3 Aug 2020 12:10:35 +0000 (15:10 +0300)]
auth: Move auth_request_export/import*() to auth-request-fields.c
Timo Sirainen [Mon, 3 Aug 2020 11:56:12 +0000 (14:56 +0300)]
auth: Move imported/exported fields to struct auth_request_fields
This makes it clearer what fields are being passed between auth master and
worker processes.
Timo Sirainen [Mon, 3 Aug 2020 11:31:30 +0000 (14:31 +0300)]
auth: Remove auth_request->debug
Use event_want_debug(auth_request->event) instead.
Timo Sirainen [Mon, 3 Aug 2020 11:29:55 +0000 (14:29 +0300)]
auth: Remove unnecessary auth_request->debug checks
e_debug() already checks whether debug logging is enabled.
Timo Sirainen [Sun, 26 Apr 2020 17:15:39 +0000 (20:15 +0300)]
lib: events - Use const event pointer for "get" functions
Timo Sirainen [Mon, 24 Aug 2020 12:00:39 +0000 (15:00 +0300)]
lib-storage: mail_user_init_fs_settings() - Use user's event as fs parent event
Aki Tuomi [Thu, 13 Aug 2020 16:13:49 +0000 (19:13 +0300)]
auth: test-mech - Fix type mismatch
Aki Tuomi [Thu, 13 Aug 2020 16:13:04 +0000 (19:13 +0300)]
auth: test-mech - Fix APOP challenge format
Stephan Bosch [Mon, 17 Aug 2020 16:06:14 +0000 (18:06 +0200)]
submission: submission-backend-relay - Handle relay server replies consistently.
Initial connection setup errors were handled differently when the reply came
into the ready callback first.
Stephan Bosch [Wed, 11 Jul 2018 22:15:23 +0000 (00:15 +0200)]
lib-smtp: test-smtp-client-errors - Add test for server presenting invalid SSL certificate.
Stephan Bosch [Sat, 14 Jul 2018 11:16:05 +0000 (13:16 +0200)]
lib-smtp: smtp-client-connection - If SSL connection gets lost, log the last SSL error.
Stephan Bosch [Wed, 11 Jul 2018 22:15:31 +0000 (00:15 +0200)]
lib-smtp: smtp-client-connection - Handle connection loss uniformly at a single location.
Also amend the logged error message with SSL information when relevant.
Stephan Bosch [Sat, 14 Jul 2018 10:19:07 +0000 (12:19 +0200)]
lib-smtp: smtp-client-connection - Properly log SSL handshake failure occuring during input read as an error.
Stephan Bosch [Sat, 14 Jul 2018 09:35:20 +0000 (11:35 +0200)]
lib-smtp: smtp-client-connection - Restructure handling of immediate connection failure.
The delayed error callback is now started at a single location, much like
lib-http/client deals with this situation.
Timo Sirainen [Mon, 4 May 2020 14:21:23 +0000 (17:21 +0300)]
master: Make sure a listener isn't added to a throttled service
This fixes master process using 100% CPU in some situations when a service
is being throttled.
Paul G. Banks [Sun, 16 Aug 2020 09:57:36 +0000 (10:57 +0100)]
auth: mech-gssapi - GSSAPI can contain NUL.
Timo Sirainen [Mon, 17 Aug 2020 16:16:01 +0000 (19:16 +0300)]
imap: Add "mailbox" field to successful imap_client_unhibernated event
Timo Sirainen [Mon, 17 Aug 2020 16:10:35 +0000 (19:10 +0300)]
imap-hibernate: Add "mailbox" field to events
Timo Sirainen [Mon, 17 Aug 2020 12:33:23 +0000 (15:33 +0300)]
imap, imap-hibernate: Track how long hibernation lasted
Timo Sirainen [Mon, 17 Aug 2020 12:39:19 +0000 (15:39 +0300)]
imap-hibernate: Add imap_client_unhibernate_retried event
Timo Sirainen [Mon, 17 Aug 2020 11:03:53 +0000 (14:03 +0300)]
imap-hibernate: Add imap_client_unhibernated event for errors
Successful unhibernation is logged by imap process.
Timo Sirainen [Mon, 17 Aug 2020 10:55:18 +0000 (13:55 +0300)]
imap-hibernate: Handle unhibernation errors more consistently.
Log an error with the exact reason, and just log "Failed to unhibernate
client" as the info-level disconnect reason.
Timo Sirainen [Mon, 17 Aug 2020 10:53:50 +0000 (13:53 +0300)]
imap-hibernate: Fix error handling when unhibernation retry timeout is reached
An error message wasn't logged, and a wrong kind of message was logged in
the info line.
Timo Sirainen [Mon, 17 Aug 2020 10:53:28 +0000 (13:53 +0300)]
imap-hibernate: Split off imap_move_has_reached_timeout()
Timo Sirainen [Mon, 17 Aug 2020 12:06:42 +0000 (15:06 +0300)]
imap: Add imap_client_unhibernated event
Timo Sirainen [Mon, 17 Aug 2020 11:48:01 +0000 (14:48 +0300)]
imap: Send unhibernation OK reply to imap-hibernate only after creating client
The following commit adds unhibernation event, which would be much more
difficult to implement for this error path without this change.
The OK reply is still sent before client_create_finish(), which is the part
that could be slow.
Timo Sirainen [Mon, 17 Aug 2020 11:55:55 +0000 (14:55 +0300)]
imap: Set unhibernation IDLE state earlier
This simplifies the following changes.
Timo Sirainen [Mon, 17 Aug 2020 10:34:35 +0000 (13:34 +0300)]
imap: Add imap_client_hibernated event
Timo Sirainen [Mon, 17 Aug 2020 10:08:50 +0000 (13:08 +0300)]
imap-hibernate: Log via imap_client.event or connection.event
Timo Sirainen [Mon, 17 Aug 2020 10:08:19 +0000 (13:08 +0300)]
imap-hibernate: Add imap_client.event
Timo Sirainen [Mon, 17 Aug 2020 10:07:49 +0000 (13:07 +0300)]
imap-hibernate: Preserve local_port and remote_port during hibernation
Timo Sirainen [Mon, 17 Aug 2020 09:47:53 +0000 (12:47 +0300)]
imap: Log ID and logout info lines via imap_client.event
This doesn't change the logging output at all.
Timo Sirainen [Mon, 17 Aug 2020 09:45:08 +0000 (12:45 +0300)]
imap: Log imap-master errors/debugs via connection.event
Timo Sirainen [Mon, 17 Aug 2020 09:43:12 +0000 (12:43 +0300)]
imap: Log errors via imap_client.event when possible
Timo Sirainen [Mon, 17 Aug 2020 10:28:58 +0000 (13:28 +0300)]
imap: imap_hibernate_process_send() - Return error instead of logging it
Timo Sirainen [Mon, 17 Aug 2020 12:28:00 +0000 (15:28 +0300)]
lib: Add str_to_timeval()
Timo Sirainen [Thu, 20 Aug 2020 13:17:48 +0000 (16:17 +0300)]
director: Use director_connection.event wherever possible
This adds the "director(name): " log prefix to many log messages where it
didn't previously exist. The director name is now sometimes duplicated in
the log messages, but maybe that's good for clarity.
Timo Sirainen [Thu, 20 Aug 2020 13:11:56 +0000 (16:11 +0300)]
director: Avoid explicit log prefixes by logging via director_connection.event
Timo Sirainen [Thu, 20 Aug 2020 13:07:00 +0000 (16:07 +0300)]
director: Add director_connection.event
Timo Sirainen [Thu, 20 Aug 2020 13:05:23 +0000 (16:05 +0300)]
director: Add director_connection_set_name() change connection name
Timo Sirainen [Thu, 31 Oct 2019 17:15:22 +0000 (19:15 +0200)]
director: Replace most of the i_error() logging with e_error()
Timo Sirainen [Thu, 31 Oct 2019 17:10:22 +0000 (19:10 +0200)]
director: Replace i_warning() and i_info() logging with e_*()
Timo Sirainen [Thu, 31 Oct 2019 17:17:28 +0000 (19:17 +0200)]
director: Add auth_connection.dir
Timo Sirainen [Thu, 31 Oct 2019 17:09:35 +0000 (19:09 +0200)]
director: Add user_directory.director
Timo Sirainen [Thu, 31 Oct 2019 17:06:46 +0000 (19:06 +0200)]
director: Add mail_host_list.dir
Timo Sirainen [Thu, 31 Oct 2019 17:00:57 +0000 (19:00 +0200)]
director: Remove dir_debug() and director_debug
Timo Sirainen [Thu, 31 Oct 2019 16:59:57 +0000 (18:59 +0200)]
director: director-request: Add event and replace dir_debug() with e_debug()
Timo Sirainen [Thu, 31 Oct 2019 16:56:56 +0000 (18:56 +0200)]
director: Replace most of the dir_debug() with e_debug()
Timo Sirainen [Thu, 31 Oct 2019 16:49:59 +0000 (18:49 +0200)]
director: Add struct director.event
Rosen Penev [Thu, 8 Nov 2018 00:51:49 +0000 (16:51 -0800)]
lib: Fix compilation with OpenSSL deprecated APIs disabled
OpenSSL with no deprecated APIs does not implicitly include header files.
Josef 'Jeff' Sipek [Fri, 7 Aug 2020 15:11:21 +0000 (11:11 -0400)]
lib: Always use the representative when comparing event's categories
We need to be consistent about using the representative category pointer.
Otherwise, we may end up with duplicates in an event's categories array.
Since an event's categories are conceptually a set, it is reasonable to
write event using code that assumes no duplicates. If duplicates are
present, it may lead to incorrect behavior or even crashes.
Josef 'Jeff' Sipek [Fri, 14 Aug 2020 14:25:33 +0000 (10:25 -0400)]
lib: event-filter-parser - Use str_begins() to compare unit test error strings
Different versions of bison generate slightly different error strings, but
they always begin the same way. So, instead of comparing them let's only
compare the beginning.
Josef 'Jeff' Sipek [Fri, 14 Aug 2020 13:26:12 +0000 (09:26 -0400)]
lib: event-filter-parser - YYERROR_VERBOSE has been deprecated since 2003
The proper way to enable verbose error messages is to use the parse.error
define.
Timo Sirainen [Thu, 13 Aug 2020 21:36:19 +0000 (00:36 +0300)]
lib: Add unit test for long log line splitting
Timo Sirainen [Thu, 13 Aug 2020 19:49:43 +0000 (22:49 +0300)]
lib-index: Remove log prefix from cache events
Index events don't have a prefix either. The parent event likely already
contains the mailbox name, which should be enough. It's especially bad
using the full filesystem path in the event prefix, because it could be
very long.
Timo Sirainen [Thu, 13 Aug 2020 19:47:02 +0000 (22:47 +0300)]
global: Make sure event log prefixes are sanitized and not excessively long
It doesn't make sense to allow log prefixes to grow to kilobytes long,
especially from user-given input.
Timo Sirainen [Thu, 13 Aug 2020 19:18:41 +0000 (22:18 +0300)]
lib: Fix sending log lines when prefix is larger than PIPE_BUF
This caused the log line to be sent repeatedly to the log process, possibly
causing hundreds of duplicate log lines.