]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
6 years agodovecot.m4: Preserve original CFLAGS/LDFLAGS
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.

6 years agodovecot.m4: Use _DC_EOF instead of EOF
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

6 years agodovecot.m4: Use AS_IF macro instead of if
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

6 years agodovecot.m4: Call DC_DOVECOT_CFLAGS and HARDENING earlier
Aki Tuomi [Sat, 24 Nov 2018 17:59:04 +0000 (19:59 +0200)] 
dovecot.m4: Call DC_DOVECOT_CFLAGS and HARDENING earlier

Before SUBST

6 years agodovecot.m4: Rename DOVECOT_CFLAGS function to DC_DOVECOT_CFLAGS
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

6 years agodovecot.m4: Use dnl instead of hash for comments
Aki Tuomi [Sat, 24 Nov 2018 17:57:00 +0000 (19:57 +0200)] 
dovecot.m4: Use dnl instead of hash for comments

6 years agoconfigure: Use DC_DOVECOT_HARDENING
Aki Tuomi [Sat, 24 Nov 2018 08:20:54 +0000 (10:20 +0200)] 
configure: Use DC_DOVECOT_HARDENING

6 years agodovecot.m4: Add DC_DOVECOT_HARDENING to check hardening options
Aki Tuomi [Sat, 24 Nov 2018 08:15:04 +0000 (10:15 +0200)] 
dovecot.m4: Add DC_DOVECOT_HARDENING to check hardening options

6 years agom4: Move various compiler and linker checks to dovecot.m4
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.

6 years agolib-master: test-event-stats - Use PRIu64 format
Aki Tuomi [Fri, 23 Nov 2018 13:34:51 +0000 (15:34 +0200)] 
lib-master: test-event-stats - Use PRIu64 format

Forgotten in e16ba6f

6 years agolib-master: test-event-stats - Include signal.h
Aki Tuomi [Fri, 23 Nov 2018 13:33:20 +0000 (15:33 +0200)] 
lib-master: test-event-stats - Include signal.h

Forgotten in e16ba6f

6 years agolib-master: test-event-stats: Properly ensure cleanup of all files generated by tests.
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.

6 years agolib-master: test-event-stats: Move launch_test_stats() to a more logical place.
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.

6 years agolib-master: Create local .gitignore file for potential test output junk.
Stephan Bosch [Thu, 18 Oct 2018 13:11:55 +0000 (15:11 +0200)] 
lib-master: Create local .gitignore file for potential test output junk.

6 years agofts: Fix search query generation when one language ignores a token
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.

6 years agolib-smtp: client: Fix potential segfault occurring after receiving RCPT reply.
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.

6 years agolib-smtp: test-smtp-client-errors: Add tests for transaction timeouts.
Stephan Bosch [Wed, 15 Aug 2018 20:34:19 +0000 (22:34 +0200)] 
lib-smtp: test-smtp-client-errors: Add tests for transaction timeouts.

6 years agolib-smtp: client: Add debug message for the moment when all RCPT replies are received.
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.

6 years agolib-smtp: client: Fix transaction state transition for the DATA command.
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.

6 years agolib-smtp: client: Fix segmentation fault occurring at transaction timeout.
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().

6 years agolib-smtp: client: transaction: Prevent early transaction abort in smtp_client_transac...
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.

6 years agolib-smtp: Remove trailing whitespace in smtp-cient-transaction.c.
Stephan Bosch [Thu, 16 Aug 2018 06:48:43 +0000 (08:48 +0200)] 
lib-smtp: Remove trailing whitespace in smtp-cient-transaction.c.

6 years agolib-smtp: Remove trailing whitespace in test-smtp-client-errors.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.

6 years agolib-smtp: Read input before exiting in sendmail-exit-1.sh
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.

6 years agolib-smtp: Include test-bin in dist
Aki Tuomi [Thu, 9 Aug 2018 06:21:09 +0000 (09:21 +0300)] 
lib-smtp: Include test-bin in dist

6 years agolib-test: Warn if test_run or test_run_named result is not used
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.

6 years agoglobal: Ensure unit tests return value
Aki Tuomi [Thu, 9 Aug 2018 09:44:22 +0000 (12:44 +0300)] 
global: Ensure unit tests return value

6 years agolib-auth: Fix reconnect timeout leak at deinit
Timo Sirainen [Fri, 6 Jul 2018 08:22:46 +0000 (11:22 +0300)] 
lib-auth: Fix reconnect timeout leak at deinit

6 years agolib-http: client: Notify host object about submission of request before submitting...
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)

6 years agolib-http: client: Reset ips count to zero before DNS lookup.
Stephan Bosch [Mon, 2 Jul 2018 21:59:50 +0000 (23:59 +0200)] 
lib-http: client: Reset ips count to zero before DNS lookup.

6 years agolib: mempool - Remove unnecessary check
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.

6 years agolib: Make sure exactly one of _ILP32 and _LP64 is defined at all times
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.

6 years agolib: mempool - Improve p_realloc() panic message
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.

6 years agolib: mempool - Centralize p_free() NULL pointer check
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.

6 years agolib: mempool - Centralize p_realloc() NULL pointer check
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().

6 years agolib: mempool - Centralize p_{m,re}alloc() size checks
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.

6 years agolib: mempool - Define a global max allocation size supported by all pools
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.

6 years agolib: mempool-allocfree: Remove unused #define
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.

6 years agolib: mempool-datastack - Use container_of instead of casts
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 15:18:32 +0000 (11:18 -0400)] 
lib: mempool-datastack - Use container_of instead of casts

6 years agolib: mempool-alloconly - 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

6 years agolib: Rename a alloconly mempool helper function to make its scope obvious
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.

6 years agolib: Document the unsafe datastack mempool
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 14:55:53 +0000 (10:55 -0400)] 
lib: Document the unsafe datastack mempool

6 years agolib: Document the system mempool
Josef 'Jeff' Sipek [Tue, 19 Jun 2018 20:08:40 +0000 (16:08 -0400)] 
lib: Document the system mempool

6 years agolib: Document datastack mempools
Josef 'Jeff' Sipek [Wed, 20 Jun 2018 11:50:38 +0000 (07:50 -0400)] 
lib: Document datastack mempools

6 years agolib: Document allocfree mempools
Josef 'Jeff' Sipek [Tue, 19 Jun 2018 19:36:43 +0000 (15:36 -0400)] 
lib: Document allocfree mempools

6 years agolib: Document alloconly mempools
Josef 'Jeff' Sipek [Tue, 19 Jun 2018 18:04:43 +0000 (14:04 -0400)] 
lib: Document alloconly mempools

6 years agolib: mempool - Further reduce test code duplication
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.

6 years agolib: mempool - Reduce test code duplication
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.

6 years agolib: mempool - Generalize the test
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.

6 years agolib: str-sanitize: Use uni_utf8_data_truncate().
Stephan Bosch [Thu, 31 May 2018 21:59:50 +0000 (23:59 +0200)] 
lib: str-sanitize: Use uni_utf8_data_truncate().

6 years agolib: Add str_truncate_utf8().
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.

6 years agolib: unichar: Add uni_utf8_data_truncate().
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.

6 years agolib-smtp: server: Make sure conn->state.data_failed is only set when no previous...
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

6 years agolib-smtp: Allocate ORCPT addr_type from given memory pool, not data stack
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.

6 years agolib-smtp: client: Avoid sending an XCLIENT command longer than 512 bytes.
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.

6 years agolib-smtp: client: Do not start authentication before initial XCLIENT gets reply.
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.

6 years agolib-smtp: server: Provide full proxy data to the conn_proxy_data_updated() callback.
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.

6 years agolib-smtp: Add test-smtp-payload, test-smtp-submit, test-smtp-client-errors, and test...
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`.

6 years agolib-http: Add test-http-payload, test-http-client-errors, and test-http-server-errors...
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`.

6 years agolib-http: test-http-client-errors: Make the reconnect failure test less time-sensitive.
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.

6 years agolib-smtp: test-smtp-payload: Terminate the test if it is hanging for some reason.
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.

6 years agolib-smtp: test-smtp-client-errors: 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.

6 years agolib-http: test-http-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.

6 years agolib-http: test-http-payload: Add SSL tests.
Stephan Bosch [Fri, 9 Feb 2018 22:58:51 +0000 (23:58 +0100)] 
lib-http: test-http-payload: Add SSL tests.

6 years agolib-smtp: test-smtp-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.

6 years agolib-http: test-http-payload: Ignore SIGPIPE.
Stephan Bosch [Fri, 9 Feb 2018 23:00:17 +0000 (00:00 +0100)] 
lib-http: test-http-payload: Ignore SIGPIPE.

6 years agolib-smtp: test-smtp-payload: Ignore SIGPIPE.
Stephan Bosch [Fri, 9 Feb 2018 21:09:47 +0000 (22:09 +0100)] 
lib-smtp: test-smtp-payload: Ignore SIGPIPE.

6 years agolib-http: server: Allow creating server with custom SSL settings.
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.

6 years agolib-smtp: server: Allow creating server with custom SSL settings.
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.

6 years agolib-smtp: client: Amend connection debug message with source ip:port.
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.

6 years agolib-smtp: test-smtp-payload: Keep the number of pending transactions constant.
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.

6 years agolib-smtp: test-smtp-payload: Make proper definition for the maximum number of paralle...
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.

6 years agolib-http: test-http-payload: Add test for exchanging payload with unknown size.
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.

6 years agolib-http: test-http-payload: server: Fix asynchronous listening.
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.

6 years agolib-smtp: test-smtp-payload: server: Fix asynchronous listening.
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.

6 years agolib-ssl-iostream: Add support for creating server and client test SSL settings.
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.

6 years agolib: Fix compiler warning when arc4random_buf() is used for random_fill()
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()

6 years agolib-mail: message-parser: Fixed Clang 6.0 compiler warning.
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, \
                         ~~~~~~~~~~~~~~~ ^

6 years agoauth: Do not import empty certificate username
Aki Tuomi [Wed, 16 Jan 2019 16:28:57 +0000 (18:28 +0200)] 
auth: Do not import empty certificate username

6 years agoauth: Fail authentication if certificate username was unexpectedly missing
Aki Tuomi [Wed, 16 Jan 2019 16:24:20 +0000 (18:24 +0200)] 
auth: Fail authentication if certificate username was unexpectedly missing

6 years agologin-common: Ensure we get username from certificate
Aki Tuomi [Tue, 15 Jan 2019 15:36:37 +0000 (17:36 +0200)] 
login-common: Ensure we get username from certificate

6 years agolib-storage: Fix event leak when failing to create storage
Timo Sirainen [Thu, 26 Apr 2018 20:05:21 +0000 (23:05 +0300)] 
lib-storage: Fix event leak when failing to create storage

6 years agodriver-sqlite: Fix event usage in driver_sqlite_exec
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

6 years agoUpdate NEWS to v2.3.4
Timo Sirainen [Fri, 23 Nov 2018 08:12:27 +0000 (10:12 +0200)] 
Update NEWS to v2.3.4

6 years agodoveadm force-resync: Add -f parameter to fsck index while opening it
Timo Sirainen [Mon, 14 May 2018 18:33:53 +0000 (21:33 +0300)] 
doveadm force-resync: Add -f parameter to fsck index while opening it

This probably should be done by default, but for now keep it optional
just in case there are any bugs in the fsck implementation.

6 years agolib-storage: Add MAILBOX_FLAG_FSCK to fsck index immediately after opening it
Timo Sirainen [Mon, 14 May 2018 18:31:59 +0000 (21:31 +0300)] 
lib-storage: Add MAILBOX_FLAG_FSCK to fsck index immediately after opening it

This can be used to fix a broken index that is causing mailbox_open() to
fail.

6 years agodbox: cache pop3 order and uidl when saving mails
Josef 'Jeff' Sipek [Wed, 19 Sep 2018 12:50:26 +0000 (15:50 +0300)] 
dbox: cache pop3 order and uidl when saving mails

6 years agolib-storage/index: Add a helper to cache pop3 order and uidl
Josef 'Jeff' Sipek [Wed, 19 Sep 2018 12:49:56 +0000 (15:49 +0300)] 
lib-storage/index: Add a helper to cache pop3 order and uidl

6 years agoglobal: Use uint32_t for pop3 order
Josef 'Jeff' Sipek [Thu, 20 Sep 2018 10:32:46 +0000 (06:32 -0400)] 
global: Use uint32_t for pop3 order

6 years agolib: uri-util: Add tests for URI character escape functions.
Stephan Bosch [Thu, 25 Oct 2018 11:35:52 +0000 (13:35 +0200)] 
lib: uri-util: Add tests for URI character escape functions.

6 years agolib: uri-util: Add functions for escaping (almost) all reserved URI characters.
Stephan Bosch [Thu, 25 Oct 2018 11:34:52 +0000 (13:34 +0200)] 
lib: uri-util: Add functions for escaping (almost) all reserved URI characters.

6 years agolib-storage: Change default postmaster_address setting to "postmaster@<user domain...
Stephan Bosch [Wed, 5 Sep 2018 19:56:42 +0000 (21:56 +0200)] 
lib-storage: Change default postmaster_address setting to "postmaster@<user domain or server hostname>".

The former "postmaster@<user domain>" default would only yield a valid
postmaster address when there is a domain part in the username. The new default
uses a conditional variable expansion choose "%d" when it is not empty and the
new "%{hostname}" otherwise.

6 years agolib-storage: mail-user: Add "%{hostname}" variable expansion.
Stephan Bosch [Wed, 5 Sep 2018 19:24:15 +0000 (21:24 +0200)] 
lib-storage: mail-user: Add "%{hostname}" variable expansion.

6 years agolib-storage: mail-user: Add convenience functions for obtaining postmaster address.
Stephan Bosch [Wed, 5 Sep 2018 19:23:05 +0000 (21:23 +0200)] 
lib-storage: mail-user: Add convenience functions for obtaining postmaster address.

6 years agolib-storage: Move postmaster_address setting from mail_storage_settings to mail_user_...
Stephan Bosch [Wed, 5 Sep 2018 19:11:15 +0000 (21:11 +0200)] 
lib-storage: Move postmaster_address setting from mail_storage_settings to mail_user_settings.

6 years agoauth: test-lua - Add test to ensure that values are not converted to number by mistake
Aki Tuomi [Mon, 29 Oct 2018 08:43:10 +0000 (10:43 +0200)] 
auth: test-lua - Add test to ensure that values are not converted to number by mistake

6 years agoauth: test-lua - Fix unit test to handle errors
Aki Tuomi [Mon, 29 Oct 2018 08:42:36 +0000 (10:42 +0200)] 
auth: test-lua - Fix unit test to handle errors

6 years agoauth: test-lua - Fix inconsistent whitespace
Aki Tuomi [Mon, 29 Oct 2018 12:43:11 +0000 (14:43 +0200)] 
auth: test-lua - Fix inconsistent whitespace

6 years agoauth: db-lua - Use lua_type to detect type
Aki Tuomi [Mon, 29 Oct 2018 07:52:37 +0000 (09:52 +0200)] 
auth: db-lua - Use lua_type to detect type

Using lua_isnumber to detect numbers also considers
convertible strings as numbers.

6 years agoauth: Store password with auth_set_field in Lua passdb
Aki Tuomi [Mon, 29 Oct 2018 07:50:33 +0000 (09:50 +0200)] 
auth: Store password with auth_set_field in Lua passdb

Makes caching work for passwords