]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Tue, 16 Aug 2016 09:28:27 +0000 (12:28 +0300)]
doveconf: hide ssl_key and ssl_dh without -P
Timo Sirainen [Tue, 16 Aug 2016 11:53:24 +0000 (14:53 +0300)]
lib-storage: If chdir to home doesn't work, chdir to root instead.
Most importantly this fixes unlink_directory() when current directory
after dropping privileges can't be open()ed.
Timo Sirainen [Tue, 16 Aug 2016 11:04:13 +0000 (14:04 +0300)]
lib-storage: Minor error message fix
Timo Sirainen [Tue, 16 Aug 2016 08:05:25 +0000 (11:05 +0300)]
lib-mail: Compiling fix for message-snippet change - U'x' isn't standard.
nikwrt [Tue, 29 Mar 2016 20:30:17 +0000 (22:30 +0200)]
fts-squat: fix Corrupted squat uidlist bug
Aki Tuomi [Tue, 16 Aug 2016 07:11:04 +0000 (10:11 +0300)]
config: Only require ssl_dh is ssl is turned on
Aki Tuomi [Mon, 15 Aug 2016 16:22:31 +0000 (19:22 +0300)]
lib-mail: Fix snippet generation
Now we won't add leading whitespace for no reason, and also
strip BOM when found.
Aki Tuomi [Mon, 15 Aug 2016 10:30:44 +0000 (13:30 +0300)]
dcrypt: Fix encrypted test keys
Aki Tuomi [Mon, 15 Aug 2016 08:32:31 +0000 (11:32 +0300)]
dcrypt: Update v2 sample
Aki Tuomi [Mon, 15 Aug 2016 08:27:04 +0000 (11:27 +0300)]
dcrypt: Retrieve key length correctly
Martti Rannanjärvi [Fri, 12 Aug 2016 23:26:16 +0000 (02:26 +0300)]
lib-storage: remove set_cache_corrupted_reason from mail_vfuncs
Change set_cache_corrupted signature to what set_cache_corrupted_reason
used to be.
Timo Sirainen [Sat, 13 Aug 2016 11:31:08 +0000 (14:31 +0300)]
lib: Avoid compiler warning if off_t has the same size as ssize_t.
Martti Rannanjärvi [Fri, 12 Aug 2016 22:18:03 +0000 (01:18 +0300)]
lib-storage: remove mailbox-recent-flags.h from index-storage.h
Timo Sirainen [Sat, 13 Aug 2016 11:16:55 +0000 (14:16 +0300)]
dsync: Further fixes to received_timestamp and virtual_size parsing (-t and -S parameters)
Martti Rannanjärvi [Fri, 12 Aug 2016 20:57:59 +0000 (23:57 +0300)]
lib: move sort and search from strfuncs.h to sort.h
Martti Rannanjärvi [Fri, 12 Aug 2016 21:20:43 +0000 (00:20 +0300)]
auth: remove #define default_cache_key cache_key
Martti Rannanjärvi [Fri, 12 Aug 2016 21:35:23 +0000 (00:35 +0300)]
lib-http: rename http_header_field.key to name
Martti Rannanjärvi [Fri, 12 Aug 2016 21:50:57 +0000 (00:50 +0300)]
lib-http: remove http_header_field from http_response
Martti Rannanjärvi [Fri, 12 Aug 2016 22:02:42 +0000 (01:02 +0300)]
lib-lda: remove obsolete smtp-client code
Martti Rannanjärvi [Fri, 12 Aug 2016 22:30:51 +0000 (01:30 +0300)]
lib-storage: remove obsolete constants
Martti Rannanjärvi [Fri, 12 Aug 2016 23:10:52 +0000 (02:10 +0300)]
lib-storage: remove obsolete MAIL_FETCH_UIDL_FILE_NAME
Timo Sirainen [Fri, 12 Aug 2016 22:00:13 +0000 (01:00 +0300)]
dsync: Added missing fields to ibc-stream.
Stephan Bosch [Thu, 11 Aug 2016 23:24:16 +0000 (01:24 +0200)]
lib: Implemented i_stream_create_copy_from_data().
Unlike i_stream_create_from_data(), this function makes a copy of the provided data block. This way, the application does not need to worry about keeping it allocated for the lifetime of the stream.
The copied data is allocated durably on the system pool and freed once the stream is destroyed.
Martti Rannanjärvi [Mon, 25 Jul 2016 07:24:44 +0000 (10:24 +0300)]
lib,lib-test: stop calling memcmp and memcpy with NULL in tests
Martti Rannanjärvi [Mon, 25 Jul 2016 07:21:43 +0000 (10:21 +0300)]
lib-mail: stop calling str_append_n and memcmp with NULL in tests
Martti Rannanjärvi [Fri, 22 Jul 2016 08:23:11 +0000 (11:23 +0300)]
lib: iterate all fds in fd_debug_verify_leaks, fail with i_fatal
There is no benefit in failing with i_panic here since the error is most
likely not in the stack trace here.
Martti Rannanjärvi [Tue, 19 Jul 2016 15:34:08 +0000 (18:34 +0300)]
lib: stop using first_fd as loop counter in fd_debug_verify_leaks
Use a separate int fd to iterate [first_fd, last_fd] instead.
Timo Sirainen [Mon, 8 Aug 2016 10:12:15 +0000 (13:12 +0300)]
Moved cc-wrapper.sh handling to dovecot.m4
When configuring Dovecot --without-shared-libs and pointing external plugins
to uninstalled sources --with-dovecot, any binaries complied for plugins
weren't using cc-wrapper.sh, which could have caused runtime failures when
they attempted to load plugins dynamically. Now it's possible to add
DC_CC_WRAPPER to plugins' configure.ac to build with the cc-wrapper.sh.
Aki Tuomi [Thu, 11 Aug 2016 11:34:05 +0000 (14:34 +0300)]
configure: Fix dcrypt build conditionals
Martti Rannanjärvi [Wed, 10 Aug 2016 12:40:23 +0000 (15:40 +0300)]
lib-storage: don't crash when pop3c-client timeouts
Aki Tuomi [Thu, 11 Aug 2016 09:46:42 +0000 (12:46 +0300)]
doveadm-dump: Add missing include
Timo Sirainen [Thu, 11 Aug 2016 14:27:24 +0000 (17:27 +0300)]
-Wstrict-bool warning fixes
Timo Sirainen [Thu, 11 Aug 2016 14:23:48 +0000 (17:23 +0300)]
doveadm sync: Fixed -S parameter parsing to actually work.
Timo Sirainen [Fri, 1 Jul 2016 11:30:24 +0000 (14:30 +0300)]
doveadm sync/backup: Added -S <max size> parameter to skip too large mails.
Aki Tuomi [Wed, 13 Jul 2016 06:51:08 +0000 (09:51 +0300)]
auth-db-dict: Allow key name expansion
This allows expansion of dictionary keys based on userdb
variables on dict lookup mapping. Example:
key userdb {
key = %{userdb:nspace:default}/userdb
format = json
}
Phil Carmody [Tue, 9 Aug 2016 15:29:19 +0000 (18:29 +0300)]
lib-test: test-exit helper to stop valgrind complaining about fork()s
fork()s that want to _exit() will cause valgrind's full memory leak
checker to complain a lot - this performs a quick cleanup first.
Before:
phil@phil:~/repos/dovecot-core$ valgrind --trace-children=yes --leak-check=full --show-leak-kinds=all src/lib/test-lib --match unix
==19576== total heap usage: 4 allocs, 0 frees, 17,858 bytes allocated
istream unix ......................................................... : ok
0 / 1 tests failed
==19575== total heap usage: 7 allocs, 7 frees, 19,327 bytes allocated
After:
phil@phil:~/repos/dovecot-core$ valgrind --trace-children=yes --leak-check=full --show-leak-kinds=all src/lib/test-lib --match unix
istream unix ......................................................... : ok
==4993== total heap usage: 4 allocs, 4 frees, 17,858 bytes allocated
0 / 1 tests failed
==4992== total heap usage: 7 allocs, 7 frees, 19,327 bytes allocated
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Aki Tuomi [Tue, 9 Aug 2016 08:48:10 +0000 (11:48 +0300)]
openssl: Fix v1.1 compability
Aki Tuomi [Mon, 8 Aug 2016 12:31:50 +0000 (15:31 +0300)]
OpenSSL: link against OpenSSL libs explicitly
Martti Rannanjärvi [Sat, 23 Jul 2016 20:40:15 +0000 (23:40 +0300)]
doveadm: add doveadm-dump-dcrypt-key
Aki Tuomi [Tue, 7 Jun 2016 11:54:43 +0000 (14:54 +0300)]
config: Use ssl-parameters.dat if ssl_dh is missing
Aki Tuomi [Thu, 3 Mar 2016 10:41:24 +0000 (12:41 +0200)]
ssl-proxy: Use ssl_dh setting from config
Aki Tuomi [Thu, 3 Mar 2016 10:41:12 +0000 (12:41 +0200)]
lib-master: Load DH string from config file
Aki Tuomi [Thu, 3 Mar 2016 10:40:38 +0000 (12:40 +0200)]
lib-ssl-iostream: Read dh parameters from PEM string
Aki Tuomi [Thu, 3 Mar 2016 09:55:59 +0000 (11:55 +0200)]
dovecot: Remove ssl-params
Timo Sirainen [Wed, 10 Aug 2016 16:15:56 +0000 (19:15 +0300)]
quota: If quota lookup updates vsize header, lock it earlier to avoid a deadlock.
Timo Sirainen [Wed, 10 Aug 2016 16:13:09 +0000 (19:13 +0300)]
quota: Fixed handling when mail size lookup fails due to mail already being expunged.
We don't want to fail it as a quota allocation failure, but just pass
through the "mail is expunged" error to the original caller.
Timo Sirainen [Wed, 10 Aug 2016 14:56:14 +0000 (17:56 +0300)]
dict-client: Improved timeout error message.
Timo Sirainen [Wed, 10 Aug 2016 14:54:29 +0000 (17:54 +0300)]
lib: Added connection_input_timeout_reason()
Timo Sirainen [Wed, 10 Aug 2016 14:44:26 +0000 (17:44 +0300)]
lib: Added connection.connect_started/finished timestamps.
Stephan Bosch [Thu, 11 Aug 2016 01:40:58 +0000 (03:40 +0200)]
Fixed copyright notices.
Timo Sirainen [Wed, 10 Aug 2016 20:53:48 +0000 (23:53 +0300)]
lib-storage: Added mail_user_set_plugin_getenv_bool()
Aki Tuomi [Wed, 10 Aug 2016 09:01:50 +0000 (12:01 +0300)]
global: Update mailbox_attribute_get API usage
Aki Tuomi [Thu, 4 Aug 2016 06:51:40 +0000 (09:51 +0300)]
lib-storage: Change mailbox_attribute_get* API
lib-storage/mailbox-attribute.h: mailbox_attribute_get() and
mailbox_attribute_get_stream() now has struct mailbox_transaction_context
as their first parameter. This isn't good for performance, because opening
a transaction requires opening mailbox indexes first. But reading
attributes wouldn't actually require opening the indexes, so this is just
wasteful.
Timo Sirainen [Tue, 9 Aug 2016 15:06:25 +0000 (18:06 +0300)]
quota: Don't get message sizes when updating mailbox that ignores quotas.
Nothing is done with the size anyway.
Timo Sirainen [Wed, 10 Aug 2016 16:07:18 +0000 (19:07 +0300)]
lib-storage: Fixed potential .vsize.lock deadlock.
Timo Sirainen [Wed, 10 Aug 2016 14:15:21 +0000 (17:15 +0300)]
auth: Removed redundant noauthenticate checks.
Now that noauthenticate also adds nopassword field.
Timo Sirainen [Wed, 10 Aug 2016 14:14:28 +0000 (17:14 +0300)]
auth: When setting noauthenticate=yes, also set nopassword=yes
There are various places which check only "nopassword", but not
"noauthenticate".
Timo Sirainen [Wed, 10 Aug 2016 14:41:51 +0000 (17:41 +0300)]
lib: Added connection.last_input_tv for more accuracy
Timo Sirainen [Wed, 10 Aug 2016 14:37:53 +0000 (17:37 +0300)]
lib: connection_disconnect() now resets last_input
If we reconnect, its value would otherwise be wrong.
Timo Sirainen [Wed, 10 Aug 2016 14:11:13 +0000 (17:11 +0300)]
auth: Blocking userdb lookup shouldn't reset extra fields.
Timo Sirainen [Wed, 10 Aug 2016 11:05:25 +0000 (14:05 +0300)]
login-proxy: Fixed assert-crash/hang on connect errors.
The internal BUG would have left the host hanging. "Host is down" or any
immediate connect() error would have assert-crashed with:
Panic: file login-proxy.c: line 470 (login_proxy_disconnect): assertion failed: (proxy->state_rec->num_waiting_connections > 0)
Timo Sirainen [Tue, 9 Aug 2016 22:38:26 +0000 (01:38 +0300)]
lmtp: Fixed using default port 24
Broken by
dfe53c824 .
Timo Sirainen [Mon, 8 Aug 2016 16:25:05 +0000 (19:25 +0300)]
doveadm: Fixed -A and -u wildcard handling with server connections.
Timo Sirainen [Mon, 8 Aug 2016 16:24:08 +0000 (19:24 +0300)]
doveadm: Fixed hanging when printing output from different server connections.
Timo Sirainen [Mon, 8 Aug 2016 16:22:15 +0000 (19:22 +0300)]
doveadm: Avoid recursively calling server input callback
Probably doesn't fix anything, but it could cause confusing backtraces at
least.
Timo Sirainen [Mon, 8 Aug 2016 16:16:57 +0000 (19:16 +0300)]
doveadm-server: Fixed potential hang when reading replies to multiple commands
Timo Sirainen [Mon, 8 Aug 2016 16:11:16 +0000 (19:11 +0300)]
doveadm: Revert earlier NUL-printing change
793b024bf .
It changes the output in ways that are a bit difficult to fix. Also the
the important part where NULs printing is useful is in a message body,
which should work even without this change. So for now just revert it.
Timo Sirainen [Mon, 8 Aug 2016 14:56:48 +0000 (17:56 +0300)]
lib-auth: Avoid crash after user iteration if connection failed.
Timo Sirainen [Mon, 8 Aug 2016 14:13:15 +0000 (17:13 +0300)]
doveadm: Removed unused code.
Timo Sirainen [Mon, 8 Aug 2016 13:15:26 +0000 (16:15 +0300)]
dsync: Fixed empty-header-workaround
Timo Sirainen [Mon, 8 Aug 2016 13:06:50 +0000 (16:06 +0300)]
dsync_features: For consistency use '-' and not '_'
Other _features and _workarounds settings use also '-'.
Timo Sirainen [Mon, 8 Aug 2016 12:49:13 +0000 (15:49 +0300)]
lib: Small improvements to iostream-temp unit test.
Timo Sirainen [Mon, 8 Aug 2016 11:39:39 +0000 (14:39 +0300)]
doveadm: When printing input from doveadm-server, don't truncate at NUL.
Aki Tuomi [Mon, 8 Aug 2016 10:21:34 +0000 (13:21 +0300)]
doveadm: Pass connection to mail context
Aki Tuomi [Mon, 8 Aug 2016 08:38:54 +0000 (11:38 +0300)]
doveadm: Use str_append_tabescaped_n
Aki Tuomi [Mon, 8 Aug 2016 08:23:02 +0000 (11:23 +0300)]
lib: Add binary-safe tabescape
Aki Tuomi [Mon, 8 Aug 2016 06:29:26 +0000 (09:29 +0300)]
doveadm: Streamline tabunescape
Timo Sirainen [Mon, 8 Aug 2016 09:36:48 +0000 (12:36 +0300)]
doveadm: Extra safety - initialize cmd_input_fd to -1
Just to be sure it's never attempted to be accessed as 0 (stdin) before
being initialized. (It didn't happen with current code as far as I know.)
Phil Carmody [Tue, 12 Jul 2016 10:31:32 +0000 (13:31 +0300)]
lib: tests - give the tests names, using the new macros
The lists of test function declarations and of test functions to call was
basically the same list. Use the new test macros to squash them into one
list, and then chose to name all the tests, so that you can select which
ones to run. This can simplify the debug cycle when some of the tests are
lengthy.
e.g.:
phil@phil:~/repos/dovecot-core$ src/lib/test-lib --match crc
crc32 ................................................................ : ok
0 / 1 tests failed
src/lib is clearly the most complicated case, conversions of others where
filtering would be useful should be trivial following this example.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Tue, 12 Jul 2016 10:28:54 +0000 (13:28 +0300)]
lib-test: enable naming of tests, such that only a subset is run
How to use these will become clear in a subsequent patch. Even if you
don't want to name tests, the macros can reduce redundancy in the code,
as the list of test function prototypes and the list of test functions
to call become the same lists, expanded through 2 different macros.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Wed, 1 Jun 2016 10:57:34 +0000 (13:57 +0300)]
lib-test: improve expected error handling
If we expect a specific error string, then when we see it, suppress it.
We do not suppress errors expected by count, because if we get unexpected
errors, then we do not want them suppressed, and we have no way of
distinguishing between the expected and unexpected errors.
This of course favours the use of the expected string version of the helper,
but alas that's not always usable, as you can only expect one at a time.
Additionally, if we failed to see an expected message, then when we no longer
expect to see it, reset the expected message state to not cascade further
test assertion failures.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Conflicts:
src/lib-test/test-common.c
Martti Rannanjärvi [Wed, 3 Aug 2016 09:46:21 +0000 (12:46 +0300)]
doveadm: add doveadm dump dcrypt-file
Martti Rannanjärvi [Sat, 6 Aug 2016 19:12:13 +0000 (22:12 +0300)]
lib-dcrypt: make decrypt_istream format and flags visible
Martti Rannanjärvi [Sat, 6 Aug 2016 19:07:00 +0000 (22:07 +0300)]
lib-dcrypt: add dcrypt-iostream.h
Move everything from dcrypt-iostream-private.h and enum
io_stream_encrypt_flags to the new dcrypt-iostream.h file.
Aki Tuomi [Fri, 5 Aug 2016 12:21:29 +0000 (15:21 +0300)]
dsync: Add support for features
Add empty_header_workaround as first feature
J. Nick Koston [Sat, 9 Apr 2016 23:21:23 +0000 (18:21 -0500)]
quota_clone plugin: quota_clone_mail_user_created warned without debug
"The quota_clone_dict setting is missing from configuration" warning
would be thrown when debug mode was not enabled. This warning
happens under normal circumstances when prefix="" namespace is not
defined (usually when set to INBOX.)
See http://dovecot.org/list/dovecot-cvs/2012-October/021981.html for
more details on the automagic prefix="" namespace.
This change suppresses the spurious warning.
Wido den Hollander [Sat, 9 Apr 2016 11:43:16 +0000 (13:43 +0200)]
lmtp: Use port 24 if no port has been provided
This allows using the LMTP, IMAP and POP3 proxy on the same
Dovecot installation without the userdb providing the port
to connect to.
TCP port 24 is registered at IANA as: "any private mail system"
LMTP being the Local Mail Transfer Protocol classifies as a private
mail system and thus justifies the usage of port 24.
Prior to this patch the LTMP client would connect to TCP port 0 by
default if the userdb did not provide a port to connect to.
Stephan Bosch [Sat, 6 Aug 2016 15:59:10 +0000 (17:59 +0200)]
istream-base64-encoder: Implemented proper stat function that returns the encoded size of the stream.
For Base64 encoding, the size of the encoded data can be determined from the input data size exactly.
Timo Sirainen [Fri, 5 Aug 2016 19:57:02 +0000 (22:57 +0300)]
dict-client: Fixed error message for failed synchronous dict_lookup()
The error message was allocated from data stack, but freed too early.
Timo Sirainen [Thu, 4 Aug 2016 19:15:25 +0000 (22:15 +0300)]
lib-dcrypt: Fixed test-stream unit test not to leak memory
Broken by previous change.
Timo Sirainen [Thu, 4 Aug 2016 18:51:18 +0000 (21:51 +0300)]
lib-auth: Unescape passdb/userdb extra fields.
This only affected \001, \t, \r and \n characters which were left
tab-escaped (e.g. \t as "\001t").
Timo Sirainen [Thu, 4 Aug 2016 18:44:08 +0000 (21:44 +0300)]
lib-dcrypt: Added unit tests to nonblocking istream-decrypt
Timo Sirainen [Thu, 4 Aug 2016 18:38:30 +0000 (21:38 +0300)]
lib-dcrypt: test-stream writes now to buffer, not to temp-iostream
This simplifies the following change.
Timo Sirainen [Thu, 4 Aug 2016 18:29:14 +0000 (21:29 +0300)]
lib-dcrypt: Support nonblocking istreams.
Martti Rannanjärvi [Thu, 4 Aug 2016 16:45:35 +0000 (19:45 +0300)]
lib-dcrypt: add 0 to 400 byte stream test
Remove 8 byte speacial case also.
Martti Rannanjärvi [Thu, 4 Aug 2016 15:35:53 +0000 (18:35 +0300)]
lib-dcrypt: error message on missing decrypt key or password
Return a sensible error message when loading an encrypted private key is
attempted but the decrypt key or password is missing.
Timo Sirainen [Thu, 4 Aug 2016 14:11:20 +0000 (17:11 +0300)]
lib-http: Support per-request timeout and max_attempts
Timo Sirainen [Tue, 2 Aug 2016 20:25:57 +0000 (23:25 +0300)]
director: Throttle user move/kill failure errors after 100/sec.
If it happened to a lot of users, they can take a lot of space in logs.
Timo Sirainen [Tue, 2 Aug 2016 20:14:23 +0000 (23:14 +0300)]
lib: Added log throttling API.
Martti Rannanjärvi [Thu, 4 Aug 2016 14:39:02 +0000 (17:39 +0300)]
lib-dcrypt: don't give strstr NULL in test-crypto