]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
5 years agoimap: imap-sync - Avoid unsigned integer overflow
Aki Tuomi [Thu, 20 Aug 2020 06:53:11 +0000 (09:53 +0300)] 
imap: imap-sync - Avoid unsigned integer overflow

Error: imap-sync.c:433:17: runtime error: unsigned integer overflow:
4294967295 + 1 cannot be represented in type 'unsigned int'

5 years agolib-mail: test-istream-attachment - Avoid unsigned overflow in size calculation
Aki Tuomi [Thu, 20 Aug 2020 06:44:58 +0000 (09:44 +0300)] 
lib-mail: test-istream-attachment - Avoid unsigned overflow in size calculation

5 years agolib: var-expand - Avoid unsigned overflow in offset calculation
Aki Tuomi [Thu, 20 Aug 2020 06:44:20 +0000 (09:44 +0300)] 
lib: var-expand - Avoid unsigned overflow in offset calculation

5 years agolib: time-util - Use correct data types
Aki Tuomi [Thu, 20 Aug 2020 06:43:35 +0000 (09:43 +0300)] 
lib: time-util - Use correct data types

5 years agoquota: quota-imapc - Handle quota limits better
Aki Tuomi [Thu, 20 Aug 2020 06:34:40 +0000 (09:34 +0300)] 
quota: quota-imapc - Handle quota limits better

If quota limit is bigger than INT64_MAX, it's unlimited
as we cannot express this anyways.

5 years agolib-mail: message-parser - Change last_chr to unsigned char
Aki Tuomi [Thu, 20 Aug 2020 06:10:36 +0000 (09:10 +0300)] 
lib-mail: message-parser - Change last_chr to unsigned char

Matches code usage.

5 years agolib-imap-storage: imap-msgpart - Fix constant type
Aki Tuomi [Thu, 20 Aug 2020 06:02:07 +0000 (09:02 +0300)] 
lib-imap-storage: imap-msgpart - Fix constant type

5 years agoauth: password-scheme - Fix salt generation data type mess
Aki Tuomi [Thu, 20 Aug 2020 05:47:16 +0000 (08:47 +0300)] 
auth: password-scheme - Fix salt generation data type mess

Satisfies runtime analyser

5 years agoauth: mech-scram - Use correct data type for proof calculation
Aki Tuomi [Thu, 20 Aug 2020 05:44:45 +0000 (08:44 +0300)] 
auth: mech-scram - Use correct data type for proof calculation

Satisfies runtime analyzer

5 years agolib: Remove istream-mmap.c
Aki Tuomi [Mon, 31 Aug 2020 13:15:15 +0000 (16:15 +0300)] 
lib: Remove istream-mmap.c

Nothing uses it.

5 years agolib-ntlm: Ensure data_size is large enough for buffer
Aki Tuomi [Mon, 31 Aug 2020 07:33:05 +0000 (10:33 +0300)] 
lib-ntlm: Ensure data_size is large enough for buffer

5 years agolib-ntlm: Use CONST_PTR_OFFSET
Aki Tuomi [Thu, 13 Aug 2020 06:48:27 +0000 (09:48 +0300)] 
lib-ntlm: Use CONST_PTR_OFFSET

5 years agoauth, lib-ntlm: Use dovecot byteorder functions
Aki Tuomi [Thu, 13 Aug 2020 06:46:37 +0000 (09:46 +0300)] 
auth, lib-ntlm: Use dovecot byteorder functions

5 years agolib: buffer - Assert that we don't try to allocate SIZE_MAX buffer
Aki Tuomi [Tue, 11 Aug 2020 06:00:17 +0000 (09:00 +0300)] 
lib: buffer - Assert that we don't try to allocate SIZE_MAX buffer

Only if devel checks are enabled

5 years agolib-ssl-iostream: ostream-openssl - Allocate at most IO_BLOCK_SIZE initial buffer
Aki Tuomi [Tue, 11 Aug 2020 05:45:37 +0000 (08:45 +0300)] 
lib-ssl-iostream: ostream-openssl - Allocate at most IO_BLOCK_SIZE initial buffer

Otherwise we might attempt to allocate way too large buffers. This has not caused
issues yet, except with max_buffer_size=SIZE_T, which has been causing us to allocate
0-sized buffers.

5 years agoauth: auth-cache - Data is not 4 bytes but variable sized
Aki Tuomi [Mon, 10 Aug 2020 16:54:51 +0000 (19:54 +0300)] 
auth: auth-cache - Data is not 4 bytes but variable sized

5 years agolib-otp: Use for-loop instead while
Aki Tuomi [Thu, 13 Aug 2020 08:41:23 +0000 (11:41 +0300)] 
lib-otp: Use for-loop instead while

Avoids unsigned integer wrap

5 years agolib-compression: istream-zstd - Handle signed/unsigned return values correctly
Aki Tuomi [Thu, 13 Aug 2020 08:40:35 +0000 (11:40 +0300)] 
lib-compression: istream-zstd - Handle signed/unsigned return values correctly

5 years agolib: lib-event - Use for-loop in copying categories
Aki Tuomi [Thu, 13 Aug 2020 08:39:59 +0000 (11:39 +0300)] 
lib: lib-event - Use for-loop in copying categories

Avoids unsigned integer wrap

5 years agoglobal: Use i_rand_limit(limit) instead of i_rand() % limit
Aki Tuomi [Wed, 19 Aug 2020 10:55:18 +0000 (13:55 +0300)] 
global: Use i_rand_limit(limit) instead of i_rand() % limit

spatch with coccinelle/random-misuse.cocci

5 years agolib: Use i_rand_limit() helpers
Aki Tuomi [Wed, 19 Aug 2020 11:01:50 +0000 (14:01 +0300)] 
lib: Use i_rand_limit() helpers

5 years agolib: test-base32/64 - Use unsigned char
Aki Tuomi [Wed, 19 Aug 2020 11:00:03 +0000 (14:00 +0300)] 
lib: test-base32/64 - Use unsigned char

Simplifies next change

5 years agolib: Add some helpers for random values
Aki Tuomi [Wed, 19 Aug 2020 16:49:38 +0000 (19:49 +0300)] 
lib: Add some helpers for random values

5 years agolib: Document how i_rand_limit() ensures uniform distribution
Josef 'Jeff' Sipek [Wed, 19 Aug 2020 18:33:59 +0000 (14:33 -0400)] 
lib: Document how i_rand_limit() ensures uniform distribution

This algorithm is not original, but it is dense enough that a detailed
explanation is in order.

5 years agolib: rand - Fix random number bounding
Aki Tuomi [Thu, 13 Aug 2020 08:35:17 +0000 (11:35 +0300)] 
lib: rand - Fix random number bounding

5 years agoauth: password-scheme - Use generate_salt in md5crypt
Aki Tuomi [Tue, 11 Aug 2020 05:48:09 +0000 (08:48 +0300)] 
auth: password-scheme - Use generate_salt in md5crypt

Deduplicates code

5 years agolib-sql: driver-cassandra - Add SSL options
Aki Tuomi [Sun, 23 Aug 2020 20:24:35 +0000 (23:24 +0300)] 
lib-sql: driver-cassandra - Add SSL options

ssl_ca=<path>: Sets trusted peer certificate filename
ssl_cert=<path>: Sets client certificate filename
sl_key=<path>: Sets client certificate private key filename
ssl_key_password=<string>: Sets password for private key
ssl_verify=none | cert | cert-ip | cert-dns: Sets verify mode
 * none = don't verify
 * cert = verify certificate
 * cert-ip = verify IP from CN or SubjectAltName
 * cert-dns = verify hostname from CN or SubjectAltName

5 years agolib: buffer - Add buffer_append_full_(file|istream)
Aki Tuomi [Sun, 23 Aug 2020 20:05:33 +0000 (23:05 +0300)] 
lib: buffer - Add buffer_append_full_(file|istream)

Consume istream or file up to max_read_size or EOF.

5 years agom4: want_cassandra.m4 - Add check for CASS_SSL_VERIFY_PEER_IDENTITY_DNS
Aki Tuomi [Sun, 23 Aug 2020 19:24:07 +0000 (22:24 +0300)] 
m4: want_cassandra.m4 - Add check for CASS_SSL_VERIFY_PEER_IDENTITY_DNS

5 years agom4: want_cassandra.m4 - Add check for cass_cluster_set_use_hostname_resolution
Aki Tuomi [Sun, 23 Aug 2020 19:06:50 +0000 (22:06 +0300)] 
m4: want_cassandra.m4 - Add check for cass_cluster_set_use_hostname_resolution

5 years agom4: Modernize want_cassandra.m4
Aki Tuomi [Sun, 23 Aug 2020 19:06:34 +0000 (22:06 +0300)] 
m4: Modernize want_cassandra.m4

5 years agolib-sql: driver-cassandra - Use INTx_MIN and INTx_MAX
Aki Tuomi [Fri, 28 Aug 2020 10:17:10 +0000 (13:17 +0300)] 
lib-sql: driver-cassandra - Use INTx_MIN and INTx_MAX

Preferred over magic numbers

5 years agolib-sql: Reformat driver-cassandra.c
Aki Tuomi [Fri, 28 Aug 2020 10:13:32 +0000 (13:13 +0300)] 
lib-sql: Reformat driver-cassandra.c

5 years agolib-compression: Add unit test to compress large input
Timo Sirainen [Wed, 9 Sep 2020 09:08:38 +0000 (12:08 +0300)] 
lib-compression: Add unit test to compress large input

This catches earlier zstd and lzma bugs.

5 years agolib-compression: ostream-lzma - Compressed output could have been truncated
Timo Sirainen [Wed, 9 Sep 2020 10:00:44 +0000 (13:00 +0300)] 
lib-compression: ostream-lzma - Compressed output could have been truncated

The compression wasn't fully finished, resulting in truncated compressed
output that couldn't be fully read back. Reading would result in "Broken
pipe" errors.

Broken by 6080aa16e1bd50cd661acc31203d9f4986a9450a

5 years agolib-compression: istream-lzma - Improve error messages in EOF handling
Timo Sirainen [Wed, 9 Sep 2020 09:48:39 +0000 (12:48 +0300)] 
lib-compression: istream-lzma - Improve error messages in EOF handling

5 years agolib-compression: istream-lzma - Fix EOF handling
Timo Sirainen [Wed, 9 Sep 2020 09:46:51 +0000 (12:46 +0300)] 
lib-compression: istream-lzma - Fix EOF handling

lzma_stream_end() call was accidentally dropped by
c6248b825d8c6562b1320e51ad0d88e99b9fbe85

This (probably) didn't result in visible problems.

5 years agolib-compression: ostream-zstd - Fix assert-crash with large input
Timo Sirainen [Tue, 8 Sep 2020 18:19:21 +0000 (21:19 +0300)] 
lib-compression: ostream-zstd - Fix assert-crash with large input

If the input was large enough, the ostream write could have returned
partially written output. Since this ostream-zstd was only used for
blocking ostreams, this would always result in an assert-crash. Fix is
to keep flushing the output to parent if the output buffer becomes full.

Fixes:
Panic: file ostream.c: line 287 (o_stream_sendv_int): assertion failed: (!stream->blocking)

5 years agolib: ostream-buffer: Return 0 as the used size, not the destination buffer size
Timo Sirainen [Wed, 9 Sep 2020 09:03:31 +0000 (12:03 +0300)] 
lib: ostream-buffer: Return 0 as the used size, not the destination buffer size

This allows using ostream-buffer in places that previously would think that
the ostream buffer needed to be flushed because its buffer size was too
large.

This also changes o_stream_get_buffer_avail_size() to always return the
ostream max buffer size.

5 years agolib-smtp: smtp-server-recipient - Recipient event should be using the transaction...
Stephan Bosch [Mon, 31 Aug 2020 13:29:03 +0000 (15:29 +0200)] 
lib-smtp: smtp-server-recipient - Recipient event should be using the transaction event as parent.

The connection event is only used as event parent when the MAIL command failed
in pipeline or when the recipient is destroyed prematurely. The log prefix of
the transaction event is dropped, so that the connection event log prefix is
used in either case. Therefore, the main visible effect of this commit is that
the transaction event fields are available in the recipient event when there is
a transaction, the log messages will not change.

5 years agolib-smtp: smtp-server-recipient - Don't create event until transaction becomes available.
Stephan Bosch [Mon, 31 Aug 2020 12:10:18 +0000 (14:10 +0200)] 
lib-smtp: smtp-server-recipient - Don't create event until transaction becomes available.

This way, the recipient event parent can be the transaction event once (and if)
that becomes available.

5 years agolib-smtp: smtp-server-command - Always call the NEXT_TO_REPLY hook.
Stephan Bosch [Mon, 31 Aug 2020 12:58:44 +0000 (14:58 +0200)] 
lib-smtp: smtp-server-command - Always call the NEXT_TO_REPLY hook.

Before, it wasn't called when a reply was submitted before the command became
next to reply.

5 years agolib-smtp: smtp-server-command - Move smtp_server_command_ready_to_reply().
Stephan Bosch [Mon, 31 Aug 2020 12:44:25 +0000 (14:44 +0200)] 
lib-smtp: smtp-server-command - Move smtp_server_command_ready_to_reply().

New order makes more sense in the progression of command state.

5 years agolib: event-log - Fix handling dropping parent prefixes beyond a drop at a higher...
Stephan Bosch [Wed, 2 Sep 2020 09:15:33 +0000 (11:15 +0200)] 
lib: event-log - Fix handling dropping parent prefixes beyond a drop at a higher level.

Before, the drop in the higher level became invisible to the lower
hiererarchies. For example:

parent1, parent2, parent3, parent4(drop one) yielded
"parent1: parent2: parent4: " as a prefix (which is still OK), whereas
parent1: parent2: parent3: parent4(drop one): leaf(drop 3) yielded
"parent1: leaf: ", while the expected prefix would be:
"leaf: ".

This means that the drop of one prefix by parent4 is ignored. Instead it should
apply that drop and operate on the prefixes that are still visible at the lowel
level, so the number of prefixes dropped should be additive, which is what this
commit changes.

5 years agolib-smtp: Reformat smtp-server-recipient.c.
Stephan Bosch [Mon, 31 Aug 2020 13:08:43 +0000 (15:08 +0200)] 
lib-smtp: Reformat smtp-server-recipient.c.

5 years agolib-smtp: Reformat smtp-server-private.h.
Stephan Bosch [Mon, 31 Aug 2020 12:40:16 +0000 (14:40 +0200)] 
lib-smtp: Reformat smtp-server-private.h.

5 years agolib-smtp: Reformat smtp-server-connection.c.
Stephan Bosch [Mon, 31 Aug 2020 12:37:35 +0000 (14:37 +0200)] 
lib-smtp: Reformat smtp-server-connection.c.

5 years agolib-smtp: Reformat smtp-server-command.c.
Stephan Bosch [Mon, 31 Aug 2020 12:21:41 +0000 (14:21 +0200)] 
lib-smtp: Reformat smtp-server-command.c.

5 years agolib-smtp: Reformat smtp-server-cmd-mail.c.
Stephan Bosch [Mon, 31 Aug 2020 12:16:31 +0000 (14:16 +0200)] 
lib-smtp: Reformat smtp-server-cmd-mail.c.

5 years agolib-smtp: Reformat smtp-server-cmd-rcpt.c.
Stephan Bosch [Mon, 31 Aug 2020 12:13:31 +0000 (14:13 +0200)] 
lib-smtp: Reformat smtp-server-cmd-rcpt.c.

5 years agolib-dict: dict_transaction_commit_async() - Never call callback immediately
Aki Tuomi [Mon, 7 Sep 2020 07:56:34 +0000 (10:56 +0300)] 
lib-dict: dict_transaction_commit_async() - Never call callback immediately

This could cause confusion for the callers. Although so far all the callers
have handled it fine.

Use this wrappers for all dict drivers, even if they support async commits
themselves. This is because many of them were still calling the callback
immediately on error handling.

5 years agolib: istream-try - Fix off-by-one check for min_buffer_full_size
Timo Sirainen [Thu, 10 Sep 2020 07:16:56 +0000 (10:16 +0300)] 
lib: istream-try - Fix off-by-one check for min_buffer_full_size

This mainly fixes random failures with the unit test.

5 years agolib: test-istream-try - Fix test name
Timo Sirainen [Thu, 10 Sep 2020 07:16:35 +0000 (10:16 +0300)] 
lib: test-istream-try - Fix test name

5 years agolib: istream-try - Fix detecting istream when its input buffer is full
Timo Sirainen [Tue, 8 Sep 2020 14:32:32 +0000 (17:32 +0300)] 
lib: istream-try - Fix detecting istream when its input buffer is full

The previous check didn't work when the stream's buffer_size was 0,
which happened with istream-concat parent.

Added also a unit test that tries to test for these kind of situations.
It doesn't actually reproduce this specific bug, but it tests that the
code paths works at least in the generic situation.

5 years agolib-compression: Add COMPRESSION_HDR_MAX_SIZE macro
Timo Sirainen [Tue, 8 Sep 2020 17:14:09 +0000 (20:14 +0300)] 
lib-compression: Add COMPRESSION_HDR_MAX_SIZE macro

Will be used by the next commit.

5 years agoquota: Add logging prefix once and remove it from loglines
Markus Valentin [Wed, 8 Jul 2020 08:18:27 +0000 (10:18 +0200)] 
quota: Add logging prefix once and remove it from loglines

5 years agoquota: Introduce per quota-backend events
Markus Valentin [Tue, 7 Jul 2020 12:39:22 +0000 (14:39 +0200)] 
quota: Introduce per quota-backend events

5 years agoquota: Use event based logging
Timo Sirainen [Thu, 31 Oct 2019 17:27:15 +0000 (19:27 +0200)] 
quota: Use event based logging

5 years agoquota: Add event support
Aki Tuomi [Tue, 25 Aug 2020 11:01:24 +0000 (14:01 +0300)] 
quota: Add event support

5 years agolib-index: Fix cache being purged too often when it had unaccessed fields
Timo Sirainen [Mon, 31 Aug 2020 15:30:18 +0000 (18:30 +0300)] 
lib-index: Fix cache being purged too often when it had unaccessed fields

Cache was being purged when it had a field that was last accessed
after mail_cache_unaccessed_field_drop but before
2*mail_cache_unaccessed_field_drop. This purging may not have even
done anything.

Use shared code now between the check in mail_cache_header_fields_read()
and the actual purging in mail_cache_purge_check_field(). This way they
can't become desynced again.

5 years agolib-index: Use delayed purge reason for mail_cache_purge_* events
Timo Sirainen [Mon, 31 Aug 2020 14:27:58 +0000 (17:27 +0300)] 
lib-index: Use delayed purge reason for mail_cache_purge_* events

5 years agolib-index: Remember reason for delayed cache file purges
Timo Sirainen [Mon, 31 Aug 2020 14:25:54 +0000 (17:25 +0300)] 
lib-index: Remember reason for delayed cache file purges

5 years agolib-index: Fix file_size field in mail_cache_purge_finished event
Timo Sirainen [Mon, 31 Aug 2020 14:23:05 +0000 (17:23 +0300)] 
lib-index: Fix file_size field in mail_cache_purge_finished event

It used to be 32 always.

5 years agolib-index: Fix deadlock when expunging mails and adding lots of data to cache
Timo Sirainen [Wed, 26 Aug 2020 15:39:22 +0000 (18:39 +0300)] 
lib-index: Fix deadlock when expunging mails and adding lots of data to cache

This practically happened only when dovecot.index.cache contents were lost
and they were being re-filled while mails were also being expunged.

Broken by 9efb99924d0b7de27ca83e373f2290f3dd5b22cf

5 years agozlib: Rename istreams from zlib(parent) to compress(parent)
Timo Sirainen [Fri, 28 Aug 2020 14:16:03 +0000 (17:16 +0300)] 
zlib: Rename istreams from zlib(parent) to compress(parent)

This clarifies it that the istream is a generic compression stream, not
specifically zlib/gz.

5 years agolib-compression: ostreams - Add asserts to clarify how buffer flushing works
Timo Sirainen [Fri, 28 Aug 2020 14:13:32 +0000 (17:13 +0300)] 
lib-compression: ostreams - Add asserts to clarify how buffer flushing works

If the output buffer isn't fully sent, the flush function returns 0 early
on, before setting flushed=TRUE.

5 years agoauth: Fix leaking memory if auth client disconnects with pending penalty delays
Timo Sirainen [Fri, 28 Aug 2020 13:57:57 +0000 (16:57 +0300)] 
auth: Fix leaking memory if auth client disconnects with pending penalty delays

 * auth penalty lookup returns that auth_request needs a penalty delay
 * during the penalty timeout auth client disconnects
 * auth requests are freed, but auth_request_handler isn't unreferenced

This resulted in memory leak, and after recent changes also logging warnings
about event leaks.

5 years agolib-auth: Remove duplicate auth_client_connection.event
Timo Sirainen [Thu, 27 Aug 2020 15:35:33 +0000 (18:35 +0300)] 
lib-auth: Remove duplicate auth_client_connection.event

It's already in auth_client_connection.conn.event. Just use it directly
to avoid any confusion between them.

5 years agoauth: Fix compiling gssapi, bsdauth, sia, vpopmail
Timo Sirainen [Thu, 27 Aug 2020 14:28:38 +0000 (17:28 +0300)] 
auth: Fix compiling gssapi, bsdauth, sia, vpopmail

Broken by 5ff7299c9d85b1bab0c7d53d9459dbb31a2bd9d6

5 years agolib-http: test-http-client-errors - Add tests involving idle connections.
Stephan Bosch [Wed, 19 Aug 2020 22:24:52 +0000 (00:24 +0200)] 
lib-http: test-http-client-errors - Add tests involving idle connections.

Tests idle timeout and connection reuse.

5 years agolib-http: http-client-connection - Use http_client_connection_is_active() to check...
Stephan Bosch [Wed, 19 Aug 2020 22:17:49 +0000 (00:17 +0200)] 
lib-http: http-client-connection - Use http_client_connection_is_active() to check idle status.

This makes the check shorter and easier to understand.

5 years agolib-http: http-client-queue - Fix unsigned int arithmetic problem in http_client_queu...
Stephan Bosch [Wed, 12 Aug 2020 20:30:35 +0000 (22:30 +0200)] 
lib-http: http-client-queue - Fix unsigned int arithmetic problem in http_client_queue_request_timeout_cmp().

5 years agolib-http: http-client-connection - Use timeout_add_short_to() for idle timeout.
Stephan Bosch [Thu, 13 Aug 2020 17:31:30 +0000 (19:31 +0200)] 
lib-http: http-client-connection - Use timeout_add_short_to() for idle timeout.

The idle timeout can be very short.

5 years agolib-http: http-client-connection - Make idle timeout calculation more robust.
Stephan Bosch [Wed, 12 Aug 2020 19:33:08 +0000 (21:33 +0200)] 
lib-http: http-client-connection - Make idle timeout calculation more robust.

5 years agolib-http: http-client-connection - Explicitly handle an infinite connection limit...
Stephan Bosch [Wed, 12 Aug 2020 20:24:22 +0000 (22:24 +0200)] 
lib-http: http-client-connection - Explicitly handle an infinite connection limit for setting idle timeout.

This can just use the maximum idle timeout directly.

5 years agolib-http: http-client-connection - Deal with first idle connection separately for...
Stephan Bosch [Wed, 12 Aug 2020 20:20:26 +0000 (22:20 +0200)] 
lib-http: http-client-connection - Deal with first idle connection separately for setting idle timeout.

This can just use the maximum idle timeout directly.

5 years agolib-http: http-client-connection - Improve overall logic in http_client_connection_st...
Stephan Bosch [Wed, 12 Aug 2020 19:17:08 +0000 (21:17 +0200)] 
lib-http: http-client-connection - Improve overall logic in http_client_connection_start_idle_timeout().

Make clear that idle_count < max when it is used.

5 years agolib-http: http-client-connection - Start idle state in a common function.
Stephan Bosch [Wed, 12 Aug 2020 16:00:45 +0000 (18:00 +0200)] 
lib-http: http-client-connection - Start idle state in a common function.

Removes code duplication.

5 years agolib-http: http-client-connection - Handle infinite idle timeout consistently.
Stephan Bosch [Wed, 12 Aug 2020 18:35:46 +0000 (20:35 +0200)] 
lib-http: http-client-connection - Handle infinite idle timeout consistently.

5 years agolib-http: http-client-connection - Start idle timeout in a common function.
Stephan Bosch [Wed, 12 Aug 2020 18:11:01 +0000 (20:11 +0200)] 
lib-http: http-client-connection - Start idle timeout in a common function.

5 years agolib-http: http-client-connection - Use separate flag for idle status.
Stephan Bosch [Wed, 12 Aug 2020 17:54:50 +0000 (19:54 +0200)] 
lib-http: http-client-connection - Use separate flag for idle status.

It used the presence of the idle timeout before, which isn't acceptable when the
timeout is changed to be optional (happens in later commit).

5 years agolib-http: http-client-connection - Determine idle timeout consistently.
Stephan Bosch [Wed, 12 Aug 2020 15:16:12 +0000 (17:16 +0200)] 
lib-http: http-client-connection - Determine idle timeout consistently.

It should not matter whether connection got idle due to lost peer or otherwise.

5 years agolib-http: http-client-connection - Restructure http_client_connection_check_idle().
Stephan Bosch [Wed, 12 Aug 2020 15:10:20 +0000 (17:10 +0200)] 
lib-http: http-client-connection - Restructure http_client_connection_check_idle().

5 years agolib-http: http-client-connection - Restructure http_client_connection_lost_peer().
Stephan Bosch [Wed, 12 Aug 2020 15:06:23 +0000 (17:06 +0200)] 
lib-http: http-client-connection - Restructure http_client_connection_lost_peer().

5 years agolib-http: http-client-peer - Properly saturate result of http_client_peer_shared_max_...
Stephan Bosch [Wed, 12 Aug 2020 19:47:39 +0000 (21:47 +0200)] 
lib-http: http-client-peer - Properly saturate result of http_client_peer_shared_max_connections() at UINT_MAX.

5 years agolib-http: Reformat http-client-connection.c.
Stephan Bosch [Wed, 12 Aug 2020 16:27:48 +0000 (18:27 +0200)] 
lib-http: Reformat http-client-connection.c.

5 years agolib-http: Reformat http-client-private.h.
Stephan Bosch [Tue, 20 Mar 2018 19:59:07 +0000 (20:59 +0100)] 
lib-http: Reformat http-client-private.h.

5 years agolib-http: Reformat http-client-queue.c.
Stephan Bosch [Tue, 20 Mar 2018 19:59:21 +0000 (20:59 +0100)] 
lib-http: Reformat http-client-queue.c.

5 years agolib-http: Reformat http-client-peer.c.
Stephan Bosch [Tue, 20 Mar 2018 19:58:56 +0000 (20:58 +0100)] 
lib-http: Reformat http-client-peer.c.

5 years agolib-auth: Do not send ssl details to auth process
Aki Tuomi [Mon, 10 Aug 2020 11:43:11 +0000 (14:43 +0300)] 
lib-auth: Do not send ssl details to auth process

They are not used for anything. But we still provide them
as auth_client event fields, so that we can e.g. do metrics
on which TLS protocol is used.

5 years agolib-auth: Add user_mask to auth_userdb_list events
Aki Tuomi [Mon, 10 Aug 2020 07:56:14 +0000 (10:56 +0300)] 
lib-auth: Add user_mask to auth_userdb_list events

5 years agolib-auth: Add new fields to auth_client_userdb events
Aki Tuomi [Mon, 10 Aug 2020 07:23:19 +0000 (10:23 +0300)] 
lib-auth: Add new fields to auth_client_userdb events

5 years agodoveadm: doveadm-auth - Add support for real_{remote|local}_{ip|port} -x parameters
Aki Tuomi [Mon, 10 Aug 2020 06:29:10 +0000 (09:29 +0300)] 
doveadm: doveadm-auth - Add support for real_{remote|local}_{ip|port} -x parameters

5 years agodoveadm: doveadm-auth - Add session and local_name -x parameters
Aki Tuomi [Mon, 10 Aug 2020 06:11:41 +0000 (09:11 +0300)] 
doveadm: doveadm-auth - Add session and local_name -x parameters

5 years agolib-auth: Add session_id and local_name to master auth
Aki Tuomi [Mon, 10 Aug 2020 06:10:08 +0000 (09:10 +0300)] 
lib-auth: Add session_id and local_name to master auth

5 years agolmtp: Rename orig_user event field to original_user
Aki Tuomi [Thu, 6 Aug 2020 07:52:18 +0000 (10:52 +0300)] 
lmtp: Rename orig_user event field to original_user

5 years agolib-auth: Add more fields to auth client event
Aki Tuomi [Mon, 27 Jul 2020 06:11:47 +0000 (09:11 +0300)] 
lib-auth: Add more fields to auth client event

This way it becomes more useful

5 years agolib-auth: Always iterate input arguments
Aki Tuomi [Mon, 27 Jul 2020 09:26:49 +0000 (12:26 +0300)] 
lib-auth: Always iterate input arguments

Makes next change easier

5 years agolib-auth: Send event after setting all fields
Aki Tuomi [Mon, 27 Jul 2020 05:48:49 +0000 (08:48 +0300)] 
lib-auth: Send event after setting all fields

5 years agoman: doveadm-auth - List more -x fields
Timo Sirainen [Thu, 6 Aug 2020 16:38:33 +0000 (19:38 +0300)] 
man: doveadm-auth - List more -x fields