]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Thu, 27 Jul 2023 11:45:06 +0000 (14:45 +0300)]
global: Replace fs_settings.debug with parent event that has debugging enabled
Timo Sirainen [Thu, 27 Jul 2023 11:19:36 +0000 (14:19 +0300)]
lib-fs: Remove unused fs_init_from_string()
Timo Sirainen [Thu, 27 Jul 2023 11:19:08 +0000 (14:19 +0300)]
mail-crypt: test-fs-crypt - Replace fs_init_from_string() with fs_init()
There was no benefit in using it.
Timo Sirainen [Fri, 28 Jul 2023 09:29:34 +0000 (12:29 +0300)]
lib-fs: Remove obsolete comment
Use of T_END_PASS_STR_IF() removed the kludge.
Timo Sirainen [Sat, 29 Jul 2023 10:53:41 +0000 (13:53 +0300)]
global: Remove unnecessary settings-parser.h includes
It's already included by including settings.h.
Timo Sirainen [Sat, 29 Jul 2023 10:50:02 +0000 (13:50 +0300)]
lib-settings: settings.h - Include settings-parser.h automatically
These are nowadays usually both included, so it simplifies the code.
Timo Sirainen [Sat, 29 Jul 2023 10:57:12 +0000 (13:57 +0300)]
lib-settings: settings-legacy - Rename setting_type to setting_legacy_type
This allows including both settings-parser.h and settings-legacy.h
Timo Sirainen [Wed, 23 Aug 2023 01:23:13 +0000 (21:23 -0400)]
config: Allow named array filters under named filters
This is needed for at least obox { crypt_global_private_key { .. } }
Timo Sirainen [Wed, 23 Aug 2023 01:21:15 +0000 (21:21 -0400)]
lib-settings: Make settings_root_deinit(&NULL) no-op
Timo Sirainen [Fri, 4 Aug 2023 13:03:12 +0000 (16:03 +0300)]
config: Fix using filter_name/strlist/key in default settings
Timo Sirainen [Fri, 28 Jul 2023 12:36:22 +0000 (15:36 +0300)]
lib-settings, config: Add support for SET_FILTER_HIERARCHY
Timo Sirainen [Mon, 24 Jul 2023 20:05:18 +0000 (23:05 +0300)]
lib-http, global: Rename http_client_no_* settings
Remove double negatives:
* http_client_proxy_no_ssl_tunnel -> http_client_proxy_ssl_tunnel
* http_client_no_auto_redirect -> http_client_auto_redirect
* http_client_no_auto_retry -> http_client_auto_retry
Timo Sirainen [Mon, 24 Jul 2023 20:09:11 +0000 (23:09 +0300)]
lib-http: Change http_client_settings.max_connect_attempts=1 behavior
Before 1 meant the same as 0, which means "try every IP once". But there
is no need for two values to mean the same, so now 1 means "try only 1
IP".
Timo Sirainen [Mon, 24 Jul 2023 19:48:25 +0000 (22:48 +0300)]
lib-http, global: Add and use http_client_settings_init()
Timo Sirainen [Mon, 24 Jul 2023 21:27:44 +0000 (00:27 +0300)]
lib-http: Add http_client_settings.read/write/delete_max_attempts
If they are non-zero, they override the max_attempts setting for the
specified HTTP methods.
Timo Sirainen [Mon, 24 Jul 2023 19:31:07 +0000 (22:31 +0300)]
lib-http: Add http_client_settings.read/write/delete_request_timeout
If they are non-zero, they override the request_timeout setting for the
specified HTTP methods.
Timo Sirainen [Mon, 24 Jul 2023 15:53:53 +0000 (18:53 +0300)]
lib-dns: dns_client_init() - Assert dns_client_socket_path isn't empty
It's easier to debug assert-crashes than seeing an empty error in logs.
Timo Sirainen [Mon, 24 Jul 2023 15:18:32 +0000 (18:18 +0300)]
auth: oauth2 - Use http_client_init_auto()
This adds oauth2 { .. } named filter, which can be used to override http
and ssl settings. The following settings were replaced:
* tls_ca_cert_file -> ssl_client_ca_file
* tls_ca_cert_dir -> ssl_client_ca_dir
* tls_cert_file -> ssl_client_cert
* tls_cipher_suite -> ssl_client_cipher_list
* rawlog_dir -> http_client_rawlog_dir
* timeout_msecs -> http_client_request_absolute_timeout
* max_idle_time_msecs -> http_client_max_idle_time
* max_parallel_connections -> http_client_max_parallel_connections
* max_pipelined_requests -> http_client_max_pipelined_requests
* tls_allow_invalid_cert -> http_client_allow_invalid_cert
Timo Sirainen [Mon, 24 Jul 2023 15:15:30 +0000 (18:15 +0300)]
lib-oauth2, auth: Set HTTP absolute request timeout via http_client_settings
Timo Sirainen [Tue, 27 Jun 2023 21:34:39 +0000 (00:34 +0300)]
auth: auth-policy - Use http_client_init_auto()
This adds auth_policy { .. } named filter, which can be used to override
http settings. auth_policy_server_timeout_msecs setting is replaced by
auth_policy { http_client_request_absolute_timeout }.
Note that http_client_max_connect_attempts is not explicitly set anymore,
since it was already the default value (0 and 1 are currently the same,
but this will change in a later commit).
Timo Sirainen [Tue, 27 Jun 2023 21:10:43 +0000 (00:10 +0300)]
lib-http, global: Drop _msecs and _secs suffixes from http_client_* settings
Keep the suffixes in the code, but drop them from the configuration file.
Timo Sirainen [Tue, 27 Jun 2023 21:00:08 +0000 (00:00 +0300)]
lib-http: Add http_client_init_[private_]auto()
Timo Sirainen [Wed, 2 Aug 2023 22:29:01 +0000 (01:29 +0300)]
lib-http: http_client_connection_get_settings() - Support being called with NULL peer
Use the connection's last assigned http_client's settings even after
the connection is detached from it, until a new http_client is assigned.
Timo Sirainen [Tue, 27 Jun 2023 20:52:55 +0000 (23:52 +0300)]
lib-http, global: Change http_client_settings into registered settings
Timo Sirainen [Tue, 25 Jul 2023 07:20:21 +0000 (10:20 +0300)]
lib-http: Change http_client_settings.socket_*_buffer_size types to uoff_t
This simplifies the following changes.
Timo Sirainen [Tue, 25 Jul 2023 07:19:23 +0000 (10:19 +0300)]
lib-http: Expand http_client_settings.response_hdr_limits to separate settings
This simplifies the following changes.
Timo Sirainen [Tue, 25 Jul 2023 07:17:01 +0000 (10:17 +0300)]
lib-http: Fix storing dns_client_socket_path to http_client_context
It wasn't safe to point it directly to http_client's settings, since the
client could become destroyed.
Timo Sirainen [Tue, 25 Jul 2023 07:14:32 +0000 (10:14 +0300)]
lib-http: Handle empty settings strings the same as NULLs
This will be needed by the following changes.
Timo Sirainen [Tue, 27 Jun 2023 20:36:24 +0000 (23:36 +0300)]
lib-http: Change http_client.set to be a pointer
Simplifies the following commits.
Timo Sirainen [Tue, 27 Jun 2023 19:36:43 +0000 (22:36 +0300)]
lib-http, global: Replace http_client_settings.event_parent with http_client_init*() parameter
Timo Sirainen [Tue, 27 Jun 2023 19:27:58 +0000 (22:27 +0300)]
lib-http, global: Replace http_client_settings.ssl with http_client_set_ssl_settings()
Timo Sirainen [Tue, 27 Jun 2023 19:19:24 +0000 (22:19 +0300)]
lib-http: Replace http_client_settings.dns_client with http_client_set_dns_client()
Timo Sirainen [Tue, 27 Jun 2023 19:10:21 +0000 (22:10 +0300)]
lib-http: Remove http_client_settings.debug
Debug logging is enabled via the parent event instead.
Timo Sirainen [Tue, 27 Jun 2023 19:08:01 +0000 (22:08 +0300)]
lib-http: test-http-payload - Log using events
Timo Sirainen [Tue, 27 Jun 2023 12:48:11 +0000 (15:48 +0300)]
lib-http: Remove unused http_client_connection.debug
It was set, but never read.
Timo Sirainen [Tue, 25 Jul 2023 07:06:41 +0000 (10:06 +0300)]
lib-http: Fix growing connect_backoff_[max_]time_msecs after peer is destroyed
If the other peers had larger backoff times than the destroyed peer, the
backoff times weren't updated.
Timo Sirainen [Tue, 25 Jul 2023 07:00:46 +0000 (10:00 +0300)]
lib-http: Fix using larger connect_backoff_[max_]time_msecs than defaults
Timo Sirainen [Tue, 25 Jul 2023 06:58:52 +0000 (09:58 +0300)]
lib-http: Fix using larger dns ttl/timeout settings than defaults
Timo Sirainen [Tue, 27 Jun 2023 12:27:27 +0000 (15:27 +0300)]
lib-http: Remove settings from http_client_context
These weren't actually used anywhere outside unit tests. The settings were
always empty and overridden for the actual http_client.
Timo Sirainen [Tue, 25 Jul 2023 06:49:06 +0000 (09:49 +0300)]
lib-http: http_client_connection_get_settings() - Assert that peer is non-NULL
This change is only temporary. A later commit reimplements it by using
the last assigned http_client's settings.
It shouldn't be possible with current code for peer to be NULL, so this
temporary change in behavior doesn't matter. If it had been possible for
peer to be NULL, the current code would have always returned empty
settings, since http_client_context.set is never set outside unit tests.
This is equivalent to the new way of explicitly returning default settings.
Timo Sirainen [Wed, 2 Aug 2023 15:11:34 +0000 (18:11 +0300)]
lib-http: http_client_init_shared() - If parent event isn't given, use cctx->event
The previous behavior was to use cctx->event's parent, because it had no
log prefix. Nowadays we can just drop the unwanted log prefix.
Timo Sirainen [Wed, 2 Aug 2023 15:10:11 +0000 (18:10 +0300)]
lib-http: http_client_init_shared() - cctx->event cannot be NULL
Timo Sirainen [Tue, 27 Jun 2023 12:06:45 +0000 (15:06 +0300)]
lib-http: http_client_init_shared() - Require set to be non-NULL
All the callers already provided it, except in unit tests.
Timo Sirainen [Mon, 24 Jul 2023 14:11:11 +0000 (17:11 +0300)]
lib-settings, config: Add setting_parser_info.default_filter_settings
This can be used to add filter_name/key default settings. Trying to do it
with setting_parser_info.default_settings causes crashes, because they're
attempted to be applied to all the settings structs. An alternative could
have been to just ignore unknown prefix/ settings, but that could have
caused accidentally ignoring real bugs.
Timo Sirainen [Mon, 24 Jul 2023 14:10:21 +0000 (17:10 +0300)]
config: Support filter_name/ prefixes in default settings
This allows giving defaults to specific filters in the code. For example
to specify defaults for auth_policy { ... } :
static const struct setting_keyvalue auth_default_filter_settings_keyvalue[] = {
{ "auth_policy/http_client_request_absolute_timeout", "2s" },
{ NULL, NULL }
};
The earlier code supported only named array filters, not named filters.
Timo Sirainen [Mon, 24 Jul 2023 14:09:35 +0000 (17:09 +0300)]
config: config_add_new_parser() - Add explicit root parameter
This is needed by the next commit.
Timo Sirainen [Fri, 16 Jun 2023 20:07:37 +0000 (23:07 +0300)]
lib-ssl-iostream: Reference ssl_*settings instead of duplicating its strings
Timo Sirainen [Fri, 16 Jun 2023 19:57:52 +0000 (22:57 +0300)]
lib-storage: Remove unused mail_storage_service_user_init_ssl_client_settings()
Timo Sirainen [Fri, 16 Jun 2023 19:56:57 +0000 (22:56 +0300)]
lib-storage: Remove mail_user.ssl_set
Timo Sirainen [Fri, 16 Jun 2023 19:53:14 +0000 (22:53 +0300)]
doveadm: Remove unused doveadm_get_ssl_settings()
Timo Sirainen [Fri, 16 Jun 2023 19:52:10 +0000 (22:52 +0300)]
lib-fs, global: Remove fs_settings.ssl_client_set
The fs-drivers are now expected to let lib-ssl-iostream pull the settings.
Timo Sirainen [Fri, 16 Jun 2023 19:43:49 +0000 (22:43 +0300)]
login-common: Use io_stream_autocreate_ssl_client()
Timo Sirainen [Fri, 16 Jun 2023 19:41:51 +0000 (22:41 +0300)]
lib-ssl-iostream: Add SSL_IOSTREAM_FLAG_DISABLE_CA_FILES
Timo Sirainen [Fri, 16 Jun 2023 19:32:32 +0000 (22:32 +0300)]
pop3c: Use io_stream_autocreate_ssl_client()
Timo Sirainen [Fri, 16 Jun 2023 19:26:22 +0000 (22:26 +0300)]
lib-imap-client: Use io_stream_autocreate_ssl_client()
This removes passdb imap's ssl-specific args.
Timo Sirainen [Fri, 16 Jun 2023 15:05:43 +0000 (18:05 +0300)]
lib-doveadm, doveadm: Use io_stream_autocreate_ssl_client()
This also removes doveadm_client_settings.{ssl_set|ssl_ctx}
Timo Sirainen [Fri, 16 Jun 2023 14:35:11 +0000 (17:35 +0300)]
global: Avoid specifying http_client_settings.ssl when possible
lib-http will now automatically pull the ssl settings.
Timo Sirainen [Fri, 16 Jun 2023 14:25:30 +0000 (17:25 +0300)]
lib-http: If http_client_settings.ssl is NULL, lookup settings automatically
Remove the "unconfigured ssl" unit tests, since these are no longer
relevant.
Timo Sirainen [Fri, 16 Jun 2023 14:11:22 +0000 (17:11 +0300)]
lib-master: Remove unused master_service.ssl_ctx_initialized
master_service_ssl_ctx_init() is called only once at startup, so there is no
need to support calling it multiple times.
Timo Sirainen [Fri, 16 Jun 2023 14:08:18 +0000 (17:08 +0300)]
lib-master: Use ssl_server_settings_to_iostream_set() to get server context settings
Timo Sirainen [Fri, 16 Jun 2023 14:05:00 +0000 (17:05 +0300)]
lib-master: Store initialized ssl context into iostream-ssl-context-cache
Timo Sirainen [Fri, 16 Jun 2023 14:04:17 +0000 (17:04 +0300)]
lib-master: Remove unused master_service_ssl_init()
Timo Sirainen [Fri, 16 Jun 2023 14:02:14 +0000 (17:02 +0300)]
doveadm: Use io_stream_autocreate_ssl_server()
Timo Sirainen [Fri, 16 Jun 2023 13:59:35 +0000 (16:59 +0300)]
lib-http: Use io_stream_autocreate_ssl_server()
Timo Sirainen [Fri, 16 Jun 2023 19:48:26 +0000 (22:48 +0300)]
lib-smtp: Remove smtp_submit_input.ssl
The ssl settings are no longer passed through to lib-smtp. Instead,
lib-ssl-iostream will pull the settings automatically.
Timo Sirainen [Fri, 16 Jun 2023 15:00:11 +0000 (18:00 +0300)]
global: Avoid specifying smtp_client_settings.ssl when possible
lib-smtp will now automatically pull the ssl settings.
Timo Sirainen [Fri, 16 Jun 2023 14:54:39 +0000 (17:54 +0300)]
lib-smtp: If smtp_client_settings.ssl is NULL, lookup settings automatically
Remove the "unconfigured ssl" unit tests, since these are no longer
relevant.
Timo Sirainen [Fri, 16 Jun 2023 14:51:18 +0000 (17:51 +0300)]
lib-smtp: Add smtp_client_settings.ssl_allow_invalid_cert
Timo Sirainen [Fri, 16 Jun 2023 13:25:38 +0000 (16:25 +0300)]
lib-smtp: Use io_stream_autocreate_ssl_server()
Timo Sirainen [Wed, 14 Jun 2023 12:06:43 +0000 (15:06 +0300)]
login-common: Use io_stream_autocreate_ssl_server()
Timo Sirainen [Fri, 16 Jun 2023 14:44:33 +0000 (17:44 +0300)]
lib-ssl-iostream, global: io_stream_*create_ssl_client() - Add flags parameter
Add SSL_IOSTREAM_FLAG_ALLOW_INVALID_CERT initially, which allows enabling
ssl_iostream_settings.allow_invalid_cert after context is already created.
Timo Sirainen [Wed, 14 Jun 2023 11:58:48 +0000 (14:58 +0300)]
lib-ssl-iostream: Add io_stream_autocreate_ssl_client/server()
Timo Sirainen [Fri, 16 Jun 2023 13:34:26 +0000 (16:34 +0300)]
lib-ssl-iostream, global: ssl_iostream_*_context_cache_get() - Return error message prefix
Callers no longer have to prefix the returned error with e.g.
"Couldn't initialize SSL context:"
Timo Sirainen [Fri, 16 Jun 2023 13:04:31 +0000 (16:04 +0300)]
lib-master, global: Move master-service-ssl-settings to lib-ssl-iostream/ssl-settings
Timo Sirainen [Fri, 16 Jun 2023 12:57:39 +0000 (15:57 +0300)]
lib-master, global: Rename master_service_ssl_*settings to just ssl_*settings
Timo Sirainen [Fri, 16 Jun 2023 14:30:22 +0000 (17:30 +0300)]
lib-ssl-iostream: Add ssl_iostream_get_allow_invalid_cert()
Timo Sirainen [Fri, 16 Jun 2023 12:31:18 +0000 (15:31 +0300)]
lib-ssl-iostream: ssl_iostream_settings_equals() - Rewrite to be simpler
The ssl_iostream_settings_string_offsets[] table was unnecessarily confusing
especially now that this function was the only user of the table.
Timo Sirainen [Fri, 16 Jun 2023 12:21:49 +0000 (15:21 +0300)]
lib-ssl-iostream: Remove unused ssl_iostream_settings_dup() and ssl_iostream_settings_init_from()
Timo Sirainen [Fri, 16 Jun 2023 12:20:23 +0000 (15:20 +0300)]
lib-ssl-iostream: test-iostream-ssl - Avoid ssl_iostream_settings_dup()
This is the only place still using the function, and it's not really
necessary.
Timo Sirainen [Fri, 16 Jun 2023 12:19:59 +0000 (15:19 +0300)]
lib-ssl-iostream: ssl_iostream_*_context_cache_get() - Reference settings instead of copying
Timo Sirainen [Fri, 16 Jun 2023 00:00:41 +0000 (03:00 +0300)]
lib-ssl-iostream, global: Add ssl_iostream_settings.pool
Change all callers to set and use the pool properly.
Timo Sirainen [Fri, 16 Jun 2023 13:51:20 +0000 (16:51 +0300)]
global: unit tests - Add ssl_iostream_context_cache_free() calls
These will be necessary after the following commit, because unit tests are
using ssl_iostream_test_settings_*() calls to fill settings into a variable
in stack. However, the settings pointers may be added to
iostream-ssl-context-cache where they would become invalid.
Timo Sirainen [Fri, 16 Jun 2023 12:13:39 +0000 (15:13 +0300)]
lib-ssl-iostream: Don't make a copy of ssl_iostream_settings
Only two booleans are needed from the settings, so there's no need to keep a
copy of everything.
Timo Sirainen [Thu, 15 Jun 2023 23:36:08 +0000 (02:36 +0300)]
lib-ssl-iostream: Add comments to struct ssl_iostream_settings
Timo Sirainen [Thu, 15 Jun 2023 23:20:12 +0000 (02:20 +0300)]
login-common: Don't set allow_invalid_cert=TRUE anymore for SSL server
It's now done automatically.
Timo Sirainen [Thu, 15 Jun 2023 21:51:54 +0000 (00:51 +0300)]
lib-ssl-iostream: Always set allow_invalid_cert=TRUE for SSL servers
The callers are now always expected to check if the client certificates were
valid.
Currently the only servers that even supports client certificates are the
login processes, and they had already set this.
Timo Sirainen [Thu, 15 Jun 2023 17:48:48 +0000 (20:48 +0300)]
lib: Add null_pool memory pool
Timo Sirainen [Wed, 14 Jun 2023 19:02:46 +0000 (22:02 +0300)]
lib-ldap: Support ssl_cipher_list, ssl_min_protocol and ssl_curve_list settings
Timo Sirainen [Wed, 14 Jun 2023 18:54:45 +0000 (21:54 +0300)]
lib-ldap: Fix using ssl_client_cert/key
The cert/key is in the string itself, they're not paths to files.
Timo Sirainen [Wed, 14 Jun 2023 12:18:13 +0000 (15:18 +0300)]
lib: pool_add_external_ref() - Assert-crash if pool/ref_pool is datastack or system pool
These pools aren't unreferenced, so the reference would leak.
Timo Sirainen [Wed, 14 Jun 2023 11:52:22 +0000 (14:52 +0300)]
lib-ssl-iostream, global: io_stream_create_ssl_client/server() - Remove set parameter
All settings are now context-only.
Timo Sirainen [Wed, 14 Jun 2023 11:31:36 +0000 (14:31 +0300)]
lib-ssl-iostream: Remove unnecessary ssl_iostream_settings_drop_stream_only()
Timo Sirainen [Sun, 25 Jun 2023 19:07:00 +0000 (22:07 +0300)]
lib-ssl-iostream: Handle empty setting strings as "unset"
NULL and empty strings are now handled the same.
Timo Sirainen [Wed, 14 Jun 2023 11:30:09 +0000 (14:30 +0300)]
lib-ssl-iostream: Change ssl_iostream_settings.allow_invalid_cert to be context-only
All the callers already set it for context.
Timo Sirainen [Wed, 14 Jun 2023 11:15:20 +0000 (14:15 +0300)]
lib-ssl-iostream, global: Remove ssl_iostream_settings.verbose
This was unnecessary, because all the callers already set the parent event
to debug log level.
Timo Sirainen [Wed, 14 Jun 2023 11:08:02 +0000 (14:08 +0300)]
lib-master: Remove verbose_ssl setting
It can be replaced by: log_debug = category=ssl
Timo Sirainen [Wed, 14 Jun 2023 11:04:35 +0000 (14:04 +0300)]
lib-ssl-iostream, global: Remove ssl_iostream_settings.verbose_invalid_cert
The error about invalid certificate will be included in the SSL iostream's
error string, which the caller will eventually log. There's no need to
have a separate warning logged about it.
Timo Sirainen [Wed, 14 Jun 2023 10:49:20 +0000 (13:49 +0300)]
lib-ssl-iostream: Change "Received valid SSL certificate" log level to debug
There's no reason for it to be info-level. Originally it was intendend
only to be logged when client presented a certificate to server, but at
some point it became changed so that outgoing SSL connections always
logged it.
Timo Sirainen [Wed, 14 Jun 2023 09:34:09 +0000 (12:34 +0300)]
lib-ssl-iostream: Change ssl_iostream_settings.cert/alt_cert to be context-only
For SSL servers they already had to be context-only. For SSL clients the
alt_cert was never used. The cert setting for SSL clients could
alternatively have been changed to stream-only, but that likely isn't
actually useful/necessary.
Timo Sirainen [Wed, 14 Jun 2023 09:28:35 +0000 (12:28 +0300)]
lib-ssl-iostream: Change ssl_iostream_settings.verify_remote_cert to be context-only