]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Thu, 29 Nov 2018 11:12:28 +0000 (13:12 +0200)]
lib: event - Add event_set_log_prefix_callback
Fetch prefix using a callback.
Timo Sirainen [Thu, 29 Nov 2018 14:28:23 +0000 (16:28 +0200)]
lib: Fix failure_context.log_prefix_type_pos handling
The log type string was inserted into wrong location if there were multiple
log prefixes.
Timo Sirainen [Wed, 28 Nov 2018 12:13:54 +0000 (14:13 +0200)]
lib-storage: Remove MAILBOX_FEATURE_QRESYNC
This is an imap-specific feature, which doesn't need to be visible in
the lib-storage layer.
Timo Sirainen [Wed, 28 Nov 2018 12:12:57 +0000 (14:12 +0200)]
imap: Add support for ENABLE extensions
Based on patch by Aki Tuomi
Timo Sirainen [Wed, 28 Nov 2018 12:02:44 +0000 (14:02 +0200)]
imap: Change state import/export to use full feature string names
Single letter IDs wouldn't allow extensions.
Timo Sirainen [Thu, 29 Nov 2018 08:01:36 +0000 (10:01 +0200)]
imap: Add client_enabled_features()
This simplifies the following commits.
Timo Sirainen [Wed, 28 Nov 2018 11:19:02 +0000 (13:19 +0200)]
imap: Cleanup - Change client_enable() to return void
Nothing cares about its return value. With the current features it's
not even possible to fail. Possibly mailbox_enable() should be also
changed to return void in the future.
Timo Sirainen [Wed, 28 Nov 2018 11:17:39 +0000 (13:17 +0200)]
imap: Add and use imap_feature_lookup()
This simplifies the following commits.
Timo Sirainen [Wed, 28 Nov 2018 10:50:51 +0000 (12:50 +0200)]
imap: Add and use client_enabled_mailbox_features()
This simplifies the following commits.
Timo Sirainen [Wed, 28 Nov 2018 10:48:47 +0000 (12:48 +0200)]
imap: Cleanup - don't avoid calling mailbox_enable(box, 0)
This simplifies the following changes. mailbox_enable() is an efficient
function and it doesn't mind being called with features=0 parameter.
Timo Sirainen [Wed, 28 Nov 2018 10:44:48 +0000 (12:44 +0200)]
imap: Add and use client_has_enabled() wrapper
This simplifies the following commits.
Timo Sirainen [Wed, 28 Nov 2018 10:42:55 +0000 (12:42 +0200)]
imap: client_enable() API change - enable features one at a time
This simplifies the following commits.
Timo Sirainen [Wed, 28 Nov 2018 10:26:33 +0000 (12:26 +0200)]
imap: Access enabled features via new imap_client_feature_* variables
This simplifies the following commits.
Aki Tuomi [Thu, 29 Nov 2018 08:19:38 +0000 (10:19 +0200)]
m4: dovecot.m4 - Bump serial
Aki Tuomi [Mon, 26 Nov 2018 10:45:52 +0000 (12:45 +0200)]
m4: dovecot.m4 - Improve CC_CLANG
Aki Tuomi [Mon, 26 Nov 2018 10:38:25 +0000 (12:38 +0200)]
m4: dovecot.m4 - Call CC_CLANG before DC_DOVECOT_CFLAGS
So we know if we are using clang compiler
Aki Tuomi [Sat, 24 Nov 2018 18:35:53 +0000 (20:35 +0200)]
dovecot.m4: Preserve original CFLAGS/LDFLAGS
Correct flags are detected during configure, so avoid
overwriting them here by accident.
Aki Tuomi [Sat, 24 Nov 2018 18:09:26 +0000 (20:09 +0200)]
dovecot.m4: Use _DC_EOF instead of EOF
Avoids messing with other scripts
Aki Tuomi [Sat, 24 Nov 2018 18:08:51 +0000 (20:08 +0200)]
dovecot.m4: Use AS_IF macro instead of if
It's safer with m4
Aki Tuomi [Sat, 24 Nov 2018 17:59:04 +0000 (19:59 +0200)]
dovecot.m4: Call DC_DOVECOT_CFLAGS and HARDENING earlier
Before SUBST
Aki Tuomi [Sat, 24 Nov 2018 17:58:18 +0000 (19:58 +0200)]
dovecot.m4: Rename DOVECOT_CFLAGS function to DC_DOVECOT_CFLAGS
Avoid conflict with variable of same name
Aki Tuomi [Sat, 24 Nov 2018 17:57:00 +0000 (19:57 +0200)]
dovecot.m4: Use dnl instead of hash for comments
Aki Tuomi [Sat, 24 Nov 2018 08:20:54 +0000 (10:20 +0200)]
configure: Use DC_DOVECOT_HARDENING
Aki Tuomi [Sat, 24 Nov 2018 08:15:04 +0000 (10:15 +0200)]
dovecot.m4: Add DC_DOVECOT_HARDENING to check hardening options
Aki Tuomi [Sat, 24 Nov 2018 08:11:55 +0000 (10:11 +0200)]
m4: Move various compiler and linker checks to dovecot.m4
We don't want to distribute CFLAGS or LDFLAGS that break
compiler, due to lack of support.
Aki Tuomi [Fri, 23 Nov 2018 13:34:51 +0000 (15:34 +0200)]
lib-master: test-event-stats - Use PRIu64 format
Forgotten in
e16ba6f
Aki Tuomi [Fri, 23 Nov 2018 13:33:20 +0000 (15:33 +0200)]
lib-master: test-event-stats - Include signal.h
Forgotten in
e16ba6f
Stephan Bosch [Thu, 18 Oct 2018 13:25:53 +0000 (15:25 +0200)]
lib-master: test-event-stats: Properly ensure cleanup of all files generated by tests.
Stephan Bosch [Thu, 18 Oct 2018 13:09:51 +0000 (15:09 +0200)]
lib-master: test-event-stats: Move launch_test_stats() to a more logical place.
Stephan Bosch [Thu, 18 Oct 2018 13:11:55 +0000 (15:11 +0200)]
lib-master: Create local .gitignore file for potential test output junk.
Timo Sirainen [Thu, 18 Oct 2018 09:35:22 +0000 (12:35 +0300)]
fts: Fix search query generation when one language ignores a token
The search query was changed to "NOT ALL", even though other languages
used the token.
Stephan Bosch [Sun, 26 Aug 2018 13:16:17 +0000 (15:16 +0200)]
lib-smtp: client: Fix potential segfault occurring after receiving RCPT reply.
Could occur when RCPT reply is received befor DATA command is sent in LMTP session.
Problem found by Coverity.
Stephan Bosch [Wed, 15 Aug 2018 20:34:19 +0000 (22:34 +0200)]
lib-smtp: test-smtp-client-errors: Add tests for transaction timeouts.
Stephan Bosch [Wed, 15 Aug 2018 22:50:12 +0000 (00:50 +0200)]
lib-smtp: client: Add debug message for the moment when all RCPT replies are received.
This helps in debugging transaction state transition problems.
Stephan Bosch [Wed, 15 Aug 2018 22:42:50 +0000 (00:42 +0200)]
lib-smtp: client: Fix transaction state transition for the DATA command.
It progressed to the DATA state too early. By the looks of things, this only
affected the correctness of error and debug messages. It does not affect the
transaction itself.
Stephan Bosch [Wed, 15 Aug 2018 22:28:51 +0000 (00:28 +0200)]
lib-smtp: client: Fix segmentation fault occurring at transaction timeout.
In the DATA command callback trans->cmd_data can be NULL when the command is
aborted from smtp_client_transaction_fail_reply().
Stephan Bosch [Wed, 15 Aug 2018 20:39:58 +0000 (22:39 +0200)]
lib-smtp: client: transaction: Prevent early transaction abort in smtp_client_transaction_fail_reply().
Can happen in one of the command callbacks of aborted commands.
Stephan Bosch [Thu, 16 Aug 2018 06:48:43 +0000 (08:48 +0200)]
lib-smtp: Remove trailing whitespace in smtp-cient-transaction.c.
Stephan Bosch [Thu, 16 Aug 2018 06:47:37 +0000 (08:47 +0200)]
lib-smtp: Remove trailing whitespace in test-smtp-client-errors.c.
Martti Rannanjärvi [Mon, 13 Aug 2018 08:25:04 +0000 (11:25 +0300)]
lib-smtp: Read input before exiting in sendmail-exit-1.sh
This avoids a Broken pipe error that fails the unit test this script
belongs to.
Aki Tuomi [Thu, 9 Aug 2018 06:21:09 +0000 (09:21 +0300)]
lib-smtp: Include test-bin in dist
Aki Tuomi [Thu, 9 Aug 2018 09:38:43 +0000 (12:38 +0300)]
lib-test: Warn if test_run or test_run_named result is not used
Ensures hopefully that unit tests do not succeed when they fail
due to wrong exit code.
Aki Tuomi [Thu, 9 Aug 2018 09:44:22 +0000 (12:44 +0300)]
global: Ensure unit tests return value
Timo Sirainen [Fri, 6 Jul 2018 08:22:46 +0000 (11:22 +0300)]
lib-auth: Fix reconnect timeout leak at deinit
Stephan Bosch [Fri, 6 Jul 2018 13:07:32 +0000 (15:07 +0200)]
lib-http: client: Notify host object about submission of request before submitting the request to the queue.
This makes sure the host idle timeout is stopped before the request is submitted
and the host object's refresh function is called. If the idle timeout is still
running at that point, the refresh function will return success without
performing a lookup, which can lead to a panic.
Panic was:
Panic: file ./http-client-private.h: line 672 (http_client_host_get_ip): assertion failed: (idx < host->shared->ips_count)
Stephan Bosch [Mon, 2 Jul 2018 21:59:50 +0000 (23:59 +0200)]
lib-http: client: Reset ips count to zero before DNS lookup.
Josef 'Jeff' Sipek [Thu, 5 Jul 2018 14:50:32 +0000 (10:50 -0400)]
lib: mempool - Remove unnecessary check
The previous commit guarantees that we always have one of _ILP32 and _LP64
defined so we don't have to check ourselves.
Josef 'Jeff' Sipek [Thu, 5 Jul 2018 14:48:49 +0000 (10:48 -0400)]
lib: Make sure exactly one of _ILP32 and _LP64 is defined at all times
These defines are very common, but not universal. For example, clang on
illumos and FreeBSD always defines one of them, while 32-bit Ubuntu 16.04
doesn't define either.
Josef 'Jeff' Sipek [Thu, 21 Jun 2018 13:45:03 +0000 (09:45 -0400)]
lib: mempool - Improve p_realloc() panic message
Most importantly, this differentiates it from the panic message that
p_malloc() prints.
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 16:24:34 +0000 (12:24 -0400)]
lib: mempool - Centralize p_free() NULL pointer check
This changes the behavior of p_free(pool, some_null_pointer) slightly.
datastack mempools:
Previously, the datastack frame id was checked regardless of whether or
not the pointer was NULL. Now, only non-NULL pointers perform this
check.
system mempools:
Previously, the process would SIGSEGV if a NULL pointer was freed in a
debug binary on a system with malloc_usable_size(). Now, no SIGSEGV
occurs.
allocfree, alloconly, and unsafe datastack:
No change in behavior.
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 15:47:26 +0000 (11:47 -0400)]
lib: mempool - Centralize p_realloc() NULL pointer check
Instead of each mempool implementation having to check the pointer passed in
for being NULL, we can check that the sizes are within the required bounds
in p_realloc().
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 15:42:28 +0000 (11:42 -0400)]
lib: mempool - Centralize p_{m,re}alloc() size checks
Instead of each mempool implementation having to check the allocation sizes
for sanity, we can check that the sizes are within the required bounds in
p_malloc() and p_realloc().
Since p_malloc() and p_realloc() are static inlines, some consumers will see
a little bit of growth in binary size, but others will be able to optimize
the check away at compile time.
Josef 'Jeff' Sipek [Fri, 22 Jun 2018 20:51:40 +0000 (16:51 -0400)]
lib: mempool - Define a global max allocation size supported by all pools
Instead of relying on each mempool implementation to define its own limits
and checks, this commit defines a generic one that's sufficient to make any
mempool present or future happy.
Josef 'Jeff' Sipek [Fri, 22 Jun 2018 21:28:24 +0000 (17:28 -0400)]
lib: mempool-allocfree: Remove unused #define
This define was never actually used.
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 15:18:32 +0000 (11:18 -0400)]
lib: mempool-datastack - Use container_of instead of casts
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 15:18:13 +0000 (11:18 -0400)]
lib: mempool-alloconly - Use container_of instead of casts
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 14:35:15 +0000 (10:35 -0400)]
lib: Rename a alloconly mempool helper function to make its scope obvious
pool_try_grow() makes it look like it is part of the mempool API, even
though it is an internal helper specific to the alloconly pool.
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 14:55:53 +0000 (10:55 -0400)]
lib: Document the unsafe datastack mempool
Josef 'Jeff' Sipek [Tue, 19 Jun 2018 20:08:40 +0000 (16:08 -0400)]
lib: Document the system mempool
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 11:50:38 +0000 (07:50 -0400)]
lib: Document datastack mempools
Josef 'Jeff' Sipek [Tue, 19 Jun 2018 19:36:43 +0000 (15:36 -0400)]
lib: Document allocfree mempools
Josef 'Jeff' Sipek [Tue, 19 Jun 2018 18:04:43 +0000 (14:04 -0400)]
lib: Document alloconly mempools
Josef 'Jeff' Sipek [Fri, 29 Jun 2018 20:17:40 +0000 (16:17 -0400)]
lib: mempool - Further reduce test code duplication
We have to use a macro because we need to pass a type as an argument.
Josef 'Jeff' Sipek [Thu, 28 Jun 2018 17:07:48 +0000 (13:07 -0400)]
lib: mempool - Reduce test code duplication
The 32 and 64 bit versions of the tests were identical.
Josef 'Jeff' Sipek [Thu, 28 Jun 2018 15:13:43 +0000 (11:13 -0400)]
lib: mempool - Generalize the test
Instead of hardcoding what appear to be arbitrary constants, use expressions
based on UINT{16,32,64}_MAX.
Stephan Bosch [Thu, 31 May 2018 21:59:50 +0000 (23:59 +0200)]
lib: str-sanitize: Use uni_utf8_data_truncate().
Stephan Bosch [Thu, 31 May 2018 22:02:53 +0000 (00:02 +0200)]
lib: Add str_truncate_utf8().
It works similar to str_truncate(), but it makes sure the truncated string
remains valid UTF-8.
Stephan Bosch [Thu, 31 May 2018 22:02:16 +0000 (00:02 +0200)]
lib: unichar: Add uni_utf8_data_truncate().
Returns the size of the data when truncated to be less than or equal to
a specified size, making sure UTF-8 character boundaries are respected.
Stephan Bosch [Wed, 20 Jun 2018 12:01:18 +0000 (14:01 +0200)]
lib-smtp: server: Make sure conn->state.data_failed is only set when no previous BDAT/BURL is pending.
Otherwise, the server would sometimes send 503 error for the first BDAT/BURL
command, while a subsequent command was actually failing earlier than the
initial one completed. Additionally, this caused a panic crash.
Panic was:
submission(stephan)<8353><C+7QBfysKluhIAAAmoV78g>: Panic: Input stream /home/stephan/Maildir/cur/
1517515808 .M176007P2993.johanna,S=1903,W=1956:2,DFS unexpectedly has references
Timo Sirainen [Tue, 12 Jun 2018 17:49:59 +0000 (20:49 +0300)]
lib-smtp: Allocate ORCPT addr_type from given memory pool, not data stack
This could have caused crashes when parsing ORCPT.
Stephan Bosch [Sat, 26 May 2018 12:49:01 +0000 (14:49 +0200)]
lib-smtp: client: Avoid sending an XCLIENT command longer than 512 bytes.
Send several separate XCLIENT commands instead. This way, it complies with the
base SMTP line length limit and with Postfix' original specification for the
XCLIENT command.
With the XCLIENT fields that Dovecot currently uses, this is very unlikely to
happen. Still, this needs to be fixed to make things reliable.
Stephan Bosch [Sun, 27 May 2018 09:30:06 +0000 (11:30 +0200)]
lib-smtp: client: Do not start authentication before initial XCLIENT gets reply.
Stephan Bosch [Sat, 26 May 2018 13:44:43 +0000 (15:44 +0200)]
lib-smtp: server: Provide full proxy data to the conn_proxy_data_updated() callback.
Before, it would only provide the fields that were updated, meaning that some
fields would remain unset, which caused problems for LMTP when more than one
XCLIENT command was sent or the ADDR field was not specified.
Stephan Bosch [Sat, 17 Mar 2018 23:57:36 +0000 (00:57 +0100)]
lib-smtp: Add test-smtp-payload, test-smtp-submit, test-smtp-client-errors, and test-smtp-server-errors to `make check`.
Stephan Bosch [Sat, 17 Mar 2018 23:53:14 +0000 (00:53 +0100)]
lib-http: Add test-http-payload, test-http-client-errors, and test-http-server-errors to `make check`.
Stephan Bosch [Sun, 18 Mar 2018 00:25:42 +0000 (01:25 +0100)]
lib-http: test-http-client-errors: Make the reconnect failure test less time-sensitive.
Easily breaks in Valgrind.
Stephan Bosch [Sat, 17 Mar 2018 23:46:32 +0000 (00:46 +0100)]
lib-smtp: test-smtp-payload: Terminate the test if it is hanging for some reason.
Stephan Bosch [Sat, 17 Mar 2018 23:34:22 +0000 (00:34 +0100)]
lib-smtp: test-smtp-client-errors: Terminate the test if it is hanging for some reason.
Stephan Bosch [Thu, 28 Dec 2017 15:33:49 +0000 (16:33 +0100)]
lib-http: test-http-client-errors: Terminate the test if it is hanging for some reason.
Stephan Bosch [Fri, 9 Feb 2018 22:58:51 +0000 (23:58 +0100)]
lib-http: test-http-payload: Add SSL tests.
Stephan Bosch [Fri, 9 Feb 2018 21:09:27 +0000 (22:09 +0100)]
lib-smtp: test-smtp-payload: Add SSL tests.
Stephan Bosch [Fri, 9 Feb 2018 23:00:17 +0000 (00:00 +0100)]
lib-http: test-http-payload: Ignore SIGPIPE.
Stephan Bosch [Fri, 9 Feb 2018 21:09:47 +0000 (22:09 +0100)]
lib-smtp: test-smtp-payload: Ignore SIGPIPE.
Stephan Bosch [Fri, 9 Feb 2018 21:27:00 +0000 (22:27 +0100)]
lib-http: server: Allow creating server with custom SSL settings.
Normally, the settings are obtained through lib-master, but that is not
really suitable for the test suite.
Stephan Bosch [Fri, 9 Feb 2018 21:06:49 +0000 (22:06 +0100)]
lib-smtp: server: Allow creating server with custom SSL settings.
Normally, the settings are obtained through lib-master, but that is not
really suitable for the test suite.
Stephan Bosch [Sat, 17 Mar 2018 20:08:09 +0000 (21:08 +0100)]
lib-smtp: client: Amend connection debug message with source ip:port.
Helps matching debug logs between client and server.
Stephan Bosch [Sat, 17 Mar 2018 17:10:04 +0000 (18:10 +0100)]
lib-smtp: test-smtp-payload: Keep the number of pending transactions constant.
Before, a window was used.
Stephan Bosch [Sat, 17 Mar 2018 17:05:01 +0000 (18:05 +0100)]
lib-smtp: test-smtp-payload: Make proper definition for the maximum number of parallel transactions.
Stephan Bosch [Sat, 10 Feb 2018 01:20:31 +0000 (02:20 +0100)]
lib-http: test-http-payload: Add test for exchanging payload with unknown size.
This will force using the chunked transfer encoding.
Stephan Bosch [Sat, 17 Mar 2018 20:34:11 +0000 (21:34 +0100)]
lib-http: test-http-payload: server: Fix asynchronous listening.
The listening socket was blocking and the io handler only accepted one connection per run.
Stephan Bosch [Sat, 17 Mar 2018 13:14:03 +0000 (14:14 +0100)]
lib-smtp: test-smtp-payload: server: Fix asynchronous listening.
The listening socket was blocking and the io handler only accepted one connection per run.
Stephan Bosch [Fri, 9 Feb 2018 21:04:23 +0000 (22:04 +0100)]
lib-ssl-iostream: Add support for creating server and client test SSL settings.
This is useful for building test cases with SSL support.
Timo Sirainen [Fri, 16 Feb 2018 12:33:33 +0000 (14:33 +0200)]
lib: Fix compiler warning when arc4random_buf() is used for random_fill()
Stephan Bosch [Thu, 15 Feb 2018 22:41:25 +0000 (23:41 +0100)]
lib-mail: message-parser: Fixed Clang 6.0 compiler warning.
Warning was:
index-mail.c:1182:3: warning: arithmetic on a null pointer treated as a cast
from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
message_parser_parse_body(data->parser_ctx,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../src/lib-mail/message-parser.h:95:28: note: expanded from macro
'message_parser_parse_body'
(void *)((char *)context + CALLBACK_TYPECHECK(callback, \
~~~~~~~~~~~~~~~ ^
Aki Tuomi [Wed, 16 Jan 2019 16:28:57 +0000 (18:28 +0200)]
auth: Do not import empty certificate username
Aki Tuomi [Wed, 16 Jan 2019 16:24:20 +0000 (18:24 +0200)]
auth: Fail authentication if certificate username was unexpectedly missing
Aki Tuomi [Tue, 15 Jan 2019 15:36:37 +0000 (17:36 +0200)]
login-common: Ensure we get username from certificate
Timo Sirainen [Thu, 26 Apr 2018 20:05:21 +0000 (23:05 +0300)]
lib-storage: Fix event leak when failing to create storage
Aki Tuomi [Thu, 6 Sep 2018 06:36:07 +0000 (09:36 +0300)]
driver-sqlite: Fix event usage in driver_sqlite_exec
Broken in
850f874971a7afa4f1f7b47df37fca082dc415a1
Timo Sirainen [Fri, 23 Nov 2018 08:12:27 +0000 (10:12 +0200)]
Update NEWS to v2.3.4