]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Thu, 20 Oct 2016 10:09:09 +0000 (13:09 +0300)]
doveadm service stop: Moved command handling to doveadm-master.c
It's talking to master process, and there will be other non-service commands
that talk to the master process in the same way.
Timo Sirainen [Tue, 11 Oct 2016 09:43:20 +0000 (12:43 +0300)]
doveadm user: If lookup fails, don't write it to the same line as header.
Timo Sirainen [Wed, 19 Oct 2016 18:49:30 +0000 (21:49 +0300)]
doveadm-server: Show incoming connection's IP and running command is process title.
Aki Tuomi [Mon, 17 Oct 2016 21:37:32 +0000 (00:37 +0300)]
auth: Pass local_name to auth-request
This allows using local_name in various places,
such as passdb/userdb queries.
Timo Sirainen [Thu, 20 Oct 2016 07:11:53 +0000 (10:11 +0300)]
login proxy: Hanging outgoing SSL connections caused using already-freed memory
This mainly happened when login proxy closed the connection due to connect
timeout. The ssl-proxy still had a reference and existed for a longer time.
If SSL handshake still succeeded afterwards, it now called
login_proxy_ssl_handshaked(), which accessed the already-freed proxy and
likely crashed.
Fixed the ssl-client proxy code specifically. Alternatively ssl_proxy_free()
could be calling ssl_proxy_destroy() always, but since ssl-server side of
the code seems to have been working fine, I don't want to accidentally
break it.
Timo Sirainen [Thu, 20 Oct 2016 07:59:23 +0000 (10:59 +0300)]
lib-program-client: Linking fix.
Stephan Bosch [Wed, 19 Oct 2016 21:07:58 +0000 (23:07 +0200)]
Fixed copyright notice.
Aki Tuomi [Wed, 19 Oct 2016 18:03:39 +0000 (21:03 +0300)]
lib-program-client: Deduplicate flush statement
It can be done below by splitting the else if
into separate if statement.
Aki Tuomi [Wed, 19 Oct 2016 18:03:24 +0000 (21:03 +0300)]
lib-program-client: Correctly handle error code
Aki Tuomi [Wed, 19 Oct 2016 17:40:22 +0000 (20:40 +0300)]
lib: Copy target_uid from restrict_access_settings
One cannot assign to set->uid, causing compile error.
Aki Tuomi [Wed, 19 Oct 2016 16:02:22 +0000 (19:02 +0300)]
lib-program-client: Try drop setuid root by default
But not if root privileges are asked for.
Aki Tuomi [Wed, 19 Oct 2016 15:44:35 +0000 (18:44 +0300)]
lib: Add drop_setuid_root for restrict_access
drop_setuid_root, when set to true, will detect
and try to drop getuid()==0. This is done by
recovering current effective UID to set->uid
if set->uid == -1, and then doing seteuid(0).
It will also drop out any other extra privileges,
such as extra groups not requested for.
Josef 'Jeff' Sipek [Wed, 12 Oct 2016 18:57:51 +0000 (14:57 -0400)]
lib-storage: clean up mailbox_list_create to improve readability
There is no reason to use mailbox_list_driver_find() here instead of
mailbox_list_find_class() as (1) we do not need the index into the list
driver array, and (2) dealing with double-pointers is harder than regular
pointers.
Timo Sirainen [Wed, 19 Oct 2016 16:41:51 +0000 (19:41 +0300)]
push-notification: Error handling fix and cleanups.
Timo Sirainen [Wed, 19 Oct 2016 15:25:15 +0000 (18:25 +0300)]
dovecot-ldap.conf.ext: Updated sasl_bind comment.
Aki Tuomi [Wed, 19 Oct 2016 13:31:01 +0000 (16:31 +0300)]
lib-program-client: Fix memory access problem
Aki Tuomi [Wed, 19 Oct 2016 13:06:22 +0000 (16:06 +0300)]
lib-program-client: Fix local tests
Aki Tuomi [Mon, 17 Oct 2016 06:50:30 +0000 (09:50 +0300)]
lib-program-client: Whitespace fixes
Aki Tuomi [Mon, 17 Oct 2016 11:19:40 +0000 (14:19 +0300)]
lib-program-client: Disable valgrind
For local test, we can't use valgrind,
it's too unreliable (breaks execution sometimes).
Aki Tuomi [Mon, 17 Oct 2016 11:13:28 +0000 (14:13 +0300)]
lib-program-client: Add support for iostream-dot
This is also made mandatory for TCP client.
Aki Tuomi [Mon, 17 Oct 2016 08:48:16 +0000 (11:48 +0300)]
lib-program-client: Make sure we delay output in test
This is to ensure that the client does not prematurely
disconnect before output is sent.
Aki Tuomi [Mon, 17 Oct 2016 06:46:22 +0000 (09:46 +0300)]
lib-program-client: Move version string to define
Aki Tuomi [Thu, 13 Oct 2016 12:32:49 +0000 (15:32 +0300)]
lib-program-client: Add URI based constructor
Aki Tuomi [Mon, 17 Oct 2016 06:44:33 +0000 (09:44 +0300)]
lib-program-client: Add tests for TCP client
Aki Tuomi [Mon, 17 Oct 2016 06:44:14 +0000 (09:44 +0300)]
lib-program-client: Add TCP client support
Aki Tuomi [Mon, 17 Oct 2016 06:35:14 +0000 (09:35 +0300)]
lib-program-client: Add switch_ioloop vfunc
This lets program-client backends do their own
special io loop switching.
Aki Tuomi [Sat, 15 Oct 2016 10:59:45 +0000 (13:59 +0300)]
lib-program-client: Use milliseconds in idle timeout
Aki Tuomi [Mon, 17 Oct 2016 06:09:23 +0000 (09:09 +0300)]
lib-program-client: Use child-wait
This makes the client waiting asynchronous.
Aki Tuomi [Mon, 17 Oct 2016 06:11:38 +0000 (09:11 +0300)]
lib-program-client: Disconnect asynchronously
Aki Tuomi [Wed, 12 Oct 2016 10:14:03 +0000 (13:14 +0300)]
lib-program-client: Use restrict-access
This makes the program-client execution behave
more consistent to the rest of the core code.
Aki Tuomi [Thu, 13 Oct 2016 07:11:52 +0000 (10:11 +0300)]
lib: Add reference counting to child_wait_pid
Timo Sirainen [Mon, 17 Oct 2016 09:34:36 +0000 (12:34 +0300)]
lib-storage: Make sure mailbox_uidvalidity_next() doesn't return 0.
0 isn't a valid IMAP UIDVALIDITY, and Dovecot treats 0 as "not assigned".
Martti Rannanjärvi [Mon, 17 Oct 2016 18:03:51 +0000 (21:03 +0300)]
lib-dcrypt: add a test for password change
Test that you can encrypt a key with password, encrypt a key with the
password protected key, change the password, and still load a key that you
encrypted with the key encrypted using the first password.
Martti Rannanjärvi [Tue, 18 Oct 2016 11:57:31 +0000 (14:57 +0300)]
doveadm: trim doveadm dump dcrypt-key input
dcrypt does not like extra newlines at the end of a key.
Timo Sirainen [Tue, 18 Oct 2016 07:45:05 +0000 (10:45 +0300)]
lib-fs: Fixed fs_metadata_find() to actually work
Josef 'Jeff' Sipek [Wed, 12 Oct 2016 18:32:51 +0000 (14:32 -0400)]
imapc: don't mix positional and designated initialization
Josef 'Jeff' Sipek [Mon, 17 Oct 2016 13:18:27 +0000 (09:18 -0400)]
imapc: use serialized settings as unique_root_dir
Without this, it is not possible to instantiate multiple imapc storages.
Any attempts to will result in multiple namespaces sharing the same storage,
regardless of if that was the intention.
Josef 'Jeff' Sipek [Mon, 17 Oct 2016 13:13:21 +0000 (09:13 -0400)]
lib-storage: treat empty root_dir as an empty string
Steffen Templin [Mon, 17 Oct 2016 07:34:04 +0000 (09:34 +0200)]
push-notification: Resolve indentation problem
Steffen Templin [Thu, 6 Oct 2016 07:35:17 +0000 (07:35 +0000)]
push-notification: Re-open mailbox and sync it to get unseen count.
Steffen Templin [Wed, 5 Oct 2016 10:28:49 +0000 (13:28 +0300)]
push-notification: Add unseen count to OX driver.
Timo Sirainen [Mon, 10 Oct 2016 17:38:31 +0000 (20:38 +0300)]
global: Handle broken Content-Type headers consistently.
1) Only the first Content-Type header is used. (Simpler than using the last.)
2) Invalid Content-Types are parsed as far as we can. This is mainly to make
sure they aren't treated as missing Content-Types, which could cause them to
become text/plain.
Timo Sirainen [Mon, 10 Oct 2016 17:24:41 +0000 (20:24 +0300)]
lib-imap: imap_bodystructure_parse() ignores text/plain flag mismatch for now.
Maybe we can enable it some day far into the future, but for now this just
causes unnecessary cache file rebuilds.
Timo Sirainen [Mon, 10 Oct 2016 17:23:47 +0000 (20:23 +0300)]
lib-imap: Don't write a broken Content-Type as text/plain to BODYSTRUCTURE
Mainly because it doesn't match with MESSAGE_PART_FLAG_TEXT in message_part.
Aki Tuomi [Sat, 15 Oct 2016 20:04:35 +0000 (23:04 +0300)]
config: Compare local_name case insensitive
DNS and certificate names should be compared
case insensitive.
Aki Tuomi [Mon, 17 Oct 2016 20:25:27 +0000 (23:25 +0300)]
lib: Add null_strcasecmp
Aki Tuomi [Mon, 17 Oct 2016 16:38:07 +0000 (19:38 +0300)]
auth-policy: Use request's pool instead of new pool
This fixes existing memory leak in auth_report,
which is caused by using separate memory pool
instead of request's pool.
Thank you for Andrea Carpani for extensive
debugging.
Timo Sirainen [Sun, 16 Oct 2016 19:58:07 +0000 (22:58 +0300)]
dict-sql: Use LIMIT in SQL queries with dict_iterate_set_limit()
Timo Sirainen [Sun, 16 Oct 2016 19:55:26 +0000 (22:55 +0300)]
dict-sql: Error handling fix & code cleanup
Only the first sql_dict_iterate_next_query() error was handled correctly.
Timo Sirainen [Sun, 16 Oct 2016 19:40:18 +0000 (22:40 +0300)]
lib-dict: Added dict_iterate_set_limit()
Aki Tuomi [Mon, 17 Oct 2016 16:21:34 +0000 (19:21 +0300)]
lib-dict: Duplicate result value in mempool
Duplicate the result value already in callback
to avoid it getting lost during async calls.
Reported & tested by Pierre Jaury.
Timo Sirainen [Mon, 17 Oct 2016 20:06:48 +0000 (23:06 +0300)]
lib-mail: Fixed infinite loop in istream-attachment-extractor
Broken by
7f74811b7 . Pretty much any larger attachment going through
this istream had a good potential of going into an infinite loop.
Timo Sirainen [Mon, 17 Oct 2016 07:59:34 +0000 (10:59 +0300)]
lib-fs: Added FS_METADATA_WRITE_FNAME to allow renaming a file being written.
Timo Sirainen [Mon, 10 Oct 2016 22:04:39 +0000 (01:04 +0300)]
lib-fs: Added internal fs_metadata_find() helper function
Timo Sirainen [Mon, 10 Oct 2016 21:46:59 +0000 (00:46 +0300)]
lib-fs: Optimize changing FS_METADATA_INTERNAL_PREFIX metadata.
file->metadata_changed doesn't need to change in that situation. It's used
by fs-metawrap to find out if it needs to rewrite metadata during a write,
but internal metadata isn't written to its header.
Timo Sirainen [Mon, 17 Oct 2016 09:41:33 +0000 (12:41 +0300)]
sdbox: Removed duplicated code.
Martti Rannanjärvi [Mon, 17 Oct 2016 07:36:17 +0000 (10:36 +0300)]
lib-dcrypt: change unit test ec curve to secp521r1
This curve is more common, so unit tests will pass on more machines.
Timo Sirainen [Mon, 17 Oct 2016 06:13:39 +0000 (09:13 +0300)]
lib-fs: Lazily initialize timings to save memory.
Aki Tuomi [Fri, 14 Oct 2016 14:13:23 +0000 (17:13 +0300)]
lib-storage: Use MAILDIR_INFO_SEP_S
Replace hardcoded : with MAILDIR_INFO_SEP_S
Aki Tuomi [Fri, 14 Oct 2016 12:28:32 +0000 (15:28 +0300)]
lib-dcrypt: Fix uninitialized memory
Martti Rannanjärvi [Fri, 14 Oct 2016 10:48:41 +0000 (13:48 +0300)]
lib-dcrypt: str_new to t_str_new in some test-crypto tests
str_new from default_pool was not properly freed.
Martti Rannanjärvi [Thu, 13 Oct 2016 20:38:36 +0000 (23:38 +0300)]
lib-dcrypt: enc_key and pw must be NULL on storing unencrypted private key
Add tests for password and key encryption, and get_info on them. Also
give examples of valid cipher values for password and key encryption in
dcrypt.h comment.
Martti Rannanjärvi [Wed, 12 Oct 2016 18:29:51 +0000 (21:29 +0300)]
lib-dcrypt: fix comment of dovecot format v2 to use colon
Version 2 field separator was changed to colon.
Aki Tuomi [Wed, 12 Oct 2016 06:54:04 +0000 (09:54 +0300)]
INSTALL: Use markdown style
Aki Tuomi [Wed, 12 Oct 2016 06:08:51 +0000 (09:08 +0300)]
README: Use markdown style
Aki Tuomi [Wed, 12 Oct 2016 06:38:05 +0000 (09:38 +0300)]
git: Ignore README and INSTALL
Aki Tuomi [Wed, 12 Oct 2016 06:36:46 +0000 (09:36 +0300)]
configure: Detect pandoc for building documentation
Aki Tuomi [Wed, 12 Oct 2016 07:30:16 +0000 (10:30 +0300)]
lib-program-client: Do not use /tmp in testing
Aki Tuomi [Wed, 12 Oct 2016 09:04:10 +0000 (12:04 +0300)]
auth: Pass userdb fields to worker
If this is not done, then those userdb handlers
that need access to userdb variables for e.g.
interpolation, cannot access them.
Timo Sirainen [Tue, 11 Oct 2016 10:18:53 +0000 (13:18 +0300)]
auth: Don't re-insert userdb results from auth cache data back to cache.
This was also breaking TTLs for the cached userdb results, because each
re-insert reset the TTL.
Timo Sirainen [Mon, 10 Oct 2016 18:22:15 +0000 (21:22 +0300)]
lib-program-client: Fixed potential panic in test-program-client-local
If the run finished before io_loop_run(), it would panic with:
Panic: BUG: No IOs or timeouts set. Not waiting for infinity.
Timo Sirainen [Mon, 10 Oct 2016 18:19:34 +0000 (21:19 +0300)]
lib-program-client: Fixed program_client_run() that succeeds rapidly.
program_client_run_async() could have called the callback with result=0
before io_loop_run(). This happened with local client.
Fixes in test-program-client-local:
Panic: BUG: No IOs or timeouts set. Not waiting for infinity.
Timo Sirainen [Mon, 10 Oct 2016 20:53:55 +0000 (23:53 +0300)]
fs-metawrap: Don't assert-crash when trying to write an empty file.
Fixes:
Panic: file fs-metawrap.c: line 401 (fs_metawrap_write_stream_finish): assertion failed: (file->super_output->offset > 0 || file->super_output->stream_errno != 0)
Timo Sirainen [Mon, 10 Oct 2016 21:31:17 +0000 (00:31 +0300)]
lib-fs: Renamed internal i_stream_mail_read() to i_stream_fs_stats_read()
Just to make backtraces look clearer. Originally forgot to change this
after copy&pasting code from istream-mail.c
Timo Sirainen [Mon, 10 Oct 2016 17:58:53 +0000 (20:58 +0300)]
lib-program-client: Fixed running test-program-client-local as root.
uid/gid == -1 isn't treated as "don't change" in here.
Timo Sirainen [Mon, 10 Oct 2016 17:35:17 +0000 (20:35 +0300)]
auth: Compiler warning fix
Matwey V. Kornilov [Wed, 21 Sep 2016 07:55:47 +0000 (10:55 +0300)]
auth: Fix default SASL bind for LDAP
User may configure Dovecot to use SASL bind as default bind method. This can
be the case when ldapi:/// (or ldaps:///) with SASL EXTERNAL is used.
Currently, Dovecot returns LDAP connection to wrong bind state after first
successful auth bind, LDAP simple bind always used to rebind. This may broke
setup when ACL in LDAP configured not to allow search/bind for such simple
bind.
Matwey V. Kornilov [Wed, 21 Sep 2016 07:50:02 +0000 (10:50 +0300)]
auth: Introduce db_ldap_bind_sasl() function
Do refactoring in db_ldap_connect() before fixing the SASL bind issue in the next commit.
Timo Sirainen [Thu, 6 Oct 2016 12:22:13 +0000 (15:22 +0300)]
doveadm director kick: Added -f <passdb field> parameter.
This works for all the user_* passdb fields.
Timo Sirainen [Thu, 6 Oct 2016 12:19:51 +0000 (15:19 +0300)]
doveadm director kick: Escape username properly.
This only mattered if the username contained \001, TAB or LF characters,
which isn't normal.
Timo Sirainen [Thu, 6 Oct 2016 12:13:30 +0000 (15:13 +0300)]
director: Escape username when handling USER-KICK.
This could have caused problems if username parameter contained TABs or LFs,
which of course shouldn't normally happen.
Timo Sirainen [Thu, 6 Oct 2016 11:54:51 +0000 (14:54 +0300)]
doveadm proxy kick: Support multiple user parameters.
Timo Sirainen [Thu, 6 Oct 2016 11:53:11 +0000 (14:53 +0300)]
doveadm proxy kick: Added -f <passdb field> parameter.
This works for all the user_* passdb fields.
Timo Sirainen [Thu, 6 Oct 2016 11:38:04 +0000 (14:38 +0300)]
doveadm proxy list: Show all user_* fields in output.
Timo Sirainen [Wed, 5 Oct 2016 20:22:56 +0000 (23:22 +0300)]
*-login: Store user_* passdb fields to client->alt_usernames.
Timo Sirainen [Mon, 10 Oct 2016 14:37:27 +0000 (17:37 +0300)]
last-login: Don't execute last_login on IMAP unhibernation.
Timo Sirainen [Mon, 10 Oct 2016 14:19:32 +0000 (17:19 +0300)]
quota: Don't execute quota_over_script if userdb lookup was over 10 secs ago
Timo Sirainen [Mon, 10 Oct 2016 14:19:16 +0000 (17:19 +0300)]
imap-hibernate: Preserve mail_user.session_create_time through hibernation
Timo Sirainen [Mon, 10 Oct 2016 14:19:06 +0000 (17:19 +0300)]
lib-storage: Added mail_user.session_create_time and .session_restored
Aki Tuomi [Thu, 6 Oct 2016 11:54:24 +0000 (14:54 +0300)]
imap-hibernate: Properly fix hibernation
The previous fix did not properly fix hibernation
as the clients still dropped out of hibernate.
Also the tag used was no longer following. This
change will track tag changes and keeps the
hibernation process going on until the user enters
something else than DONE\r\ntag IDLE\r\n in same
packet.
Timo Sirainen [Mon, 10 Oct 2016 11:42:24 +0000 (14:42 +0300)]
lib-program-client: Compiler warning fixes
Timo Sirainen [Mon, 10 Oct 2016 10:40:41 +0000 (13:40 +0300)]
cassandra: Added latency_aware_routing connect-parameter.
There's currently no way to change the default settings for it.
Timo Sirainen [Mon, 10 Oct 2016 10:59:57 +0000 (13:59 +0300)]
lmtp: Handle lmtp_user_concurrency_limit before lmtp_rcpt_check_quota
The quota lookup is more expensive, so it shouldn't be done unnecessarily.
Aki Tuomi [Fri, 7 Oct 2016 16:49:24 +0000 (19:49 +0300)]
lib-program-client: Add test suite for program client
Aki Tuomi [Sun, 9 Oct 2016 17:19:22 +0000 (20:19 +0300)]
lib-program-client: Rename remote to unix
This is to make more clear that the call requires
unix path and does not support TCP. There will be
TCP based API too later.
Aki Tuomi [Fri, 7 Oct 2016 16:48:59 +0000 (19:48 +0300)]
lib-program-client: Expose asynchronous API
Aki Tuomi [Thu, 6 Oct 2016 08:57:27 +0000 (11:57 +0300)]
lib-program-client: Whitespace fix
Aki Tuomi [Mon, 10 Oct 2016 07:37:24 +0000 (10:37 +0300)]
doveadm-sync: Document end-date flag
Aki Tuomi [Mon, 10 Oct 2016 07:36:52 +0000 (10:36 +0300)]
doveadm-sync: Add end-date support
Aki Tuomi [Mon, 10 Oct 2016 07:13:12 +0000 (10:13 +0300)]
doveadm-sync: Document start date