]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
3 years agolib: net - Add scope_id to struct ip_addr
Aki Tuomi [Tue, 29 Mar 2022 12:09:37 +0000 (15:09 +0300)] 
lib: net - Add scope_id to struct ip_addr

This is needed for link-local IPv6 addresses.

3 years agolib: net - Do not accept arbitrary numbers as IPv4 addresses in net_addr2ip_inet4_fast()
Aki Tuomi [Thu, 7 Apr 2022 10:11:56 +0000 (13:11 +0300)] 
lib: net - Do not accept arbitrary numbers as IPv4 addresses in net_addr2ip_inet4_fast()

Dovecot isn't currently using numbers as IPv4 addresses anywhere, so it doesn't need fast path
handling. The numbers are still accepted as IPv4 addresses by the libc code in slow path.

3 years agolib: net - Consolidate gai error handling to net_handle_gai_error()
Aki Tuomi [Tue, 12 Apr 2022 08:43:24 +0000 (11:43 +0300)] 
lib: net - Consolidate gai error handling to net_handle_gai_error()

Handles errors from getaddrinfo() and getnameinfo()

3 years agologin-common: Fix crash with invalid login_trusted_networks setting
Aki Tuomi [Thu, 7 Apr 2022 06:39:42 +0000 (09:39 +0300)] 
login-common: Fix crash with invalid login_trusted_networks setting

client_is_trusted() uses the event to log an error.

Broken in 95c63f3e9efdb7ba916dac3e6b013d131392c48a

3 years agolib-index: Always write tail offset the same as head offset
Timo Sirainen [Fri, 8 Apr 2022 12:59:59 +0000 (15:59 +0300)] 
lib-index: Always write tail offset the same as head offset

The mail_index_write() must not be called unless this is safe to do.
This prevents unnecessarily reading through dovecot.index.log between
tail..head offsets, which can be expensive due to modseq calculation.

3 years agolib-index: Optimize modseq scanning by using the modseq header in index
Timo Sirainen [Fri, 8 Apr 2022 12:10:53 +0000 (15:10 +0300)] 
lib-index: Optimize modseq scanning by using the modseq header in index

View is very commonly set to start reading new changes since dovecot.index
was last written. When reading the newer records in dovecot.index.log, the
modseq of each change is needed to be known. However, the initial modseq
calculation was usually done inefficiently by reading the whole
dovecot.index.log from the beginning of the file. This change prevents
that by using instead the "modseq" header in dovecot.index to get the
initial modseq.

3 years agolib-index: Handle 0-sized dovecot.index.log record properly
Timo Sirainen [Fri, 8 Apr 2022 10:42:55 +0000 (13:42 +0300)] 
lib-index: Handle 0-sized dovecot.index.log record properly

The previous behavior was to just silently ignore it and have the next write
to the transaction log silently truncate away the trailing garbage.

Now if the log file isn't locked the issue is still ignored, since it's
possible that this is just a race condition. But if the log is locked,
it's handled as corruption.

3 years agoimap: SELECT - Fix unknown parameter error message
Timo Sirainen [Fri, 8 Apr 2022 11:25:47 +0000 (14:25 +0300)] 
imap: SELECT - Fix unknown parameter error message

3 years agoconfigure.ac: Remove stray DOVECOT_LIBWRAP
Aki Tuomi [Tue, 12 Apr 2022 17:31:03 +0000 (20:31 +0300)] 
configure.ac: Remove stray DOVECOT_LIBWRAP

Forgotten in 8f0a991f41e5d94e919ef5aa0712dab972a1fa33

3 years agodoc/man: Update doveadm-sync description
Karl Fleischmann [Thu, 7 Apr 2022 13:29:25 +0000 (16:29 +0300)] 
doc/man: Update doveadm-sync description

3 years agodoc/man: Remove dsync manpage and all references
Karl Fleischmann [Thu, 7 Apr 2022 13:26:47 +0000 (16:26 +0300)] 
doc/man: Remove dsync manpage and all references

3 years agodoveadm: Remove obsolete dsync-operation for doveadm command
Karl Fleischmann [Thu, 7 Apr 2022 13:17:33 +0000 (16:17 +0300)] 
doveadm: Remove obsolete dsync-operation for doveadm command

As there is no way anymore to call doveadm as dsync this behavior can be
removed fully.

3 years agodoveadm: Remove dsync symlink to doveadm
Karl Fleischmann [Thu, 7 Apr 2022 13:16:45 +0000 (16:16 +0300)] 
doveadm: Remove dsync symlink to doveadm

3 years agosubmission-proxy: Add IPV6: prefix to IPv6 addresses
Aki Tuomi [Tue, 5 Apr 2022 11:33:48 +0000 (14:33 +0300)] 
submission-proxy: Add IPV6: prefix to IPv6 addresses

This is required by the Postfix XCLIENT protocol.

3 years agolib: test-event-flatten - Use __FILE__ to get correct expected filename
Aki Tuomi [Tue, 12 Apr 2022 07:12:11 +0000 (10:12 +0300)] 
lib: test-event-flatten - Use __FILE__ to get correct expected filename

Fixes out of tree buids

Broken in 4f752d381c8e19dd07d1e593996d02294668c8b6

3 years agolib-dcrypt: test-stream - Allow EPIPE too in test_read_garbage()
Aki Tuomi [Fri, 8 Apr 2022 04:49:56 +0000 (07:49 +0300)] 
lib-dcrypt: test-stream - Allow EPIPE too in test_read_garbage()

3 years agolib-master: Finish fixing memory leak when handling master-admin clients
Timo Sirainen [Tue, 12 Apr 2022 07:19:42 +0000 (09:19 +0200)] 
lib-master: Finish fixing memory leak when handling master-admin clients

Finish properly the fix in 45232487a19c724b0e15a65e79005501d684e6ad

3 years agolib-master: Fix memory leak when handling master-admin clients
Timo Sirainen [Thu, 7 Apr 2022 13:35:28 +0000 (16:35 +0300)] 
lib-master: Fix memory leak when handling master-admin clients

3 years agodoveadm: Implement CMD_FLAG_HIDDEN to actually hide doveadm commands from usage
Timo Sirainen [Mon, 4 Apr 2022 13:42:07 +0000 (16:42 +0300)] 
doveadm: Implement CMD_FLAG_HIDDEN to actually hide doveadm commands from usage

3 years agoglobal: Use is_config_binary() where CONFIG_BINARY macro does not propagate
Marco Bettini [Wed, 30 Mar 2022 15:28:24 +0000 (15:28 +0000)] 
global: Use is_config_binary() where CONFIG_BINARY macro does not propagate

Not all the *-settings.c sources are embeded in the generated all-settings.c
source file, which is the only scope where the CONFIG_BINARY macro is defined.
This specifically applies to master-service-ssl-settings.c which contained
code never activated by the #ifdef(s) on the macro as this file is not part
of the synthesized code.

3 years agolib-master: master_service_ssl_settings_check() - Remove old obsolete checks in dead...
Marco Bettini [Wed, 30 Mar 2022 15:26:56 +0000 (15:26 +0000)] 
lib-master: master_service_ssl_settings_check() - Remove old obsolete checks in dead code

3 years agolib-settings: Remove stray whitespaces
Marco Bettini [Mon, 28 Mar 2022 13:48:43 +0000 (13:48 +0000)] 
lib-settings: Remove stray whitespaces

3 years agoquota: Only check vsize flag if quota driver succesfully initialized
Aki Tuomi [Fri, 1 Apr 2022 09:11:30 +0000 (12:11 +0300)] 
quota: Only check vsize flag if quota driver succesfully initialized

Broken by 9926b729694421daeb97769a925f0f273b83b0a9

3 years agolib-master: Fix memory leak at deinit after kicking a user
Timo Sirainen [Thu, 7 Apr 2022 07:55:26 +0000 (10:55 +0300)] 
lib-master: Fix memory leak at deinit after kicking a user

Caused by 14da525deeb16d3e81b2b9cf24fc52092b33f88d

3 years agolib-dcrypt: test-stream.c - Remove pointer arithmetic in test_read_garbage()
Martti Rannanjärvi [Wed, 6 Apr 2022 17:13:24 +0000 (20:13 +0300)] 
lib-dcrypt: test-stream.c - Remove pointer arithmetic in test_read_garbage()

Something is wrong with the pointer arithmetic given to random_fill(),
and easiest is to remove it altogether. This fixes a valgrind complaint
on use of uninitialized value.

3 years agoconfig: Notify about obsolete auth_debug setting
Karl Fleischmann [Thu, 24 Mar 2022 09:30:32 +0000 (10:30 +0100)] 
config: Notify about obsolete auth_debug setting

3 years agodoveadm-auth: Consolidate auth debug logging condition
Karl Fleischmann [Wed, 23 Mar 2022 11:04:33 +0000 (12:04 +0100)] 
doveadm-auth: Consolidate auth debug logging condition

This should enable the relevant places to check for any of the
`auth_debug` setting, enabling the debug mode via -D or an appropriate
`log_debug` value in a consistent manner.

3 years agoauth: Remove extraneous debug check when calling e_debug()
Karl Fleischmann [Tue, 15 Mar 2022 13:49:58 +0000 (14:49 +0100)] 
auth: Remove extraneous debug check when calling e_debug()

Remove checks for debug setting when calling e_debug() as it is already
doing the necessary check.

3 years agolib-dcrypt: test-stream - Ensure file is v2 in test_read_garbage
Aki Tuomi [Mon, 4 Apr 2022 16:12:47 +0000 (19:12 +0300)] 
lib-dcrypt: test-stream - Ensure file is v2 in test_read_garbage

3 years agologin-common: Add login_auth_socket_path setting
Karl Fleischmann [Fri, 25 Mar 2022 13:54:02 +0000 (14:54 +0100)] 
login-common: Add login_auth_socket_path setting

This setting allows to set a default socket path for login processes
without the need to define it for each one individually. It can be
overwritten by explicitly giving it via the existing methods.

3 years agosubmission-login: Remove direct access of auth_debug
Karl Fleischmann [Fri, 1 Apr 2022 08:49:10 +0000 (10:49 +0200)] 
submission-login: Remove direct access of auth_debug

SMTP debugging is not related to authentication so using auth_debug has
been wrong to use in the first place.

3 years agoconfig: old-set-parser - Remove quota_vsizes
Martti Rannanjärvi [Mon, 4 Apr 2022 16:30:11 +0000 (19:30 +0300)] 
config: old-set-parser - Remove quota_vsizes

No need to warn about obsolete plugin settings.

3 years agoexample-config: 90-quota.conf - Remove quota_vsizes
Martti Rannanjärvi [Mon, 4 Apr 2022 16:29:15 +0000 (19:29 +0300)] 
example-config: 90-quota.conf - Remove quota_vsizes

3 years agolib-storage: mailbox_match_plugin_exclude() - Consider namespaces while matching
Marco Bettini [Tue, 22 Mar 2022 10:06:51 +0000 (10:06 +0000)] 
lib-storage: mailbox_match_plugin_exclude() - Consider namespaces while matching

For namespaces with inbox=yes, the match with the rule will be attempted with
both the virtual mailbox names and the bare mailbox name.

3 years agomail-crypt: Use mail_user_getenv_bool() for MAIL_CRYPT_REQUIRE_ENCRYPTED_USER_KEY
Aki Tuomi [Sun, 27 Mar 2022 17:34:26 +0000 (20:34 +0300)] 
mail-crypt: Use mail_user_getenv_bool() for MAIL_CRYPT_REQUIRE_ENCRYPTED_USER_KEY

3 years agomail-crypt: Replace mail_crypt_acl_secure_sharing_enabled() with mail_user_getenv_bool()
Aki Tuomi [Sun, 27 Mar 2022 17:32:48 +0000 (20:32 +0300)] 
mail-crypt: Replace mail_crypt_acl_secure_sharing_enabled() with mail_user_getenv_bool()

3 years agolib-master: ssl_options - Remove support for no_compression
Aki Tuomi [Fri, 25 Mar 2022 08:21:05 +0000 (10:21 +0200)] 
lib-master: ssl_options - Remove support for no_compression

This has been default for a while now.

3 years agodict: Support only v4 protocol
Aki Tuomi [Mon, 28 Mar 2022 10:29:13 +0000 (13:29 +0300)] 
dict: Support only v4 protocol

Remove all code for old dict protocol versions.

3 years agodict: Remove DICT_PROTOCOL_CMD_COMMIT_ASYNC
Aki Tuomi [Fri, 25 Mar 2022 07:14:35 +0000 (09:14 +0200)] 
dict: Remove DICT_PROTOCOL_CMD_COMMIT_ASYNC

Nothing is using it.

3 years agotcpwrap: Remove tcpwrap support
Aki Tuomi [Fri, 25 Mar 2022 07:29:20 +0000 (09:29 +0200)] 
tcpwrap: Remove tcpwrap support

3 years agologin-common: Merge client_connected() to client_connected_finish()
Aki Tuomi [Fri, 25 Mar 2022 07:20:16 +0000 (09:20 +0200)] 
login-common: Merge client_connected() to client_connected_finish()

Does not need to be separate anymore

3 years agologin-common: Remove login_access_sockets
Aki Tuomi [Fri, 25 Mar 2022 07:19:12 +0000 (09:19 +0200)] 
login-common: Remove login_access_sockets

3 years agoauth: Remove checkpassword driver
Aki Tuomi [Sun, 27 Mar 2022 17:21:33 +0000 (20:21 +0300)] 
auth: Remove checkpassword driver

3 years agoquota: count - Always count with virtual size
Aki Tuomi [Fri, 25 Mar 2022 08:09:57 +0000 (10:09 +0200)] 
quota: count - Always count with virtual size

This code was needed because it was used by dict quota,
which is now removed.

3 years agoquota: Remove plugin/quota_vsizes setting
Aki Tuomi [Fri, 25 Mar 2022 08:09:04 +0000 (10:09 +0200)] 
quota: Remove plugin/quota_vsizes setting

3 years agoquota: Add use_vsize variable to quota_backend
Aki Tuomi [Fri, 25 Mar 2022 07:55:57 +0000 (09:55 +0200)] 
quota: Add use_vsize variable to quota_backend

3 years agoquota-clone: Add quota_clone_unset
Aki Tuomi [Thu, 17 Mar 2022 07:44:03 +0000 (09:44 +0200)] 
quota-clone: Add quota_clone_unset

Unsets quota information first. Needed for dict backends that do not
support upserting.

3 years agoquota-clone: Use events for error logging
Aki Tuomi [Tue, 8 Mar 2022 13:11:16 +0000 (15:11 +0200)] 
quota-clone: Use events for error logging

3 years agoquota: Remove quota-dirsize
Aki Tuomi [Tue, 8 Mar 2022 10:39:50 +0000 (12:39 +0200)] 
quota: Remove quota-dirsize

3 years agoexample-config: Include documentation for quota_clone
Aki Tuomi [Tue, 8 Mar 2022 10:07:55 +0000 (12:07 +0200)] 
example-config: Include documentation for quota_clone

3 years agoexample-config: Document quota=count
Aki Tuomi [Tue, 8 Mar 2022 10:05:08 +0000 (12:05 +0200)] 
example-config: Document quota=count

3 years agoquota: Remove quota-dict
Aki Tuomi [Tue, 8 Mar 2022 10:03:43 +0000 (12:03 +0200)] 
quota: Remove quota-dict

3 years agomail-crypt: fs_crypt_load_keys() - Check list for NULL before dereference
Martti Rannanjärvi [Tue, 29 Mar 2022 03:50:50 +0000 (06:50 +0300)] 
mail-crypt: fs_crypt_load_keys() - Check list for NULL before dereference

NULL check was after dereference here, found by Coverity.

3 years agoauth: Fix return value of auth worker input processing callback
Karl Fleischmann [Mon, 28 Mar 2022 12:39:18 +0000 (14:39 +0200)] 
auth: Fix return value of auth worker input processing callback

Fix return value of input args callback in shutdown/restart cases to
stop further input processing.

3 years agolib-storage: Expunge mails in batches when deleting a mailbox.
sergey.kitov [Tue, 8 Mar 2022 11:38:39 +0000 (13:38 +0200)] 
lib-storage: Expunge mails in batches when deleting a mailbox.

3 years agoimap: Remove imap_search_seqset_iter_* functions from imap.
sergey.kitov [Tue, 8 Mar 2022 11:30:20 +0000 (13:30 +0200)] 
imap: Remove imap_search_seqset_iter_* functions from imap.

3 years agoimap: Use batched seqset iteration from lib-storage.
sergey.kitov [Tue, 8 Mar 2022 10:19:04 +0000 (12:19 +0200)] 
imap: Use batched seqset iteration from lib-storage.

3 years agoimap: Whitespace cleanup.
sergey.kitov [Tue, 8 Mar 2022 09:58:41 +0000 (11:58 +0200)] 
imap: Whitespace cleanup.

3 years agolib-storage: Replace AUTOEXPUNGE_BATCH_SIZE with MAIL_EXPUNGE_BATCH_SIZE.
sergey.kitov [Tue, 15 Mar 2022 14:51:36 +0000 (16:51 +0200)] 
lib-storage: Replace AUTOEXPUNGE_BATCH_SIZE with MAIL_EXPUNGE_BATCH_SIZE.

3 years agolib-storage: Add MAIL_EXPUNGE_BATCH_SIZE constant.
sergey.kitov [Tue, 8 Mar 2022 10:13:05 +0000 (12:13 +0200)] 
lib-storage: Add MAIL_EXPUNGE_BATCH_SIZE constant.

3 years agolib-storage: Fix seqset iterator initialization for the case with message_count==0
sergey.kitov [Wed, 23 Mar 2022 11:38:00 +0000 (13:38 +0200)] 
lib-storage: Fix seqset iterator initialization for the case with message_count==0

3 years agolib-storage: Add mail_search_seqset_iter_*() API for batched iteration of a seqset
sergey.kitov [Tue, 8 Mar 2022 09:52:31 +0000 (11:52 +0200)] 
lib-storage: Add mail_search_seqset_iter_*() API for batched iteration of a seqset

3 years agolib-storage: Whitespace cleanup.
sergey.kitov [Thu, 17 Feb 2022 08:33:19 +0000 (10:33 +0200)] 
lib-storage: Whitespace cleanup.

3 years agomail-crypt: Do not attempt to load empty keys
Aki Tuomi [Fri, 25 Mar 2022 12:07:40 +0000 (14:07 +0200)] 
mail-crypt: Do not attempt to load empty keys

3 years agomail-crypt: fs-crypt - Add unit tests for fs-crypt
Aki Tuomi [Fri, 18 Mar 2022 13:39:57 +0000 (15:39 +0200)] 
mail-crypt: fs-crypt - Add unit tests for fs-crypt

3 years agofs-mail-crypt: Allow missing keys if mail_crypt_save_version = 0
Aki Tuomi [Fri, 25 Mar 2022 07:04:01 +0000 (09:04 +0200)] 
fs-mail-crypt: Allow missing keys if mail_crypt_save_version = 0

3 years agomail-crypt: fs-crypt - Support reading maybe encrypted files
Aki Tuomi [Fri, 18 Mar 2022 13:39:29 +0000 (15:39 +0200)] 
mail-crypt: fs-crypt - Support reading maybe encrypted files

3 years agomail-crypt: fs-crypt - Require public_key for encryption
Aki Tuomi [Fri, 18 Mar 2022 08:01:49 +0000 (10:01 +0200)] 
mail-crypt: fs-crypt - Require public_key for encryption

Adds parameter maybe to allow not requiring it.

3 years agomail-crypt: fs-crypt - Allow using without any parameters
Aki Tuomi [Fri, 18 Mar 2022 13:33:02 +0000 (15:33 +0200)] 
mail-crypt: fs-crypt - Allow using without any parameters

It does not require any and this check would break
crypt:posix usage.

3 years agolib-dcrypt: test-stream - Try read invalid stream
Aki Tuomi [Mon, 21 Mar 2022 14:19:05 +0000 (16:19 +0200)] 
lib-dcrypt: test-stream - Try read invalid stream

Test that reading stream with correct magic but invalid
data fails correctly.

3 years agolib-dcrypt: istream-decrypt - Change EINVAL to EIO, except when it's not encrypted
Aki Tuomi [Mon, 21 Mar 2022 13:41:48 +0000 (15:41 +0200)] 
lib-dcrypt: istream-decrypt - Change EINVAL to EIO, except when it's not encrypted

Makes it easier to detect unencrypted streams.

3 years agolib: Add istream-noop
Aki Tuomi [Mon, 21 Mar 2022 15:36:00 +0000 (17:36 +0200)] 
lib: Add istream-noop

A simple wrapper class that allows using istream as a child stream.

3 years agolib-test: test_istream_find - Ensure that stream is not NULL
Aki Tuomi [Tue, 22 Mar 2022 11:08:49 +0000 (13:08 +0200)] 
lib-test: test_istream_find - Ensure that stream is not NULL

3 years agolib: i_stream_get_name - Ensure that stream is not NULL
Aki Tuomi [Tue, 22 Mar 2022 11:08:26 +0000 (13:08 +0200)] 
lib: i_stream_get_name - Ensure that stream is not NULL

3 years agoauth: Handle return value of connection_client_connect()
Karl Fleischmann [Thu, 24 Mar 2022 09:20:33 +0000 (10:20 +0100)] 
auth: Handle return value of connection_client_connect()

3 years agolib: str_begins*() - Suppress static code analyzer false positives
Marco Bettini [Thu, 24 Mar 2022 09:45:37 +0000 (09:45 +0000)] 
lib: str_begins*() - Suppress static code analyzer false positives

The code analyzer is not able to properly infer that str_begins_builtin_success()
cannot be invoked when the previous strncmp() does not match. It then complies
about overrun pointers arithmetic that is just not possible to happen.

3 years agoauth: Rename auth-worker-client -> auth-worker-server
Karl Fleischmann [Tue, 1 Mar 2022 11:07:08 +0000 (12:07 +0100)] 
auth: Rename auth-worker-client -> auth-worker-server

The previous naming convention of auth-worker-server and
auth-worker-client was confusing enough to justify a rename.

3 years agoauth: Rename auth-worker-server -> auth-worker-connection
Karl Fleischmann [Tue, 1 Mar 2022 10:10:08 +0000 (11:10 +0100)] 
auth: Rename auth-worker-server -> auth-worker-connection

The previous naming convention of auth-worker-server and
auth-worker-client was confusing enough to justify a rename.

3 years agoauth: Clean up naming for auth worker connections
Karl Fleischmann [Mon, 21 Feb 2022 15:11:39 +0000 (16:11 +0100)] 
auth: Clean up naming for auth worker connections

Similar to the indexer this commit consolidates the naming of the
auth-worker setup into a header file. This reduces the effort to write
the appropriate name correctly in 4 different places.

3 years agoauth: Remove auth_worker_max_count_setting
Karl Fleischmann [Fri, 18 Feb 2022 15:33:01 +0000 (16:33 +0100)] 
auth: Remove auth_worker_max_count_setting

Replace obsolete `auth_worker_max_count` setting with `service
auth-worker { process_limit }`.

3 years agoauth: Set process limit via handshake
Karl Fleischmann [Tue, 22 Feb 2022 13:51:50 +0000 (14:51 +0100)] 
auth: Set process limit via handshake

Append process_limit value in handshake between auth-worker client and
server. The server now uses this value to determine how many workers to
spawn.

3 years agoauth: Make sure auth worker idle count is valid
Karl Fleischmann [Mon, 28 Feb 2022 09:30:57 +0000 (10:30 +0100)] 
auth: Make sure auth worker idle count is valid

Make obvious corruptions to the idle auth worker counter immediately
visible by asserting that this unsigned value never gets decremented
past 0.

3 years agoauth: Improve consistency with auth-worker timeout values
Karl Fleischmann [Fri, 4 Mar 2022 14:55:12 +0000 (15:55 +0100)] 
auth: Improve consistency with auth-worker timeout values

- Split values into numeric value and factor for next larger timeframe
  (i.e. 60 for minutes, 1000 for seconds), and
- order them to be numeric value first, factor last for consistency.

3 years agoauth: Refactor auth-worker to use connection API
Karl Fleischmann [Fri, 18 Feb 2022 10:41:47 +0000 (11:41 +0100)] 
auth: Refactor auth-worker to use connection API

This change allows an easier exchange of the process_limit value from
the auth-worker-client process to the auth-worker-server.

3 years agoauth: Remove unused auth_fields_import()
Karl Fleischmann [Tue, 1 Mar 2022 09:39:32 +0000 (10:39 +0100)] 
auth: Remove unused auth_fields_import()

3 years agoauth: Refactor auth worker callbacks to use arguments
Karl Fleischmann [Tue, 1 Mar 2022 09:35:10 +0000 (10:35 +0100)] 
auth: Refactor auth worker callbacks to use arguments

To prepare a refactor of the auth worker input handling to use the
connection API this commit changes the signature of the auth worker
callback to use an arguments array instead of the full line as well as
all relevant callback functions.

3 years agoauth: Add arguments based auth field importers
Karl Fleischmann [Tue, 1 Mar 2022 09:28:25 +0000 (10:28 +0100)] 
auth: Add arguments based auth field importers

This commit prepares a refactor of authentication callbacks to use
arguments arrays instead of full lines.

3 years agoauth: Clarify auth worker connection variable naming
Karl Fleischmann [Mon, 28 Feb 2022 13:31:15 +0000 (14:31 +0100)] 
auth: Clarify auth worker connection variable naming

Rename `conn` to `worker` to make distinction clear between generic
connection and auth_worker_connection respectively.

3 years agoauth: auth_worker_server - Use connection.h structures
Karl Fleischmann [Fri, 18 Feb 2022 09:11:14 +0000 (10:11 +0100)] 
auth: auth_worker_server - Use connection.h structures

This commit prepares a refactor of auth-worker-server to use the
connection API by introducing the connection.h structures.
Keep the lookup timeout extra in the worker as there are more distinct
use-cases for it than the connection API would handle.

3 years agoauth: Remove unreached return statement
Karl Fleischmann [Wed, 9 Mar 2022 12:49:13 +0000 (13:49 +0100)] 
auth: Remove unreached return statement

3 years agoauth: Whitespace fix
Karl Fleischmann [Thu, 17 Feb 2022 11:14:01 +0000 (12:14 +0100)] 
auth: Whitespace fix

3 years agoglobal: Replace strncasecmp() with str_begins_icase*()
Timo Sirainen [Sun, 19 Apr 2020 13:11:47 +0000 (16:11 +0300)] 
global: Replace strncasecmp() with str_begins_icase*()

3 years agolib: Add str_begins_icase*() and str_match_icase()
Timo Sirainen [Sun, 19 Apr 2020 12:31:35 +0000 (15:31 +0300)] 
lib: Add str_begins_icase*() and str_match_icase()

3 years agolib: Remove strcasecmp() / strncasecmp() compatibility functions
Timo Sirainen [Sun, 19 Apr 2020 13:13:02 +0000 (16:13 +0300)] 
lib: Remove strcasecmp() / strncasecmp() compatibility functions

We don't support any OS where these don't exist.

3 years agoglobal: Rename str_begins_suffix() to str_begins() and use it everywhere
Timo Sirainen [Fri, 10 Apr 2020 16:13:07 +0000 (19:13 +0300)] 
global: Rename str_begins_suffix() to str_begins() and use it everywhere

3 years agoimap: notify - Replace strncmp() with str_begins()
Timo Sirainen [Fri, 10 Apr 2020 18:00:34 +0000 (21:00 +0300)] 
imap: notify - Replace strncmp() with str_begins()

3 years agoglobal: Use str_begins_with()
Timo Sirainen [Fri, 10 Apr 2020 16:45:44 +0000 (19:45 +0300)] 
global: Use str_begins_with()

3 years agolib: Add str_begins_suffix()
Timo Sirainen [Fri, 10 Apr 2020 16:56:14 +0000 (19:56 +0300)] 
lib: Add str_begins_suffix()

3 years agolib: test-strfuncs - Add tests for literal versions of str_begins_with()
Timo Sirainen [Fri, 10 Apr 2020 16:53:02 +0000 (19:53 +0300)] 
lib: test-strfuncs - Add tests for literal versions of str_begins_with()

3 years agolib: Rename str_begins() to str_begins_with() and add compatibility macro
Timo Sirainen [Fri, 10 Apr 2020 16:50:54 +0000 (19:50 +0300)] 
lib: Rename str_begins() to str_begins_with() and add compatibility macro