]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
4 years agolib-storage: Add "mail_expunged" event
Siavash Tavakoli [Mon, 29 Mar 2021 23:37:59 +0000 (00:37 +0100)] 
lib-storage: Add "mail_expunged" event

Emitted when a message is actually expunged. Has UID as a field.

4 years agolib-storage, plugins/virtual: Use mail_sync_notify()
Siavash Tavakoli [Mon, 29 Mar 2021 12:41:55 +0000 (13:41 +0100)] 
lib-storage, plugins/virtual: Use mail_sync_notify()

Instead of calling sync_notify vfunc directly.

4 years agolib-storage: Add mailbox_sync_notify()
Siavash Tavakoli [Mon, 29 Mar 2021 12:41:32 +0000 (13:41 +0100)] 
lib-storage: Add mailbox_sync_notify()

Instead of calling sync_notify vfunc directly everywhere.

4 years agolib-storage: Emit "mail_expunge_requested" event
Siavash Tavakoli [Mon, 29 Mar 2021 12:01:40 +0000 (13:01 +0100)] 
lib-storage: Emit "mail_expunge_requested" event

Adds a new event, "mail_expunge_requested" which is emitted when a
message is marked to being expunged.

4 years agolib-storage: Emit "mail_opened" event when mails opened
Aki Tuomi [Wed, 10 Feb 2021 11:57:08 +0000 (13:57 +0200)] 
lib-storage: Emit "mail_opened" event when mails opened

Adds a new event, "mail_opened" with "reason" as field. Also drop duplicate
event in index_mail_init_stream().

4 years agolib-storage: Include "age_days" field in mail.event
Siavash Tavakoli [Mon, 5 Apr 2021 23:38:06 +0000 (00:38 +0100)] 
lib-storage: Include "age_days" field in mail.event

Goes back one week, if mail age information is known, an integer field is added
with value of mail age in number of days.

4 years agoplugins/virtual: Use index_mail_init() to initialize the mail
Siavash Tavakoli [Wed, 31 Mar 2021 15:08:06 +0000 (16:08 +0100)] 
plugins/virtual: Use index_mail_init() to initialize the mail

Cleans up duplicated code. Also, index_mail_init initializes mail.event
as well. Something that was missing previously.

4 years agolib-storage: Refactor index_mail_init() to make it more reusable
Siavash Tavakoli [Wed, 31 Mar 2021 15:01:02 +0000 (16:01 +0100)] 
lib-storage: Refactor index_mail_init() to make it more reusable

Adds arguments for two memory pools, to be set for mail.pool and
mail.data_pool. If data_pool is NULL, a pool is allocated but mail_pool
is required.

4 years agolib-storage: Recreate mail.event when active mail is changed
Timo Sirainen [Thu, 11 Mar 2021 12:14:53 +0000 (14:14 +0200)] 
lib-storage: Recreate mail.event when active mail is changed

This makes sure that the two mails' events are treated completely
independently without any accidental spilling. It also prevents wasting
memory if each mail changes the event and grows the memory pool.

4 years agolib-smtp: fuzz-smtp-server - Implement all callbacks required for full transaction.
Stephan Bosch [Mon, 12 Apr 2021 19:18:05 +0000 (21:18 +0200)] 
lib-smtp: fuzz-smtp-server - Implement all callbacks required for full transaction.

Before required RCPT and DATA callbacks were omitted, causing assertion failures
when the fuzzer reached the RCPT stage.

4 years agolib-test: fuzzer - Fix FD-based fuzzing to only shutdown input FD upon end of data.
Stephan Bosch [Mon, 12 Apr 2021 19:14:07 +0000 (21:14 +0200)] 
lib-test: fuzzer - Fix FD-based fuzzing to only shutdown input FD upon end of data.

Before, it closed the whole socket once the data input ended. This for
example caused the SMTP server fuzzer to end before all replies were sent. This
shortened the test and could have hidden bugs that occur later in the SMTP
transaction.

4 years agolib-smtp: smtp-reply - Add debug message for reply send error.
Stephan Bosch [Mon, 12 Apr 2021 19:12:27 +0000 (21:12 +0200)] 
lib-smtp: smtp-reply - Add debug message for reply send error.

This makes it a little clearer at what point the connection loss or error was
noticed and for which command/reply.

4 years agolib-lua: Fix compiler warning with dlua_pcall_yieldable()
Timo Sirainen [Wed, 14 Apr 2021 08:57:39 +0000 (11:57 +0300)] 
lib-lua: Fix compiler warning with dlua_pcall_yieldable()

4 years agolib-storage: Make sure listescape can work correctly with shared namespaces
Markus Valentin [Fri, 9 Apr 2021 09:35:05 +0000 (11:35 +0200)] 
lib-storage: Make sure listescape can work correctly with shared namespaces

This makes sure that if storage_name_escape_char is set, shared mailboxes
do not return the invalid/unescaped mailbox storage_name internally which
could result in failures like "Invalid mailbox name: Name must not have '/'
character" even when using the listescape plugin.

Broken by 5fd5ad3a2be6708e81f8dcfcbb06a3957dddd276

4 years agolib: Fix buffer_t aliasing problems with LTO
Timo Sirainen [Thu, 1 Apr 2021 18:42:02 +0000 (21:42 +0300)] 
lib: Fix buffer_t aliasing problems with LTO

This changes the buffer_t slightly, which requires adding extra braces
when buffer_t contents are directly defined.

This changes Dovecot to require C11 compatible compiler, because it uses
anonymous union and struct. GNU99 extensions are also enough.

4 years agolib: buffer - Change real_buffer.r_buffer type to const void *
Timo Sirainen [Thu, 1 Apr 2021 18:37:27 +0000 (21:37 +0300)] 
lib: buffer - Change real_buffer.r_buffer type to const void *

4 years agoimap: Fix accessing uninitialized variable warning with LTO
Timo Sirainen [Thu, 1 Apr 2021 09:47:15 +0000 (12:47 +0300)] 
imap: Fix accessing uninitialized variable warning with LTO

There doesn't seem to be any other way to quiet this warning, although
it's wrong.

4 years agodoveadm dict: Handle missing parameters without crashing
Timo Sirainen [Thu, 1 Apr 2021 09:45:39 +0000 (12:45 +0300)] 
doveadm dict: Handle missing parameters without crashing

4 years agoglobal: Fix accessing uninitialized variables on unit test failures
Timo Sirainen [Thu, 1 Apr 2021 09:20:46 +0000 (12:20 +0300)] 
global: Fix accessing uninitialized variables on unit test failures

4 years agolib-imap: imap_envelope_parse() - Refactor to avoid LTO warnings
Timo Sirainen [Thu, 1 Apr 2021 09:33:33 +0000 (12:33 +0300)] 
lib-imap: imap_envelope_parse() - Refactor to avoid LTO warnings

The original code was correct, but gcc with LTO still gave warnings about
potentially uninitialized envlp_r and error_r.

4 years agolib: test-array - Fix LTO compiler warnings
Timo Sirainen [Thu, 1 Apr 2021 09:22:37 +0000 (12:22 +0300)] 
lib: test-array - Fix LTO compiler warnings

-flto correctly realizes that the source buffer size is 1, while memcpy() is
trying to copy UINT_MAX. Try to hide this by allocating the source buffer
dynamically. The intention is to assert-crash anyway before the memcpy() is
reached.

4 years agolib-compression: ostream-zstd - Do not return 0 as default
Aki Tuomi [Tue, 13 Apr 2021 09:45:45 +0000 (12:45 +0300)] 
lib-compression: ostream-zstd - Do not return 0 as default

This is accepted by the library but does complicate things with dovecot.

4 years agolib-compression: ostream-zstd - Fix assert on value range
Aki Tuomi [Tue, 13 Apr 2021 09:45:23 +0000 (12:45 +0300)] 
lib-compression: ostream-zstd - Fix assert on value range

4 years agodoc/openssl.cnf: Increase default_bits to 2048
Arjen de Korte [Sat, 10 Apr 2021 11:52:15 +0000 (13:52 +0200)] 
doc/openssl.cnf: Increase default_bits to 2048

NIST guidelines mandate that all SSL certificates must be of at least 2048 key length

4 years agoglobal: Update default TLS protocol to TLSv1.2
Aki Tuomi [Fri, 26 Mar 2021 12:10:37 +0000 (14:10 +0200)] 
global: Update default TLS protocol to TLSv1.2

4 years agolib-ssl-iostream: Accept TLS version case-insensitive
Aki Tuomi [Tue, 6 Apr 2021 12:42:22 +0000 (15:42 +0300)] 
lib-ssl-iostream: Accept TLS version case-insensitive

4 years agolib-ssl-iostream: Add additional supported protocols
Aki Tuomi [Fri, 26 Mar 2021 12:11:48 +0000 (14:11 +0200)] 
lib-ssl-iostream: Add additional supported protocols

ANY - Any protocol version accepted
TLSv1.3 - Self-explanatory
LATEST - The newest protocol only

4 years agolib-master: Add ssl_cipher_suites
Aki Tuomi [Fri, 26 Mar 2021 10:08:40 +0000 (12:08 +0200)] 
lib-master: Add ssl_cipher_suites

4 years agoimap-zlib: Support per-algorithm compression level
Aki Tuomi [Thu, 1 Apr 2021 09:41:40 +0000 (12:41 +0300)] 
imap-zlib: Support per-algorithm compression level

4 years agozlib: Check that compression level is within supported range
Aki Tuomi [Tue, 30 Mar 2021 16:05:42 +0000 (19:05 +0300)] 
zlib: Check that compression level is within supported range

4 years agoimap-zlib: Check that compression level is within supported range
Aki Tuomi [Tue, 30 Mar 2021 16:04:31 +0000 (19:04 +0300)] 
imap-zlib: Check that compression level is within supported range

4 years agofs-compress: Check that compression range is within supported range
Aki Tuomi [Tue, 30 Mar 2021 16:03:30 +0000 (19:03 +0300)] 
fs-compress: Check that compression range is within supported range

4 years agolib-compression: Implement min/default/max getters
Aki Tuomi [Thu, 1 Apr 2021 06:26:10 +0000 (09:26 +0300)] 
lib-compression: Implement min/default/max getters

4 years agolib-compression: Add compression level range to handlers
Aki Tuomi [Tue, 30 Mar 2021 16:01:20 +0000 (19:01 +0300)] 
lib-compression: Add compression level range to handlers

4 years agolib-compression: Use designated initializers for compression handlers
Aki Tuomi [Tue, 30 Mar 2021 15:54:42 +0000 (18:54 +0300)] 
lib-compression: Use designated initializers for compression handlers

4 years agom4: want_zstd.m4 - Detect is ZSTD_minCLevel is present
Aki Tuomi [Thu, 1 Apr 2021 06:51:09 +0000 (09:51 +0300)] 
m4: want_zstd.m4 - Detect is ZSTD_minCLevel is present

4 years agolib-compression: Be explicit about xz magic number including a \0
Josef 'Jeff' Sipek [Fri, 5 Feb 2021 19:48:52 +0000 (14:48 -0500)] 
lib-compression: Be explicit about xz magic number including a \0

4 years agolib-smtp: test-smtp-server-errors - Add actual HELO tests to "bad HELO" test.
Stephan Bosch [Thu, 8 Apr 2021 23:49:21 +0000 (01:49 +0200)] 
lib-smtp: test-smtp-server-errors - Add actual HELO tests to "bad HELO" test.

Before, it only tested the EHLO command.

4 years agolib-smtp: test-smtp-server-errors - Add correct command test to "bad HELO" test.
Stephan Bosch [Thu, 8 Apr 2021 23:43:38 +0000 (01:43 +0200)] 
lib-smtp: test-smtp-server-errors - Add correct command test to "bad HELO" test.

4 years agolib-smtp: test-smtp-server-errors - Properly check server reply in "bad HELO" test.
Stephan Bosch [Thu, 8 Apr 2021 23:25:59 +0000 (01:25 +0200)] 
lib-smtp: test-smtp-server-errors - Properly check server reply in "bad HELO" test.

4 years agolib-smtp: test-smtp-server-errors - Rename "bad EHLO" test to "bad HELO".
Stephan Bosch [Thu, 8 Apr 2021 23:29:06 +0000 (01:29 +0200)] 
lib-smtp: test-smtp-server-errors - Rename "bad EHLO" test to "bad HELO".

4 years agolib-smtp: smtp-server-cmd-helo - Fix panic occurring for default HELO reply.
Stephan Bosch [Fri, 11 Sep 2020 19:08:03 +0000 (21:08 +0200)] 
lib-smtp: smtp-server-cmd-helo - Fix panic occurring for default HELO reply.

This only fails for the HELO command; the EHLO command is unaffected. The
default reply routine is not actually used at the moment, but it is used by the
fuzzer.

Panic was:

Panic: file smtp-server-cmd-helo.c: line 160 (smtp_server_cmd_ehlo_reply_create): assertion failed: (cmd->cmd->reg->func == smtp_server_cmd_ehlo)

4 years agolib-smtp: Reformat smtp-server-cmd-helo.c.
Stephan Bosch [Fri, 11 Sep 2020 20:40:31 +0000 (22:40 +0200)] 
lib-smtp: Reformat smtp-server-cmd-helo.c.

4 years agolib-smtp: smtp-server-cmd-data - Fix crash occurring when BDAT is the last in a too...
Stephan Bosch [Tue, 23 Mar 2021 09:27:23 +0000 (10:27 +0100)] 
lib-smtp: smtp-server-cmd-data - Fix crash occurring when BDAT is the last in a too long sequence of bad commands.

When smtp_server_reply() detects that too many replies were sent regarding
syntax errors, it will terminate the connection. Most commands will just stop
processing and exit when a reply is submitted, so no crash occurs for those.
However, BDAT will try to skip the data block, so that it will not be
interpreted as a large set of input commands, which subsequentely crashes
because the command parser is already gone after terminating the connection.

4 years agopush-notification: Fix logging initialization error
Timo Sirainen [Thu, 25 Mar 2021 08:59:19 +0000 (10:59 +0200)] 
push-notification: Fix logging initialization error

4 years agoimapc: imapc_list_get_fs() - Set index_pvt_dir for mailbox_list_settings
Markus Valentin [Wed, 24 Mar 2021 08:43:17 +0000 (09:43 +0100)] 
imapc: imapc_list_get_fs() - Set index_pvt_dir for mailbox_list_settings

To allow using private indexes with imapc storage the index_pvt_dir must
be set when listing the mailbox. Previously this did not happen because
the index_pvt_dir was simply NULL, now the value is copied from the
imapc_mailbox_list.

4 years agolib-index: Avoid accessing already freed "reason" when purging
Timo Sirainen [Tue, 30 Mar 2021 13:50:13 +0000 (16:50 +0300)] 
lib-index: Avoid accessing already freed "reason" when purging

Broken by 4b60d609c05d334d29a72c6dbbe301a66f518089

4 years agolib-ssl-iostream: Avoid calling X509_check_ip_asc if malformed input was used
Siavash Tavakoli [Tue, 30 Mar 2021 10:00:57 +0000 (11:00 +0100)] 
lib-ssl-iostream: Avoid calling X509_check_ip_asc if malformed input was used

Try to match certificate using "X509_check_ip_asc" only when
"X509_check_host" didn't report an internal error or malformed input.

4 years agolib-lua: Document the DLUA_WRAP_C_DATA macro
Josef 'Jeff' Sipek [Wed, 24 Mar 2021 15:01:34 +0000 (11:01 -0400)] 
lib-lua: Document the DLUA_WRAP_C_DATA macro

4 years agooauth2-jwt: Use int64_t instead time_t for portability
Aki Tuomi [Thu, 13 Aug 2020 17:01:41 +0000 (20:01 +0300)] 
oauth2-jwt: Use int64_t instead time_t for portability

4 years agolib-ssl-iostream: Use OpenSSL's X509_check_host and X509_check_ip_asc if available
Siavash Tavakoli [Sun, 21 Mar 2021 22:15:48 +0000 (22:15 +0000)] 
lib-ssl-iostream: Use OpenSSL's X509_check_host and X509_check_ip_asc if available

Make use of "X509_check_host()" and "X509_check_ip_asc()" if OpenSSL version
used has support for these functions. Revert back to previous custom
implementation in case either is not available.

Hosts are checked with partial wildcards (e.g. foo*.example.com) disabled.
If host name check fails, check against IP addresses in the certificate.

4 years agom4: Add HAVE_X509_CHECK_HOST, HAVE_X509_CHECK_IP, and HAVE_X509_CHECK_IP_ASC
Siavash Tavakoli [Sun, 21 Mar 2021 22:14:55 +0000 (22:14 +0000)] 
m4: Add HAVE_X509_CHECK_HOST, HAVE_X509_CHECK_IP, and HAVE_X509_CHECK_IP_ASC

Defined when compiling against an OpenSSL version supporting "X509_check_host",
"X509_check_ip()", and "X509_check_ip_asc()" respectively.

4 years agolib-ssl-iostream: Ignore case when checking certificate name
Siavash Tavakoli [Thu, 18 Mar 2021 12:20:35 +0000 (12:20 +0000)] 
lib-ssl-iostream: Ignore case when checking certificate name

Host name case must be ignored when cheking with certificate.

4 years agolib: ioloop - Remove unused timer_is_larger() macro
Timo Sirainen [Mon, 22 Mar 2021 11:00:31 +0000 (13:00 +0200)] 
lib: ioloop - Remove unused timer_is_larger() macro

4 years agolib: test-ioloop - Make sure recreating 0-timeout in callback works
Timo Sirainen [Mon, 1 Mar 2021 10:56:21 +0000 (12:56 +0200)] 
lib: test-ioloop - Make sure recreating 0-timeout in callback works

4 years agolib: ioloop - Fix 0 ms timeouts to trigger without waiting 2ms between calls
Timo Sirainen [Mon, 1 Mar 2021 11:03:16 +0000 (13:03 +0200)] 
lib: ioloop - Fix 0 ms timeouts to trigger without waiting 2ms between calls

4 years agolib-test: test_assert_ucmp() - Fix typo to make it compile
Timo Sirainen [Mon, 1 Mar 2021 11:02:40 +0000 (13:02 +0200)] 
lib-test: test_assert_ucmp() - Fix typo to make it compile

4 years agolib-compression: Get error with i_stream_get_error() so it's recursive
Markus Valentin [Mon, 22 Mar 2021 12:04:15 +0000 (13:04 +0100)] 
lib-compression: Get error with i_stream_get_error() so it's recursive

In some cases the iostream.error was NULL so the errno default message
was used. This fixes an regression introduced by 8b6142f9ba9.

4 years agolib-dict: dict-lua - Do not free pool after iteration finishes
Aki Tuomi [Tue, 23 Mar 2021 07:02:06 +0000 (09:02 +0200)] 
lib-dict: dict-lua - Do not free pool after iteration finishes

Otherwise we get double-free from gc.

Broken in 1e67b93cc9f469bb144fc890a6cb9b9b9cd20811

4 years agoman: doveconf - Fix -P/ typo to just -P
Timo Sirainen [Tue, 23 Mar 2021 10:32:13 +0000 (12:32 +0200)] 
man: doveconf - Fix -P/ typo to just -P

4 years agoman: doveconf - Document -s parameter
Timo Sirainen [Tue, 23 Mar 2021 10:31:46 +0000 (12:31 +0200)] 
man: doveconf - Document -s parameter

4 years agodoveadm zlibconnect: Support multiple compression algorithms
Timo Sirainen [Wed, 27 Jan 2021 18:26:26 +0000 (20:26 +0200)] 
doveadm zlibconnect: Support multiple compression algorithms

Unfortunately they don't work very well, because only the deflate ostream
supports flushing ostream before closing it.

4 years agodoveadm zlibconnect: Support automatically starting compression on COMPRESS command
Timo Sirainen [Wed, 27 Jan 2021 17:50:38 +0000 (19:50 +0200)] 
doveadm zlibconnect: Support automatically starting compression on COMPRESS command

The previous method of using ctrl-d wasn't really suitable for scripting.

4 years agolib-compression: Fix potential hangs with non-blocking istreams
Timo Sirainen [Wed, 27 Jan 2021 18:29:11 +0000 (20:29 +0200)] 
lib-compression: Fix potential hangs with non-blocking istreams

4 years agolib: i_stream_read() - Fix assert with DEBUG enabled
Timo Sirainen [Wed, 27 Jan 2021 18:34:29 +0000 (20:34 +0200)] 
lib: i_stream_read() - Fix assert with DEBUG enabled

It doesn't matter if the data buffer changes for <=0 return value if the
buffer was previously empty.

4 years agolib-storage: mailbox_list_init_fs() - Add event_parent
Timo Sirainen [Thu, 4 Feb 2021 00:15:22 +0000 (02:15 +0200)] 
lib-storage: mailbox_list_init_fs() - Add event_parent

4 years agolib-storage: Rename mail_storage_service_input.parent_event to event_parent
Timo Sirainen [Thu, 4 Feb 2021 00:00:28 +0000 (02:00 +0200)] 
lib-storage: Rename mail_storage_service_input.parent_event to event_parent

This makes it more consistent with other settings.

4 years agolib-fs: Rename fs_settings.event to event_parent
Timo Sirainen [Wed, 3 Feb 2021 23:58:25 +0000 (01:58 +0200)] 
lib-fs: Rename fs_settings.event to event_parent

This makes it more consistent with other settings.

4 years agolib-dict: Set connections' event_parent correctly
Timo Sirainen [Wed, 3 Feb 2021 23:36:52 +0000 (01:36 +0200)] 
lib-dict: Set connections' event_parent correctly

dict->dict.event is NULL at this point.

4 years agoauth: db-sql - Fill sql_settings.event_parent
Timo Sirainen [Wed, 3 Feb 2021 23:27:34 +0000 (01:27 +0200)] 
auth: db-sql - Fill sql_settings.event_parent

4 years agoglobal: Set http_client_settings.event_parent when possible
Timo Sirainen [Wed, 3 Feb 2021 23:16:12 +0000 (01:16 +0200)] 
global: Set http_client_settings.event_parent when possible

4 years agofts-solr: solr-connection - Add parent event
Timo Sirainen [Wed, 3 Feb 2021 23:13:40 +0000 (01:13 +0200)] 
fts-solr: solr-connection - Add parent event

4 years agoglobal: Set dns_lookup_settings.event_parent
Timo Sirainen [Wed, 3 Feb 2021 23:10:57 +0000 (01:10 +0200)] 
global: Set dns_lookup_settings.event_parent

4 years agoimapc: Add parent event
Timo Sirainen [Wed, 3 Feb 2021 23:09:57 +0000 (01:09 +0200)] 
imapc: Add parent event

4 years agopop3c: Add parent event
Timo Sirainen [Wed, 3 Feb 2021 23:07:38 +0000 (01:07 +0200)] 
pop3c: Add parent event

4 years agoglobal: Set dict_settings.event_parent when possible
Timo Sirainen [Wed, 3 Feb 2021 23:01:42 +0000 (01:01 +0200)] 
global: Set dict_settings.event_parent when possible

4 years agolib-lua: dlua-threads - pop thread table after manipulation
Aki Tuomi [Mon, 22 Mar 2021 14:24:20 +0000 (16:24 +0200)] 
lib-lua: dlua-threads - pop thread table after manipulation

Forgot on a84bfdaf6df8fd6a4cbbf0845c18b09e6ceada36

4 years agoauth: Fix Makefile variables for Lua
Aki Tuomi [Mon, 22 Feb 2021 13:29:45 +0000 (15:29 +0200)] 
auth: Fix Makefile variables for Lua

Otherwise automake complains about touching
the variables in many places.

4 years agodovecot-config: Include used Lua details
Aki Tuomi [Fri, 5 Feb 2021 13:40:49 +0000 (15:40 +0200)] 
dovecot-config: Include used Lua details

4 years agopush-notification-driver-lua: Use dlua_pcall
Aki Tuomi [Fri, 5 Feb 2021 13:21:46 +0000 (15:21 +0200)] 
push-notification-driver-lua: Use dlua_pcall

4 years agomail-lua: Pop return values after use
Aki Tuomi [Fri, 5 Feb 2021 13:17:44 +0000 (15:17 +0200)] 
mail-lua: Pop return values after use

4 years agomail-lua: Use dlua_pcall
Aki Tuomi [Fri, 5 Feb 2021 13:17:37 +0000 (15:17 +0200)] 
mail-lua: Use dlua_pcall

4 years agoauth: db-lua - Use dlua_pcall
Aki Tuomi [Fri, 5 Feb 2021 13:13:26 +0000 (15:13 +0200)] 
auth: db-lua - Use dlua_pcall

4 years agolib-lua: Fix script loading
Aki Tuomi [Tue, 16 Feb 2021 07:21:58 +0000 (09:21 +0200)] 
lib-lua: Fix script loading

Handle error cases correctly.

4 years agolib-lua: Use dlua_pcall
Aki Tuomi [Fri, 5 Feb 2021 11:34:27 +0000 (13:34 +0200)] 
lib-lua: Use dlua_pcall

4 years agolib-lua: Add dlua_pcall
Aki Tuomi [Fri, 5 Feb 2021 11:33:47 +0000 (13:33 +0200)] 
lib-lua: Add dlua_pcall

4 years agolib-lua: dlua-dovecot - Ensure script is not NULL
Aki Tuomi [Fri, 5 Feb 2021 11:41:24 +0000 (13:41 +0200)] 
lib-lua: dlua-dovecot - Ensure script is not NULL

4 years agolib-lua: Define LUA_OK if missing
Aki Tuomi [Tue, 16 Feb 2021 10:47:17 +0000 (12:47 +0200)] 
lib-lua: Define LUA_OK if missing

It's defined since lua 5.2, and we support lua 5.1.

4 years agolib-lua: Reformat macros in dlua-script-private.h
Aki Tuomi [Fri, 19 Feb 2021 13:20:07 +0000 (15:20 +0200)] 
lib-lua: Reformat macros in dlua-script-private.h

4 years agolib-lua: Add callback typecheck for dlua_pcall_yieldable
Aki Tuomi [Mon, 22 Mar 2021 08:36:24 +0000 (10:36 +0200)] 
lib-lua: Add callback typecheck for dlua_pcall_yieldable

4 years agolib-dict: Expose dict and dict transactions to lua scripts
Josef 'Jeff' Sipek [Thu, 25 Feb 2021 15:22:28 +0000 (10:22 -0500)] 
lib-dict: Expose dict and dict transactions to lua scripts

4 years agolib-lua: Implement lua_seti() fallback for pre-5.3 support
Josef 'Jeff' Sipek [Thu, 25 Feb 2021 20:35:26 +0000 (15:35 -0500)] 
lib-lua: Implement lua_seti() fallback for pre-5.3 support

4 years agolib-lua: Add DLUA_WRAP_C_DATA macro to more easily expose C structures to lua
Josef 'Jeff' Sipek [Thu, 25 Feb 2021 15:22:24 +0000 (10:22 -0500)] 
lib-lua: Add DLUA_WRAP_C_DATA macro to more easily expose C structures to lua

4 years agolib-lua: Add dlua_pcall_yieldable
Josef 'Jeff' Sipek [Wed, 24 Feb 2021 18:57:10 +0000 (13:57 -0500)] 
lib-lua: Add dlua_pcall_yieldable

4 years agom4: want_lua - Check for lua_{resume,yieldk}
Josef 'Jeff' Sipek [Thu, 25 Feb 2021 20:49:18 +0000 (15:49 -0500)] 
m4: want_lua - Check for lua_{resume,yieldk}

4 years agolib-lua: Add thread local storage API
Josef 'Jeff' Sipek [Wed, 24 Feb 2021 19:53:59 +0000 (14:53 -0500)] 
lib-lua: Add thread local storage API

4 years agolib-lua: Add new thread/close thread dlua wrappers
Aki Tuomi [Fri, 5 Feb 2021 14:47:53 +0000 (16:47 +0200)] 
lib-lua: Add new thread/close thread dlua wrappers

Code rewritten to use lua registry, warn about unclosed threads, and moved
to a separate file by Josef 'Jeff' Sipek <jeff.sipek@open-xchange.com>

4 years agoglobal: Avoid casting away const
Timo Sirainen [Fri, 12 Mar 2021 00:58:37 +0000 (02:58 +0200)] 
global: Avoid casting away const

4 years agolib: iostreams - Use container_of()
Timo Sirainen [Fri, 12 Mar 2021 12:53:38 +0000 (14:53 +0200)] 
lib: iostreams - Use container_of()

4 years agolib: stats_dist_get_median(), stats_dist_get_percentile() - Remove const parameter
Timo Sirainen [Fri, 12 Mar 2021 00:56:20 +0000 (02:56 +0200)] 
lib: stats_dist_get_median(), stats_dist_get_percentile() - Remove const parameter

They weren't really const, because they required modifying the stats to sort
them.