]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
sergey.kitov [Wed, 4 Oct 2023 11:58:33 +0000 (14:58 +0300)]
imap: change imap_client_workarounds to BOOLLIST.
sergey.kitov [Fri, 9 Feb 2024 13:02:37 +0000 (15:02 +0200)]
lib-settings: Fix allocation of boollist elements.
This lead to corruption of strings when memory is reused.
Markus Valentin [Tue, 2 Apr 2024 12:52:57 +0000 (14:52 +0200)]
auth: passdb-pam - Use container_of() macro
Markus Valentin [Wed, 28 Feb 2024 14:44:18 +0000 (15:44 +0100)]
auth: passdb-pam - Add passdb_pam named filter
Convert the passdb args into real settings:
* service_name -> passdb_pam_service_name
* request_left -> passdb_pam_max_requests
* session -> passdb_pam_session
* setcred -> passdb_pam_setcred
* cache_key -> %u%{passdb_pam_service_name} (hardcoded)
* blocking -> passdb_use_worker
* failure_show_msg -> passdb_pam_failure_show_msg
Aki Tuomi [Thu, 28 Mar 2024 08:17:28 +0000 (10:17 +0200)]
auth: mech-oauth2 - Use consistent error
Aki Tuomi [Thu, 28 Mar 2024 08:16:39 +0000 (10:16 +0200)]
auth: auth-worker - Log oauth2 validation error
Aki Tuomi [Thu, 28 Mar 2024 07:30:17 +0000 (09:30 +0200)]
auth: passdb-oauth2 - Drop unused oauth2_deinit()
Aki Tuomi [Wed, 27 Mar 2024 12:25:42 +0000 (14:25 +0200)]
auth: Rename oauth2_username_format to oauth2_username_validation_format
Aki Tuomi [Mon, 18 Mar 2024 08:04:17 +0000 (10:04 +0200)]
auth: Always use grant password with passdb oauth2
Aki Tuomi [Mon, 18 Mar 2024 07:52:21 +0000 (09:52 +0200)]
auth: Only normalize oauth2 response username
Aki Tuomi [Tue, 12 Mar 2024 10:58:11 +0000 (12:58 +0200)]
auth: oauth2 - Replace pass_attrs with fields
Aki Tuomi [Mon, 11 Mar 2024 07:24:30 +0000 (09:24 +0200)]
auth: Use new settings with db_oauth2
Aki Tuomi [Wed, 27 Mar 2024 12:11:25 +0000 (14:11 +0200)]
auth: Initialize oauth2 database early
Aki Tuomi [Mon, 25 Mar 2024 08:29:32 +0000 (10:29 +0200)]
auth: Return error from db_oauth2_init
Aki Tuomi [Thu, 28 Mar 2024 10:59:25 +0000 (12:59 +0200)]
auth: Load builtin dict drivers earlier
This is needed so oauth2 mechanisms can initialize.
Aki Tuomi [Thu, 28 Mar 2024 07:20:28 +0000 (09:20 +0200)]
auth: mech-oauth2 - Log only internal failures as error
Aki Tuomi [Mon, 25 Mar 2024 10:57:07 +0000 (12:57 +0200)]
auth: db-oauth2 - Move settings handling to separate function
Aki Tuomi [Wed, 20 Mar 2024 09:00:43 +0000 (11:00 +0200)]
auth: db-oauth2 - Prepare for settings being a pointer
Simplifies next commit
Aki Tuomi [Fri, 15 Mar 2024 06:25:10 +0000 (08:25 +0200)]
doveconf: Hide keys that end with _secret
Aki Tuomi [Thu, 14 Mar 2024 12:44:55 +0000 (14:44 +0200)]
auth: Rename db_oauth2_is_blocking() to db_oauth2_use_worker()
Markus Valentin [Mon, 25 Mar 2024 09:57:10 +0000 (10:57 +0100)]
auth: passdb/userdb passwd - Convert to new settings
Timo Sirainen [Wed, 27 Mar 2024 12:11:29 +0000 (14:11 +0200)]
lib-lua: test-lua-http-client - Fix accessing freed memory
Markus Valentin [Fri, 16 Feb 2024 12:24:22 +0000 (13:24 +0100)]
auth: userdb-static - Convert args to settings
This adds the userdb_static named filter and changes userdb args
based initialization to use actual settings:
* allow_all_users -> userdb_static_allow_all_users
Markus Valentin [Tue, 13 Feb 2024 14:11:38 +0000 (15:11 +0100)]
auth: passdb-static - Convert args to settings
Add passdb_static named filter and change passdb args based initialization
to use actual settings:
* password -> passdb_static_password
Markus Valentin [Fri, 1 Mar 2024 16:41:49 +0000 (17:41 +0100)]
auth: Add auth_static_settings for static userdb and passdb
Timo Sirainen [Mon, 18 Mar 2024 19:59:23 +0000 (21:59 +0200)]
fts: Add fts named list filter and require using it
It's no longer possible to simply specify fts_driver setting without
fts named list filter.
Timo Sirainen [Thu, 21 Mar 2024 20:41:00 +0000 (22:41 +0200)]
fts: Add fts_search setting to disable FTS for specific mailboxes
For example:
mailbox Drafts {
fts_search = no
}
Timo Sirainen [Thu, 21 Mar 2024 20:37:12 +0000 (22:37 +0200)]
fts: Split fts_enforced setting
* fts_enforced=no -> fts_search_add_missing=body-search-only,
fts_search_read_fallback=yes
* fts_enforced=yes -> fts_search_add_missing=yes,
fts_search_read_fallback=no
* fts_enforced=body -> fts_search_add_missing=body-search-only,
fts_search_read_fallback=no
The default settings still keep the old fts_enforced=no default behavior.
Timo Sirainen [Tue, 19 Mar 2024 20:05:12 +0000 (22:05 +0200)]
lib-storage: lang-user - Add language name as prefix to errors
Timo Sirainen [Mon, 18 Mar 2024 21:45:59 +0000 (23:45 +0200)]
fts: fts_backend_init() - Add event parameter
Timo Sirainen [Mon, 18 Mar 2024 21:39:12 +0000 (23:39 +0200)]
fts: Lookup fts settings using fts_backend's event
Timo Sirainen [Mon, 18 Mar 2024 21:32:07 +0000 (23:32 +0200)]
fts-flatcurve: Delay reading settings until flatcurve backend is actually attempted to be used
It's not an error to load fts_flatcurve plugin, even if it doesn't end up
being configured.
Timo Sirainen [Mon, 18 Mar 2024 21:09:35 +0000 (23:09 +0200)]
fts-solr: Delay reading settings until solr backend is actually attempted to be used
It's not an error to load fts_solr plugin, even if it doesn't end up being
configured.
Timo Sirainen [Tue, 19 Mar 2024 20:14:21 +0000 (22:14 +0200)]
fts: Avoid reference counting struct fts_user
This is needed by the following changes.
Timo Sirainen [Mon, 18 Mar 2024 21:22:53 +0000 (23:22 +0200)]
fts: Fix using empty fts_driver setting
Timo Sirainen [Mon, 18 Mar 2024 19:57:29 +0000 (21:57 +0200)]
lib-storage: lang_user_init() - Add event parameter
Timo Sirainen [Tue, 19 Mar 2024 09:22:27 +0000 (11:22 +0200)]
config: Add settings_filter_name check for non-leaf filters also
This allows e.g. using "fts/dovecot" as the filter name for doveadm fs
commands.
Timo Sirainen [Mon, 18 Mar 2024 20:06:58 +0000 (22:06 +0200)]
lib-settings: settings_free() - Add missing parenthesis
Timo Sirainen [Wed, 20 Mar 2024 13:48:53 +0000 (15:48 +0200)]
doveconf: Hide filter_array_field_name setting if its value matches the filter name
For example in:
dict foo {
name = foo
}
It's redundant to output the "name" line.
Timo Sirainen [Wed, 20 Mar 2024 13:41:19 +0000 (15:41 +0200)]
config: Require setting_define.filter_array_field_name to be full setting name
This is needed by the following changes, and is clearer in general.
Timo Sirainen [Wed, 20 Mar 2024 13:40:27 +0000 (15:40 +0200)]
config: Add setting struct name to BUG error messages
This helps figure out where the problems are.
Timo Sirainen [Wed, 20 Mar 2024 12:25:54 +0000 (14:25 +0200)]
doveconf: Don't strip key prefix from output if it would result in conflicting wrong output
For example with:
dict proxy {
dict_name = foo
dict_proxy_name = bar
}
If "dict_name" was shortened to just "name", it would actually be parsed
as "dict_proxy_name" setting.
Timo Sirainen [Sat, 16 Mar 2024 11:00:07 +0000 (13:00 +0200)]
lib-dict, global: Add dict named list filter and require using it
It's no longer possible to simply specify dict_driver setting without
dict named list filter. This makes it more consistent with lib-fs.
Timo Sirainen [Sat, 16 Mar 2024 10:55:25 +0000 (12:55 +0200)]
dict: Rename dict strlist to dict_legacy
Timo Sirainen [Sat, 16 Mar 2024 10:42:45 +0000 (12:42 +0200)]
lib-fs: Fail if any extra fs { .. } named list filters are configured
Timo Sirainen [Wed, 20 Mar 2024 13:43:35 +0000 (15:43 +0200)]
global: Use full setting names in filter_array_field_name
Timo Sirainen [Sat, 16 Mar 2024 14:53:27 +0000 (16:53 +0200)]
dict-client - Fail if dict_proxy_name is empty
Timo Sirainen [Sun, 17 Mar 2024 21:15:21 +0000 (23:15 +0200)]
lib-settings: Ignore duplicate named list filter entries
These can happen when some filters override settings for existing named list
filters.
Markus Valentin [Thu, 14 Mar 2024 12:54:19 +0000 (13:54 +0100)]
plugins/mail-lua: mail_lua_user_created() - Use dlua_script_create_auto()
Markus Valentin [Thu, 14 Mar 2024 12:51:55 +0000 (13:51 +0100)]
plugins/push-notification: push_notification_driver_lua_init() - Use dlua_script_create_auto()
Markus Valentin [Fri, 15 Mar 2024 08:43:26 +0000 (09:43 +0100)]
auth|lib-lua: Replace auth_lua_config with newly added lua_settings
This adds lua_settings setting. This allows to pass a key-value table to the
lua script_init() call.
This replaces the auth_lua_config which was previously used with
passdb-lua and userdb-lua to pass parameters to it.
Markus Valentin [Thu, 14 Mar 2024 10:05:27 +0000 (11:05 +0100)]
auth: [user|pass]db-lua: Use dlua_script_create_auto()
Markus Valentin [Thu, 14 Mar 2024 12:59:32 +0000 (13:59 +0100)]
lib-lua: Pass event into dlua_script_create_string() calls in unit tests
Markus Valentin [Thu, 14 Mar 2024 09:36:56 +0000 (10:36 +0100)]
lib-lua: Add dlua_script_create_auto()
Allow to initialize a lua script looking up lua_file path using the
event passed to this function.
Markus Valentin [Tue, 12 Mar 2024 07:01:44 +0000 (08:01 +0100)]
auth: Introduce settings_simple_init() for mocking passdb in tests
Markus Valentin [Tue, 12 Mar 2024 06:43:33 +0000 (07:43 +0100)]
auth: auths_preinit() - Add event parameter
Markus Valentin [Mon, 11 Mar 2024 08:13:24 +0000 (09:13 +0100)]
auth: auth_passdb_preinit() - Lookup settings again after SETTINGS_EVENT_FILTER_NAME is set
This makes sure defaults which are set specifically for this passdb
driver are applied correctly.
Markus Valentin [Mon, 11 Mar 2024 08:11:46 +0000 (09:11 +0100)]
auth: auth_userdb_preinit() - Lookup settings again after SETTINGS_EVENT_FILTER_NAME is set
This makes sure defaults which are set specifically for this userdb
driver are applied correctly.
Markus Valentin [Thu, 29 Feb 2024 16:15:31 +0000 (17:15 +0100)]
auth: [user|pass]db-lua: Convert module arguments to const_string array
Markus Valentin [Wed, 21 Feb 2024 12:31:42 +0000 (13:31 +0100)]
auth: [user|pass]db-lua: Call auth_lua_script_get_default_cache_key() from preinit
Try to get the default_cache_key from the lua-[user|pass]db when running
the preinit. This allows the lua script to set the default_cache_key
themselves.
Markus Valentin [Wed, 21 Feb 2024 12:26:07 +0000 (13:26 +0100)]
auth: db-lua - Add auth_lua_script_get_default_cache_key()
This function calls auth_passdb_get_cache_key() or auth_userb_get_cache_key()
and sets it to the corresponding passdb_module->default_cache_key or
userdb_module->default_cache_key. This allows thereby to set the
default_cache_key from lua passdb or userdb if
auth_passdb_get_cache_key() or auth_userdb_get_cache_key() is
implemented.
Markus Valentin [Wed, 21 Feb 2024 12:16:57 +0000 (13:16 +0100)]
auth: db-lua - Split off auth_lua_script_auth_db_init() from auth_lua_script_init()
Markus Valentin [Fri, 16 Feb 2024 10:54:12 +0000 (11:54 +0100)]
auth: userdb-lua - Convert args to settings
This changes userdb args based initialization to use actual settings:
* file -> lua_file (global)
* generic args -> auth_lua_config
* blocking -> userdb_use_worker
* cache_key is removed
Markus Valentin [Fri, 16 Feb 2024 10:50:29 +0000 (11:50 +0100)]
auth: passdb-lua - Convert args to settings
This changes passdb args based initialization to use actual settings:
* file -> lua_file (global)
* generic args -> auth_lua_config
* blocking -> passdb_use_worker
* scheme -> passdb_default_password_scheme
* cache_key is removed
Markus Valentin [Thu, 29 Feb 2024 16:12:19 +0000 (17:12 +0100)]
auth: db-lua: Introduce auth_lua_settings
Timo Sirainen [Sat, 16 Mar 2024 11:48:53 +0000 (13:48 +0200)]
config: Include named list filter's name in the automatic setting prefix
For example:
passdb sql {
query = ..
}
The query translated to passdb_sql_query automatically.
Aki Tuomi [Fri, 15 Mar 2024 06:44:01 +0000 (08:44 +0200)]
doveconf: Remove prefix from filters and string lists too
Timo Sirainen [Tue, 19 Mar 2024 05:20:05 +0000 (07:20 +0200)]
config: Add ifdef macro tracking for building all-settings.c
Add settings/code to the file using the same #if / #ifdef checks as exist in
the main file. This fixes building without Cassandra.
Timo Sirainen [Wed, 13 Mar 2024 22:01:37 +0000 (00:01 +0200)]
global: Replace built-in $default_* variables with $SET:default_*
This way they're more consistent with how they can be used in config files.
Timo Sirainen [Wed, 13 Mar 2024 20:11:43 +0000 (22:11 +0200)]
config: Change $setting parsing to use prefixed $SET:setting
This allows using $text in setting values without having to quote the line.
Timo Sirainen [Thu, 7 Mar 2024 13:06:41 +0000 (15:06 +0200)]
auth: passdb/userdb sql - Add support for fields { .. }
Timo Sirainen [Tue, 12 Mar 2024 20:52:39 +0000 (22:52 +0200)]
auth: Add auth_cache_parse_key_and_fields()
Timo Sirainen [Sun, 3 Mar 2024 15:00:32 +0000 (17:00 +0200)]
auth: passdb/userdb sql - Convert to new settings
sql_drivers_deinit() needed to be moved earlier, because the sql_db is
now kept in cache until it's called. In the earlier code the sql_db was
deinitialized when the passdb/userdb sql was deinitialized. If the
sql_db deinit happens too late, it's late in aborting requests and that
causes crashes.
Timo Sirainen [Mon, 4 Mar 2024 08:40:10 +0000 (10:40 +0200)]
auth: userdb ldap, sql - Fix error handling for user iteration
Timo Sirainen [Mon, 4 Mar 2024 08:42:20 +0000 (10:42 +0200)]
auth: ldap - Remove unused ldap_connection.userdb_used
Timo Sirainen [Fri, 1 Mar 2024 11:17:31 +0000 (13:17 +0200)]
auth: passdb sql - Remove warning about changed userdb queries without userdb sql
This will no longer make sense after the upcoming settings changes.
Timo Sirainen [Fri, 1 Mar 2024 11:15:10 +0000 (13:15 +0200)]
auth: Remove default passdb/userdb sql queries
They're unlikely to be the wanted ones, and it's just causing confusion
when the defaults are accidentally used.
Timo Sirainen [Thu, 7 Mar 2024 12:51:25 +0000 (14:51 +0200)]
lib-settings: Add settings_get_params() to support escaping variables
Timo Sirainen [Thu, 7 Mar 2024 07:57:16 +0000 (09:57 +0200)]
lib-settings, global: Change SETTINGS_EVENT_VAR_EXPAND_* APIs
These now work with struct var_expand_params, which allows more flexibility.
Timo Sirainen [Thu, 7 Mar 2024 07:33:38 +0000 (09:33 +0200)]
lib: var-expand - Add support for escaping variables
Timo Sirainen [Thu, 7 Mar 2024 07:30:30 +0000 (09:30 +0200)]
lib: Add var_expand() with new API and use it to implement other var_expand_*()
Timo Sirainen [Wed, 6 Mar 2024 18:24:25 +0000 (20:24 +0200)]
lib, global: var_expand_with_arrays() - Replace func_tables/func_contexts with struct var_expand_params_func
Timo Sirainen [Wed, 6 Mar 2024 18:07:58 +0000 (20:07 +0200)]
lib, global: Rename var_expand() to var_expand_with_table()
Timo Sirainen [Wed, 6 Mar 2024 18:07:18 +0000 (20:07 +0200)]
login-common: Rename var_expand_table variable to client_tab
Fixes a conflict caused by the next commit.
Timo Sirainen [Tue, 12 Mar 2024 20:52:51 +0000 (22:52 +0200)]
lib-settings: If settings_get*() fails, always include settings struct name and filter name in error message
This can help understand where the error is coming from.
Timo Sirainen [Tue, 12 Mar 2024 19:23:06 +0000 (21:23 +0200)]
lib-sql: sqlite - Change default journal_mode to wal
Timo Sirainen [Mon, 11 Mar 2024 21:33:30 +0000 (23:33 +0200)]
doc/example-config: Update passdb/userdb sql configuration
Timo Sirainen [Mon, 11 Mar 2024 13:32:37 +0000 (15:32 +0200)]
lib-sql: cassandra - Rename cassandra_num_threads to cassandra_io_thread_count
Timo Sirainen [Mon, 11 Mar 2024 13:28:54 +0000 (15:28 +0200)]
lib-sql: cassandra - Change default 0 values to explicit defaults
Timo Sirainen [Sun, 3 Mar 2024 14:21:27 +0000 (16:21 +0200)]
lib-sql: cassandra - Keep a persistent cache of used sql databases
Timo Sirainen [Sun, 3 Mar 2024 14:15:46 +0000 (16:15 +0200)]
lib-sql: sqlite - Keep a persistent cache of used sql databases
Timo Sirainen [Sun, 3 Mar 2024 14:10:16 +0000 (16:10 +0200)]
lib-sql: pgsql - Keep a persistent cache of used sql databases
Timo Sirainen [Sun, 3 Mar 2024 14:05:15 +0000 (16:05 +0200)]
lib-sql: mysql - Keep a persistent cache of used sql databases
Currently we don't really need to support freeing databases. If needed,
this could be done with e.g. freeing unused databases after N seconds
of idling.
Timo Sirainen [Fri, 1 Mar 2024 14:21:16 +0000 (16:21 +0200)]
lib-sql, lib-dict-backend: Rename sql-db-cache to sql-db-cache-legacy
Timo Sirainen [Fri, 1 Mar 2024 12:38:00 +0000 (14:38 +0200)]
lib-settings: Add settings_hash() and settings_equal()
Timo Sirainen [Thu, 29 Feb 2024 12:28:07 +0000 (14:28 +0200)]
lib-sql: mysql, pgsql - Implement sqlpool support for new init() API
Timo Sirainen [Fri, 8 Mar 2024 12:49:05 +0000 (14:49 +0200)]
lib-sql: sql_init_auto() - Require drivers to call sql_init_common() explicitly
This will be needed by following changes.
Timo Sirainen [Thu, 29 Feb 2024 12:07:06 +0000 (14:07 +0200)]
lib-sql: sqlpool - Implement new init() API
Timo Sirainen [Thu, 29 Feb 2024 12:04:47 +0000 (14:04 +0200)]
lib-sql: sqlpool - Split off driver_sqlpool_init_common()
Timo Sirainen [Thu, 29 Feb 2024 11:56:37 +0000 (13:56 +0200)]
lib-sql: sqlpool - Rename connect_string to legacy_connect_string