Karl Fleischmann [Tue, 21 Jun 2022 07:26:19 +0000 (09:26 +0200)]
m4: glibc.m4 - Improve glibc-check
The previous check was based on a compilation error and negating the
value. This updated check is more clear as it runs the preprocessor with
the appropriate header file and checks if the output matches, which in
turn allows for a more forward readable definition of the
i_cv_have_glibc value.
Marco Bettini [Tue, 28 Jun 2022 14:37:55 +0000 (14:37 +0000)]
lib-storage: mbox_sync_handle_eof_updates() - Fix for crash on implicit conversion
implicit conversion from type ‘unsigned long’ of value
0xFFFFFFFFFFFFF3FD (64-bit, unsigned) to type ‘off_t’ (aka ‘long’)
changed the value to -3075 (64-bit, signed)
Timo Sirainen [Mon, 25 Jan 2021 19:42:21 +0000 (21:42 +0200)]
lib-index: Fix updating minor_version for old index files
If the index was originally created between Dovecot v1.1 and v2.1, the
minor_version wasn't updated. This caused log2_rotate_time and
last_temp_file_scan fields to become reset to 0 constantly, which
prevented optimizations using those fields.
Timo Sirainen [Sat, 4 Apr 2020 20:55:21 +0000 (23:55 +0300)]
global: Use AUTH_CLIENT_PROTOCOL_MAJOR/MINOR_VERSION also for auth-master socket
Both auth-client and auth-master are using the same auth protocol. There's
no need to have separate version numbers for auth-master socket, it's just
confusing things. The auth server's auth-client version checking code was
already wrongly using AUTH_MASTER_PROTOCOL_MAJOR_VERSION.
Stephan Bosch [Tue, 26 Apr 2022 00:14:08 +0000 (02:14 +0200)]
lib: unichar - Don't return 0 from uni_utf8_get_char_n() when NUL byte is encountered.
This caused problems for code that uses this function to read from a
size-limited buffer that can contain NUL bytes; i.e. lib-smtp. In that case,
hitting a NUL byte yields the same result as hitting the end of the buffered
data, which is unacceptable. No other code relies on the function returning 0,
so this can be changed safely to returning -1 instead.
Stephan Bosch [Thu, 16 Jun 2022 23:18:48 +0000 (01:18 +0200)]
lib-http: http-client-request - Fix handling of request aborted before submission.
Modifying an aborted request was not always allowed, which could yield assertion
errors when the request was aborted before submission. This would for example
happen when a payload was assigned to a new request created from an invalid URL.
Timo Sirainen [Tue, 14 Jun 2022 09:25:45 +0000 (12:25 +0300)]
dict: Add dict-expire service
If enabled with service dict-expire { process_min_avail=1 }, this service
will go through all configured dicts and delete all expired fields every
30 seconds.
Timo Sirainen [Thu, 19 May 2022 14:42:23 +0000 (16:42 +0200)]
dict-sql: Add support for dict_op_settings.expire_secs
Add a new map { expire_field } to specify the expiration timestamp field in
sql table. This field is automatically updated when
dict_op_settings.expire_secs is used. Also when lookup/iteration sees an
expired row, it's skipped over.
Timo Sirainen [Tue, 17 May 2022 10:31:40 +0000 (12:31 +0200)]
lib-master: Use ssl_require_crl setting only for server-side SSL settings
We don't currently properly support checking CRLs when acting as SSL client.
The CRL would have to be stored as part of the CAs, which isn't commonly
done. This bug has been in the code ever since it was added in 30c5c1fc3608ae575f11960281d3e338b6bf7bc8, but it became more noticeable
with recent changes that started using lib-master for getting all SSL
client settings, e.g. 1e5324b5805bf7299cd8196f7b659fe935f027bd
Marco Bettini [Wed, 8 Jun 2022 10:02:52 +0000 (10:02 +0000)]
indexer: indexer_queue_deinit() - Assert queue->users last
In case of panic, this allows to discriminate if the mismatch is in the count
of requests between queue and queue->requests count or between queue->requests
and queue->users
Marco Bettini [Wed, 8 Jun 2022 09:56:37 +0000 (09:56 +0000)]
indexer: indexer_queue_append_request() - Fix repeated insertions in queue->users indexer_queue(s)
The repeated insertion happens when invoking for an existing entry and
append=FALSE. At that point, the section dealing with queue->users is
erroneously executed. This will cause later a panic in indexer_queue_deinit()
due to the extra entries remaining in the table