]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
2 years agodoveadm sync: Use the main process's configuration for dsync-server process
Timo Sirainen [Mon, 9 Jan 2023 22:13:43 +0000 (00:13 +0200)] 
doveadm sync: Use the main process's configuration for dsync-server process

This preserves the old behavior.

2 years agodoveadm exec: Avoid re-executing doveconf after executing binary
Timo Sirainen [Tue, 20 Dec 2022 21:37:49 +0000 (23:37 +0200)] 
doveadm exec: Avoid re-executing doveconf after executing binary

2 years agolib-master: Support returning master_service_settings_output.config_fd
Timo Sirainen [Sat, 17 Dec 2022 19:44:06 +0000 (21:44 +0200)] 
lib-master: Support returning master_service_settings_output.config_fd

2 years agoconfig, lib-master: Send configuration as a seekable file descriptor
Timo Sirainen [Tue, 29 Nov 2022 23:58:06 +0000 (01:58 +0200)] 
config, lib-master: Send configuration as a seekable file descriptor

This allows lib-master to re-read the configuration using the same open fd.

The binary configuration is written to an unlinked file. The file's fd is
sent to config clients, so the binary config stays allocated until all
config clients have closed the fd.

2 years agoconfig: Remove support for doveconf -e parameter
Timo Sirainen [Sun, 18 Dec 2022 22:25:36 +0000 (00:25 +0200)] 
config: Remove support for doveconf -e parameter

This was replaced by the -F parameter.

2 years agoconfig: config_filter_parsers_get() - Remove unused modules parameter
Timo Sirainen [Sun, 18 Dec 2022 22:05:52 +0000 (00:05 +0200)] 
config: config_filter_parsers_get() - Remove unused modules parameter

2 years agoconfig: config_export_init() - Remove unused modules parameter
Timo Sirainen [Sun, 18 Dec 2022 22:04:00 +0000 (00:04 +0200)] 
config: config_export_init() - Remove unused modules parameter

2 years agodoveconf: Ignore -m and -p parameters
Timo Sirainen [Sun, 18 Dec 2022 22:00:33 +0000 (00:00 +0200)] 
doveconf: Ignore -m and -p parameters

Support for "modules" is going away, so these aren't useful.

2 years agolib-storage, global: Remove unused mail_storage_service_input.module
Timo Sirainen [Tue, 29 Nov 2022 23:05:32 +0000 (01:05 +0200)] 
lib-storage, global: Remove unused mail_storage_service_input.module

2 years agolib-master, global: Remove master_service_settings_input.{module|extra_modules}
Timo Sirainen [Tue, 29 Nov 2022 23:00:31 +0000 (01:00 +0200)] 
lib-master, global: Remove master_service_settings_input.{module|extra_modules}

Configuration reading now reads all the modules always.

2 years agolib-master, master: Remove master_service_settings_input.parse_full_config
Timo Sirainen [Tue, 29 Nov 2022 22:59:33 +0000 (00:59 +0200)] 
lib-master, master: Remove master_service_settings_input.parse_full_config

This flag no longer does anything.

2 years agolib-storage: Remove MAIL_STORAGE_SERVICE_FLAG_NO_SSL_CA and master_service_settings_i...
Timo Sirainen [Tue, 29 Nov 2022 22:57:33 +0000 (00:57 +0200)] 
lib-storage: Remove MAIL_STORAGE_SERVICE_FLAG_NO_SSL_CA and master_service_settings_input.no_ssl_ca

These flags no longer do anything.

2 years agolib-master, config: Remove unused flags in master_service_settings_output
Timo Sirainen [Tue, 29 Nov 2022 22:54:18 +0000 (00:54 +0200)] 
lib-master, config: Remove unused flags in master_service_settings_output

2 years agoconfig: config_export_init() - Remove unused exclude_settings parameter
Timo Sirainen [Sun, 18 Dec 2022 22:08:47 +0000 (00:08 +0200)] 
config: config_export_init() - Remove unused exclude_settings parameter

2 years agoconfig: Require all config request commands to use the new "full" method
Timo Sirainen [Tue, 29 Nov 2022 19:12:26 +0000 (21:12 +0200)] 
config: Require all config request commands to use the new "full" method

Removed the "full" parameter, since it's now always needed. The config
protocol version was increased to make sure clients are compatible.

2 years agolib-master: Execute doveconf with -F parameter as the config fallback
Timo Sirainen [Tue, 29 Nov 2022 18:48:44 +0000 (20:48 +0200)] 
lib-master: Execute doveconf with -F parameter as the config fallback

This changes settings to be read via a fd instead of environment.

As a side effect, this fixes a bug where if the settings output was larger
than 128 kB in Linux, exec() would fail with "Argument list too long".

lib-master preserves support for reading settings from environment for a
few more commits, because the log process uses it to read its settings.

2 years agolib-master: Read config using the new "full" flag
Timo Sirainen [Tue, 29 Nov 2022 17:45:03 +0000 (19:45 +0200)] 
lib-master: Read config using the new "full" flag

2 years agoconfig: Remove unused FILTERS command
Timo Sirainen [Tue, 29 Nov 2022 17:02:47 +0000 (19:02 +0200)] 
config: Remove unused FILTERS command

2 years agolib-master: Remove unused master_service_settings_get_filters()
Timo Sirainen [Tue, 29 Nov 2022 17:02:05 +0000 (19:02 +0200)] 
lib-master: Remove unused master_service_settings_get_filters()

2 years agolib-master: Remove master-service-settings-cache API
Timo Sirainen [Tue, 29 Nov 2022 16:59:53 +0000 (18:59 +0200)] 
lib-master: Remove master-service-settings-cache API

2 years agologin-common: Remove master-service-settings-cache usage
Timo Sirainen [Tue, 29 Nov 2022 16:58:57 +0000 (18:58 +0200)] 
login-common: Remove master-service-settings-cache usage

2 years agolib-storage: Remove master-service-settings-cache usage
Timo Sirainen [Tue, 29 Nov 2022 16:56:28 +0000 (18:56 +0200)] 
lib-storage: Remove master-service-settings-cache usage

2 years agoconfig: Add support for dumping machine-readable "full config"
Timo Sirainen [Mon, 28 Nov 2022 17:39:01 +0000 (19:39 +0200)] 
config: Add support for dumping machine-readable "full config"

This includes the main config and all different filters. It can be
requested from config service with "full" parameter or with doveconf
-F [<command>] parameter. If <command> is not given, output is written
to stdout. Otherwise the <command> is executed and the config is
provided via file descriptor in DOVECOT_CONFIG_FD environment.

The format will change in the following commits.

2 years agoconfig: Generate unique index numbers for unnamed sections
Timo Sirainen [Tue, 20 Dec 2022 12:46:02 +0000 (14:46 +0200)] 
config: Generate unique index numbers for unnamed sections

This will be required by the following changes to allow incrementally
parsing filtered settings.

2 years agomaster: Make sure config reload never causes execing doveconf
Timo Sirainen [Mon, 12 Dec 2022 23:10:02 +0000 (01:10 +0200)] 
master: Make sure config reload never causes execing doveconf

This could have happened if there was an error reading configuration
via config socket. This would have caused master process to restart,
which would have messed up everything.

2 years agolib-master, master: Make sure master process never tries to read config socket at...
Timo Sirainen [Fri, 9 Dec 2022 21:21:25 +0000 (23:21 +0200)] 
lib-master, master: Make sure master process never tries to read config socket at startup

If the config socket exists, it's a leftover from an older dovecot and
shouldn't be trusted.

2 years agoconfig: Remove unnecessary CONFIG_DUMP_FLAG_IN_SECTION
Timo Sirainen [Mon, 28 Nov 2022 17:19:11 +0000 (19:19 +0200)] 
config: Remove unnecessary CONFIG_DUMP_FLAG_IN_SECTION

2 years agoglobal: Use ip type for event fields with IP addresses
Timo Sirainen [Tue, 10 Jan 2023 22:05:40 +0000 (00:05 +0200)] 
global: Use ip type for event fields with IP addresses

2 years agolib: Allow event filters to use '/' and '%' in values without quoting
Timo Sirainen [Fri, 20 Jan 2023 16:20:15 +0000 (18:20 +0200)] 
lib: Allow event filters to use '/' and '%' in values without quoting

This allows using "ip = 127.0.0.0/8%lo" without quotes.

2 years agolib: Add "ip" type for events and "ip/bits" matching for event filters
Timo Sirainen [Fri, 9 Dec 2022 21:02:21 +0000 (23:02 +0200)] 
lib: Add "ip" type for events and "ip/bits" matching for event filters

2 years agolib: net_is_in_network() - Fix checking scope ID in IPv6
Timo Sirainen [Fri, 20 Jan 2023 15:43:55 +0000 (17:43 +0200)] 
lib: net_is_in_network() - Fix checking scope ID in IPv6

Using "ip%iface1" shouldn't match "ip%iface2". However, do allow it to
match "ip" when %iface is missing.

2 years agolib: If key already exists, event_add_str(value=NULL) should clear the key
Timo Sirainen [Thu, 12 Jan 2023 10:46:07 +0000 (12:46 +0200)] 
lib: If key already exists, event_add_str(value=NULL) should clear the key

This seems like a more correct logic than not doing anything with NULL
values. It shouldn't affect any of the existing code though.

2 years agolib-settings: Remove unused settings_parse_file()
Timo Sirainen [Tue, 29 Nov 2022 17:21:59 +0000 (19:21 +0200)] 
lib-settings: Remove unused settings_parse_file()

2 years agolib-settings: Remove unused settings_parse_exec()
Timo Sirainen [Tue, 29 Nov 2022 17:20:44 +0000 (19:20 +0200)] 
lib-settings: Remove unused settings_parse_exec()

2 years agolib-master: Remove code for retrying interrupted config read()s
Timo Sirainen [Tue, 29 Nov 2022 17:32:41 +0000 (19:32 +0200)] 
lib-master: Remove code for retrying interrupted config read()s

This hasn't been working for a long time now. The fd is blocking, so
i_stream_read() returns -1 for it instead of 0 on EINTR. There's
really not supposed to be any signals happening during config reading
anyway (other than SIGALRM timeout, in which case we want to abort the
read instead of retry).

2 years agolib-master: -O parameter shouldn't read settings from environment
Timo Sirainen [Tue, 29 Nov 2022 18:46:28 +0000 (20:46 +0200)] 
lib-master: -O parameter shouldn't read settings from environment

The -O parameter should start with the default configuration only. This
seems to have been an accidental bug, which was just never noticed.

2 years agolib: o_stream_unix_write_fd() - Don't close fd on write failure
Timo Sirainen [Fri, 16 Dec 2022 16:19:09 +0000 (18:19 +0200)] 
lib: o_stream_unix_write_fd() - Don't close fd on write failure

On success the write_fd is set to -1 without closing it, so the caller is
responsible for closing it.

If o_stream_unix_close() is reached with write_fd != -1, it means the write
failed. The write_fd shouldn't be closed in that case either.

This function wasn't actually currently used anywhere.

2 years agolib-storage, global: mail_storage_service_lookup_next() - Remove service_user_r parameter
Timo Sirainen [Thu, 12 Jan 2023 20:07:04 +0000 (22:07 +0200)] 
lib-storage, global: mail_storage_service_lookup_next() - Remove service_user_r parameter

Also change the callers to not bother storing it separately. Instead, they
can just use mail_user_r->service_user.

2 years agolib-storage: Remove unused mail_storage_service_get_global()
Timo Sirainen [Thu, 12 Jan 2023 16:25:23 +0000 (18:25 +0200)] 
lib-storage: Remove unused mail_storage_service_get_global()

2 years agolib-storage, global: Rename mail_user._service_user to service_user
Timo Sirainen [Thu, 12 Jan 2023 16:23:35 +0000 (18:23 +0200)] 
lib-storage, global: Rename mail_user._service_user to service_user

It's now always set, so the underscore isn't useful.

2 years agolib-storage: mail_user_alloc*() - Require service_user parameter
Timo Sirainen [Thu, 12 Jan 2023 16:02:31 +0000 (18:02 +0200)] 
lib-storage: mail_user_alloc*() - Require service_user parameter

2 years agolib-storage: Create a service_user for shared mail_users
Timo Sirainen [Thu, 12 Jan 2023 16:19:42 +0000 (18:19 +0200)] 
lib-storage: Create a service_user for shared mail_users

2 years agolib-storage: shared - Split off shared_mail_user_init()
Timo Sirainen [Thu, 12 Jan 2023 20:50:40 +0000 (22:50 +0200)] 
lib-storage: shared - Split off shared_mail_user_init()

2 years agolib-storage: shared - Minor code refactoring
Timo Sirainen [Thu, 12 Jan 2023 21:14:23 +0000 (23:14 +0200)] 
lib-storage: shared - Minor code refactoring

Simplifies the following commit.

2 years agolib-storage: shared - Fix freeing partially created user if %variable expansion fails
Timo Sirainen [Thu, 12 Jan 2023 20:16:38 +0000 (22:16 +0200)] 
lib-storage: shared - Fix freeing partially created user if %variable expansion fails

2 years agolib-storage: raw-storage - Create a service_user
Timo Sirainen [Thu, 12 Jan 2023 15:27:01 +0000 (17:27 +0200)] 
lib-storage: raw-storage - Create a service_user

2 years agolib-storage: Rename "raw mail user" to "raw-mail-user"
Timo Sirainen [Fri, 13 Jan 2023 01:15:06 +0000 (03:15 +0200)] 
lib-storage: Rename "raw mail user" to "raw-mail-user"

It works better in logs without spaces.

2 years agolib-storage: Fix using NO_RESTRICT_ACCESS flag with TEMP_PRIV_DROP
Timo Sirainen [Thu, 26 Jan 2023 18:28:43 +0000 (20:28 +0200)] 
lib-storage: Fix using NO_RESTRICT_ACCESS flag with TEMP_PRIV_DROP

The following changes will use MAIL_STORAGE_SERVICE_FLAG_NO_RESTRICT_ACCESS
with e.g. shared user lookups. The process UID must not be changed in this
case. However, if MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP was set, the
code was still reseting UID to root, which isn't wanted.

2 years agolib-storage: Don't set home directory immediately when userdb lookup is disabled
Timo Sirainen [Fri, 20 Jan 2023 00:11:28 +0000 (02:11 +0200)] 
lib-storage: Don't set home directory immediately when userdb lookup is disabled

This is going to be needed by the following change that creates shared users
via service_user. Otherwise the shared users' home directory will be wrong.

Do set home immediately if it's provided by
mail_storage_service_input.userdb_fields. This will be used by the
raw-storage user to set the home directory.

Also update some comments explaining about how NULL works for home.

2 years agolib-storage: Don't use HOME environment when userdb lookup is disabled
Timo Sirainen [Fri, 13 Jan 2023 01:21:23 +0000 (03:21 +0200)] 
lib-storage: Don't use HOME environment when userdb lookup is disabled

We no longer support cli tools using settings from environment. This was
also causing problems in the following commits.

2 years agolib-storage: Add mail_storage_service_input.autocreated
Timo Sirainen [Fri, 13 Jan 2023 00:49:34 +0000 (02:49 +0200)] 
lib-storage: Add mail_storage_service_input.autocreated

2 years agolib-storage: Add mail_storage_service_input.no_free_init_failure
Timo Sirainen [Thu, 12 Jan 2023 20:34:49 +0000 (22:34 +0200)] 
lib-storage: Add mail_storage_service_input.no_free_init_failure

This allows using mail_storage_service_lookup_next() in a way that mail_user
won't be freed on init failures, which allows getting extra information
about why the initialization failed.

2 years agolib-storage: Add mail_storage_service_user_get_{event|username}() accessors
Timo Sirainen [Thu, 12 Jan 2023 16:04:23 +0000 (18:04 +0200)] 
lib-storage: Add mail_storage_service_user_get_{event|username}() accessors

2 years agodoveadm: doveadm-auth - Add support for SASL mechanism in test and login commands.
Stephan Bosch [Thu, 12 Nov 2020 00:32:09 +0000 (01:32 +0100)] 
doveadm: doveadm-auth - Add support for SASL mechanism in test and login commands.

2 years agolib-sasl: Add support for SCRAM-SHA-1 and SCRAM-SHA-256.
Stephan Bosch [Wed, 11 Nov 2020 23:09:26 +0000 (00:09 +0100)] 
lib-sasl: Add support for SCRAM-SHA-1 and SCRAM-SHA-256.

2 years agolib-auth: Add tests for SCRAM protocol interaction.
Stephan Bosch [Wed, 18 Jan 2023 01:59:43 +0000 (02:59 +0100)] 
lib-auth: Add tests for SCRAM protocol interaction.

2 years agolib-auth: password-scheme-scram - Split off auth_scram_generate_key_data() from scram...
Stephan Bosch [Sat, 7 Jan 2023 01:39:09 +0000 (02:39 +0100)] 
lib-auth: password-scheme-scram - Split off auth_scram_generate_key_data() from scram_generate().

Moved to auth-scram.

2 years agolib-auth: Implement client-side processing for SCRAM-SHA-* authentication.
Stephan Bosch [Fri, 4 Jun 2021 11:06:08 +0000 (13:06 +0200)] 
lib-auth: Implement client-side processing for SCRAM-SHA-* authentication.

2 years agolib-auth: auth-scram-server - Diligently clean key data.
Stephan Bosch [Mon, 7 Nov 2022 23:54:38 +0000 (00:54 +0100)] 
lib-auth: auth-scram-server - Diligently clean key data.

2 years agoauth: Move password-scheme code to lib-auth-common.
Stephan Bosch [Thu, 3 Jun 2021 17:26:10 +0000 (19:26 +0200)] 
auth: Move password-scheme code to lib-auth-common.

2 years agoauth: Move auth-scram-server to lib-auth-common.
Stephan Bosch [Mon, 26 Sep 2022 21:01:38 +0000 (23:01 +0200)] 
auth: Move auth-scram-server to lib-auth-common.

2 years agoauth: Move auth-scram to lib-auth.
Stephan Bosch [Mon, 26 Sep 2022 20:34:17 +0000 (22:34 +0200)] 
auth: Move auth-scram to lib-auth.

2 years agoCreate lib-auth
Stephan Bosch [Thu, 3 Jun 2021 16:23:05 +0000 (18:23 +0200)] 
Create lib-auth

This is where we'll put code common to auth server and client across
authentication frameworks.

2 years agoRename lib-auth to lib-auth-client.
Stephan Bosch [Fri, 20 Jan 2023 00:59:57 +0000 (01:59 +0100)] 
Rename lib-auth to lib-auth-client.

2 years agoauth: mech-scram - Split off core implementation for server-side SCRAM-SHA-* authenti...
Stephan Bosch [Mon, 26 Sep 2022 19:42:46 +0000 (21:42 +0200)] 
auth: mech-scram - Split off core implementation for server-side SCRAM-SHA-* authentication.

2 years agoauth: mech-scram - Add custom free() method.
Stephan Bosch [Fri, 6 Jan 2023 14:53:27 +0000 (15:53 +0100)] 
auth: mech-scram - Add custom free() method.

2 years agoauth: mech-scram - Use container_of().
Stephan Bosch [Fri, 6 Jan 2023 14:45:57 +0000 (15:45 +0100)] 
auth: mech-scram - Use container_of().

2 years agoauth: auth-scram-server - Augment comment in auth_scram_parse_client_first().
Stephan Bosch [Fri, 6 Jan 2023 14:59:55 +0000 (15:59 +0100)] 
auth: auth-scram-server - Augment comment in auth_scram_parse_client_first().

2 years agoauth: auth-scram-server - Move key data to separate struct.
Stephan Bosch [Fri, 6 Jan 2023 14:14:29 +0000 (15:14 +0100)] 
auth: auth-scram-server - Move key data to separate struct.

2 years agoauth: auth-scram-server - Change return type of auth_scram_get_server_final() to...
Stephan Bosch [Fri, 6 Jan 2023 13:47:14 +0000 (14:47 +0100)] 
auth: auth-scram-server - Change return type of auth_scram_get_server_final() to string_t*.

2 years agoauth: auth-scram-server - Change return type of auth_scram_get_server_first() to...
Stephan Bosch [Fri, 6 Jan 2023 13:45:38 +0000 (14:45 +0100)] 
auth: auth-scram-server - Change return type of auth_scram_get_server_first() to string_t*.

2 years agoauth: auth-scram-server - Change return type of auth_scram_parse_client_final() to...
Stephan Bosch [Fri, 6 Jan 2023 13:22:07 +0000 (14:22 +0100)] 
auth: auth-scram-server - Change return type of auth_scram_parse_client_final() to int.

2 years agoauth: auth-scram-server - Change return type of auth_scram_parse_client_first() to...
Stephan Bosch [Fri, 6 Jan 2023 13:17:27 +0000 (14:17 +0100)] 
auth: auth-scram-server - Change return type of auth_scram_parse_client_first() to int.

2 years agoauth: auth-scram-server - Add auth_scram_ prefixes to functions.
Stephan Bosch [Fri, 6 Jan 2023 13:07:11 +0000 (14:07 +0100)] 
auth: auth-scram-server - Add auth_scram_ prefixes to functions.

2 years agoauth: auth-scram-server - Rename "request" variables to "server".
Stephan Bosch [Tue, 27 Sep 2022 00:02:16 +0000 (02:02 +0200)] 
auth: auth-scram-server - Rename "request" variables to "server".

2 years agoauth: mech-scram - Move get_scram_server_final() to auth-scram-server.c.
Stephan Bosch [Mon, 26 Sep 2022 23:37:11 +0000 (01:37 +0200)] 
auth: mech-scram - Move get_scram_server_final() to auth-scram-server.c.

2 years agoauth: mech-scram - Move parse_scram_client_final() to auth-scram-server.c.
Stephan Bosch [Mon, 26 Sep 2022 23:34:45 +0000 (01:34 +0200)] 
auth: mech-scram - Move parse_scram_client_final() to auth-scram-server.c.

2 years agoauth: mech-scram - Move verify_credentials() to auth-scram-server.c.
Stephan Bosch [Mon, 26 Sep 2022 23:32:28 +0000 (01:32 +0200)] 
auth: mech-scram - Move verify_credentials() to auth-scram-server.c.

2 years agoauth: mech-scram - Move get_scram_server_first() to auth-scram-server.c.
Stephan Bosch [Mon, 26 Sep 2022 23:28:13 +0000 (01:28 +0200)] 
auth: mech-scram - Move get_scram_server_first() to auth-scram-server.c.

2 years agoauth: mech-scram - Move parse_scram_client_first() to auth-scram-server.c.
Stephan Bosch [Mon, 26 Sep 2022 23:22:46 +0000 (01:22 +0200)] 
auth: mech-scram - Move parse_scram_client_first() to auth-scram-server.c.

2 years agoauth: mech-scram - Move scram_unescape_username() to auth-scram-server.c.
Stephan Bosch [Mon, 26 Sep 2022 23:19:45 +0000 (01:19 +0200)] 
auth: mech-scram - Move scram_unescape_username() to auth-scram-server.c.

2 years agoauth: mech-scram: Remove useless include of limits.h.
Stephan Bosch [Fri, 20 Jan 2023 02:53:09 +0000 (03:53 +0100)] 
auth: mech-scram: Remove useless include of limits.h.

2 years agoauth: auth-scram - Rename Hi() to auth_scram_hi() and make it public.
Stephan Bosch [Mon, 26 Sep 2022 20:21:39 +0000 (22:21 +0200)] 
auth: auth-scram - Rename Hi() to auth_scram_hi() and make it public.

2 years agoauth: password-scheme-scram - Move Hi() to auth-scram.c.
Stephan Bosch [Mon, 26 Sep 2022 20:16:35 +0000 (22:16 +0200)] 
auth: password-scheme-scram - Move Hi() to auth-scram.c.

2 years agolib: str - Add str_clear() and str_clear_safe().
Stephan Bosch [Fri, 6 Jan 2023 15:43:56 +0000 (16:43 +0100)] 
lib: str - Add str_clear() and str_clear_safe().

2 years agolib: buffer - Add buffer_clear_safe().
Stephan Bosch [Thu, 6 Oct 2022 23:11:46 +0000 (01:11 +0200)] 
lib: buffer - Add buffer_clear_safe().

2 years agolib: buffer - Add buffer_clear()
Stephan Bosch [Sat, 29 Oct 2022 20:21:10 +0000 (22:21 +0200)] 
lib: buffer - Add buffer_clear()

For completeness with respect to the next commit.

2 years agoauth: Reformat mech-scram.c.
Stephan Bosch [Thu, 5 Jan 2023 00:27:07 +0000 (01:27 +0100)] 
auth: Reformat mech-scram.c.

2 years agoauth: Remove duplicate "nodelay" extra field sent as passdb reply
Timo Sirainen [Mon, 2 Jan 2023 00:51:22 +0000 (02:51 +0200)] 
auth: Remove duplicate "nodelay" extra field sent as passdb reply

The auth clients just ignored the duplicate, so this didn't cause any
visible bugs.

The "nodelay" field was originally added as a hidden field, which wouldn't
be sent as a passdb reply. However, the "nodelay" field became visible
again in 4307e3a2320dabbac53ad712790ffd250d527108.

2 years agolib-dcrypt: Return after loading JWK key
Aki Tuomi [Thu, 26 Jan 2023 06:22:14 +0000 (08:22 +0200)] 
lib-dcrypt: Return after loading JWK key

Otherwise we try to load it as PEM key, which will fail.

Broken in d352e5545a9422f3b0d74fd40d94c9f9a0770fb7

2 years agolib-dcrypt: Use BN_secure_new in dcrypt_openssl_key_load_private_raw
Aki Tuomi [Wed, 25 Jan 2023 19:58:13 +0000 (21:58 +0200)] 
lib-dcrypt: Use BN_secure_new in dcrypt_openssl_key_load_private_raw

2 years agolib-dcrypt: test-crypto - Add missing test_end call to abnormal return
Aki Tuomi [Wed, 25 Jan 2023 19:53:53 +0000 (21:53 +0200)] 
lib-dcrypt: test-crypto - Add missing test_end call to abnormal return

Forgotten in 316cbe323513a0f20d1cf519fe9405e231d633e2

2 years agolib-dcrypt: test-crypto - Add pointer to hold error when calling dcrypt_ctx_sym_create
Aki Tuomi [Wed, 25 Jan 2023 19:52:42 +0000 (21:52 +0200)] 
lib-dcrypt: test-crypto - Add pointer to hold error when calling dcrypt_ctx_sym_create

Forgotten in 6c65d2f659d8bb2785f5a18fe583b456e0b5cece

2 years agolib-dcrypt: Fix leaking BN points
Aki Tuomi [Wed, 25 Jan 2023 19:51:25 +0000 (21:51 +0200)] 
lib-dcrypt: Fix leaking BN points

Broken in d352e5545a9422f3b0d74fd40d94c9f9a0770fb7

2 years agomaildir: maildir_mailbox_open() - Split off maildir_is_selectable()
Markus Valentin [Fri, 20 Jan 2023 15:41:47 +0000 (16:41 +0100)] 
maildir: maildir_mailbox_open() - Split off maildir_is_selectable()

2 years agomaildir: maildir_mailbox_open() - If the namespace root or INBOX has any subdir creat...
Markus Valentin [Fri, 20 Jan 2023 15:40:22 +0000 (16:40 +0100)] 
maildir: maildir_mailbox_open() - If the namespace root or INBOX has any subdir create others as well

2 years agomaildir: maildir_mailbox_open() - Disable maildir subdirectory creation for INBOX
Markus Valentin [Fri, 20 Jan 2023 07:50:48 +0000 (08:50 +0100)] 
maildir: maildir_mailbox_open() - Disable maildir subdirectory creation for INBOX

This was added in 522925f6e9ff8fe9592511c2221b3d6526d4cbf4. In the
meantime autocreate code changed so this is no longer valid.

2 years agowelcome-plugin: Remove welcome_open_box()
Markus Valentin [Mon, 9 Jan 2023 14:10:47 +0000 (15:10 +0100)] 
welcome-plugin: Remove welcome_open_box()

2 years agowelcome-plugin: Move script_execute() to welcome_create_box()
Markus Valentin [Mon, 9 Jan 2023 14:06:54 +0000 (15:06 +0100)] 
welcome-plugin: Move script_execute() to welcome_create_box()

The welcome script was executed while opening the INBOX only when
the same session had created it. This could have led to unexpectedly not
executing welcome when not opening the mailbox right after it was created.

The original code delayed the welcome script run because mailbox creation
wasn't finished until the mailbox was opened. This seems to have become
fixed at some point.

2 years agolib-sql: driver-sqlite - Handle SQLITE_READONLY error in exec
Aki Tuomi [Fri, 13 Jan 2023 12:45:31 +0000 (14:45 +0200)] 
lib-sql: driver-sqlite - Handle SQLITE_READONLY error in exec