]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
8 years agolib, lib-master: Add error_r to t_binary_abspath
Martti Rannanjärvi [Thu, 29 Dec 2016 21:32:04 +0000 (23:32 +0200)] 
lib, lib-master: Add error_r to t_binary_abspath

8 years agolib: Add error_r to t_abspath and its callers
Martti Rannanjärvi [Thu, 29 Dec 2016 21:04:56 +0000 (23:04 +0200)] 
lib: Add error_r to t_abspath and its callers

8 years agolib: Add tests for path-util
Martti Rannanjärvi [Tue, 29 Nov 2016 18:50:28 +0000 (20:50 +0200)] 
lib: Add tests for path-util

8 years agolib: Add Pigeonhole realpath functions to path-util
Martti Rannanjärvi [Sun, 4 Dec 2016 10:13:00 +0000 (12:13 +0200)] 
lib: Add Pigeonhole realpath functions to path-util

8 years agolib: Rename t_get_current_dir to t_get_working_dir
Martti Rannanjärvi [Sun, 4 Dec 2016 10:52:51 +0000 (12:52 +0200)] 
lib: Rename t_get_current_dir to t_get_working_dir

Also add an error_r parameter that cannot be NULL.

8 years agolib: Add error_r to t_readlink and its callers
Martti Rannanjärvi [Sun, 4 Dec 2016 10:47:22 +0000 (12:47 +0200)] 
lib: Add error_r to t_readlink and its callers

8 years agolib: Add asserts to t_abspath and t_abspath_to
Martti Rannanjärvi [Wed, 30 Nov 2016 10:03:30 +0000 (12:03 +0200)] 
lib: Add asserts to t_abspath and t_abspath_to

8 years agolib: Rename abspath to path-util
Martti Rannanjärvi [Wed, 30 Nov 2016 06:40:40 +0000 (08:40 +0200)] 
lib: Rename abspath to path-util

8 years agolib-imap: Fix compiler warning
Timo Sirainen [Mon, 30 Jan 2017 16:29:36 +0000 (18:29 +0200)] 
lib-imap: Fix compiler warning

Unnecessary, but older gcc complains.

8 years agolib-imap: Created test-imap-envelope.
Stephan Bosch [Sat, 14 Jan 2017 12:33:05 +0000 (13:33 +0100)] 
lib-imap: Created test-imap-envelope.

8 years agolib-imap: imap-envelope: Added function for parsing ENVELOPE from string.
Stephan Bosch [Thu, 29 Dec 2016 13:02:05 +0000 (14:02 +0100)] 
lib-imap: imap-envelope: Added function for parsing ENVELOPE from string.

8 years agolib-imap: Added more comments to imap-bodystructure and imap-envelope.
Stephan Bosch [Wed, 26 Oct 2016 21:44:47 +0000 (23:44 +0200)] 
lib-imap: Added more comments to imap-bodystructure and imap-envelope.

8 years agolib-imap: imap-bodystructure: Added support for making imap_bodystructure_parse(...
Stephan Bosch [Sun, 23 Oct 2016 23:45:18 +0000 (01:45 +0200)] 
lib-imap: imap-bodystructure: Added support for making imap_bodystructure_parse() work without a pre-existing message_part tree.

It can now create the tree from the BODYSTRUCTURE string itself.

8 years agolib-mail: message-part-data: Implemented message_part_data_get_filename().
Stephan Bosch [Sun, 23 Oct 2016 23:01:19 +0000 (01:01 +0200)] 
lib-mail: message-part-data: Implemented message_part_data_get_filename().

Gets the message part's filename if it has any.

8 years agolib-mail: message-part-data: Renamed struct message_part_envelope_data to message_par...
Stephan Bosch [Sun, 23 Oct 2016 22:19:05 +0000 (00:19 +0200)] 
lib-mail: message-part-data: Renamed struct message_part_envelope_data to message_part_envelope.

8 years agolib-imap: imap-envelope: Moved imap_envelope_headers to lib-mail/message-part-data...
Stephan Bosch [Sun, 23 Oct 2016 20:29:49 +0000 (22:29 +0200)] 
lib-imap: imap-envelope: Moved imap_envelope_headers to lib-mail/message-part-data as message_part_envelope_headers.

8 years agolib-imap: imap-bodystructure: Moved message_part_data header parsing and query functi...
Stephan Bosch [Sun, 23 Oct 2016 18:05:33 +0000 (20:05 +0200)] 
lib-imap: imap-bodystructure: Moved message_part_data header parsing and query functions to their own module in lib-mail.

Moved code from imap-bodystructure and imap-envelope.

8 years agolib-imap: imap-bodystructure: Renamed imap_bodystructure_is_plain_7bit() to message_p...
Stephan Bosch [Sun, 23 Oct 2016 17:47:12 +0000 (19:47 +0200)] 
lib-imap: imap-bodystructure: Renamed imap_bodystructure_is_plain_7bit() to message_part_data_is_plain_7bit().

8 years agolib-imap: imap-envelope: Renamed imap_envelope_parse_header() to message_part_envelop...
Stephan Bosch [Sun, 23 Oct 2016 17:00:10 +0000 (19:00 +0200)] 
lib-imap: imap-envelope: Renamed imap_envelope_parse_header() to message_part_envelope_parse_from_header().

8 years agolib-imap: imap-evenvelope: Changed imap_envelope_get_field() into a private equivalent.
Stephan Bosch [Sun, 23 Oct 2016 16:10:01 +0000 (18:10 +0200)] 
lib-imap: imap-evenvelope: Changed imap_envelope_get_field() into a private equivalent.

8 years agolib-imap: imap-bodystructure: Renamed imap_bodystructure_parse_header() to message_pa...
Stephan Bosch [Sun, 23 Oct 2016 15:51:59 +0000 (17:51 +0200)] 
lib-imap: imap-bodystructure: Renamed imap_bodystructure_parse_header() to message_part_data_parse_from_header().

8 years agolib-imap: imap-bodystructure: Grouped together functions relating to the conversion...
Stephan Bosch [Sun, 23 Oct 2016 15:27:07 +0000 (17:27 +0200)] 
lib-imap: imap-bodystructure: Grouped together functions relating to the conversion of BODYSTRUCTURE to BODY.

This only moves code.

8 years agolib-imap: imap-bodystructure: Changed struct message_part_body to contain fully decod...
Stephan Bosch [Sun, 23 Oct 2016 14:50:25 +0000 (16:50 +0200)] 
lib-imap: imap-bodystructure: Changed struct message_part_body to contain fully decoded data.

Contained unparsed IMAP string data before.

8 years agolib-imap: imap-envelope: Added function to parse struct message_part_envelope_data...
Stephan Bosch [Sun, 23 Oct 2016 14:49:37 +0000 (16:49 +0200)] 
lib-imap: imap-envelope: Added function to parse struct message_part_envelope_data from parsed imap args.

8 years agolib-imap: imap-bodystructure: Renamed `d' parameter to `data' in parse_content_header...
Stephan Bosch [Sun, 23 Oct 2016 12:06:44 +0000 (14:06 +0200)] 
lib-imap: imap-bodystructure: Renamed `d' parameter to `data' in parse_content_header() function.

8 years agolib-imap: imap-envelope: Removed useless pool field from struct message_part_envelope...
Stephan Bosch [Sun, 23 Oct 2016 11:52:10 +0000 (13:52 +0200)] 
lib-imap: imap-envelope: Removed useless pool field from struct message_part_envelope_data.

8 years agolib-imap: imap-bodystructure: Removed useless pool field from struct message_part_data.
Stephan Bosch [Sun, 23 Oct 2016 11:50:05 +0000 (13:50 +0200)] 
lib-imap: imap-bodystructure: Removed useless pool field from struct message_part_data.

8 years agolib-mail: Gave message_part_data its own field in struct message_part.
Stephan Bosch [Sun, 23 Oct 2016 11:29:43 +0000 (13:29 +0200)] 
lib-mail: Gave message_part_data its own field in struct message_part.

8 years agolib-imap: imap-bodystructure: Renamed struct message_part_body_data to message_part_data.
Stephan Bosch [Sun, 23 Oct 2016 11:10:11 +0000 (13:10 +0200)] 
lib-imap: imap-bodystructure: Renamed struct message_part_body_data to message_part_data.

8 years agolib-imap: Removed existing envelope parsing function.
Stephan Bosch [Sun, 23 Oct 2016 10:10:44 +0000 (12:10 +0200)] 
lib-imap: Removed existing envelope parsing function.

This is currently only used by imaptest. Alternative API is provided in later commit.

8 years agolib-imap: test-imap-bodystructure: Added normalization tests.
Stephan Bosch [Sun, 8 Jan 2017 11:00:15 +0000 (12:00 +0100)] 
lib-imap: test-imap-bodystructure: Added normalization tests.

8 years agolib-imap: imap-bodystructure: Allow alternative syntax and omitted optional elements...
Stephan Bosch [Mon, 9 Jan 2017 01:03:25 +0000 (02:03 +0100)] 
lib-imap: imap-bodystructure: Allow alternative syntax and omitted optional elements in parser input.

This makes the parser accept any RFC-compliant BODYSTRUCTURE syntax, instead of only what Dovecot itself produces.
This way the parser could reliably be used in the lib-imap-client if ever needed.

8 years agolib-imap: test-imap-bodystructure: Added more tests.
Stephan Bosch [Mon, 9 Jan 2017 15:29:26 +0000 (16:29 +0100)] 
lib-imap: test-imap-bodystructure: Added more tests.

8 years agolib-imap: test-imap-bodystructure: Improved handing of parse errors.
Stephan Bosch [Mon, 9 Jan 2017 15:20:29 +0000 (16:20 +0100)] 
lib-imap: test-imap-bodystructure: Improved handing of parse errors.

Actually show the parse error.

8 years agolib-imap: test-imap-bodystructure: Added support for more than one test case.
Stephan Bosch [Mon, 9 Jan 2017 15:16:46 +0000 (16:16 +0100)] 
lib-imap: test-imap-bodystructure: Added support for more than one test case.

8 years agolib-imap: imap-bodystructure: Fixed parse error message about invalid Content-M5...
Stephan Bosch [Sun, 8 Jan 2017 21:50:02 +0000 (22:50 +0100)] 
lib-imap: imap-bodystructure: Fixed parse error message about invalid Content-M5 field.

8 years agolib-storage: Set vsize extension when copying mails.
Timo Sirainen [Mon, 30 Jan 2017 13:12:04 +0000 (15:12 +0200)] 
lib-storage: Set vsize extension when copying mails.

8 years agolib-storage: Add index_mail_get_vsize_extension()
Timo Sirainen [Mon, 30 Jan 2017 13:11:45 +0000 (15:11 +0200)] 
lib-storage: Add index_mail_get_vsize_extension()

8 years agolib-storage: Move index_mail.vsize_ext_id to mailbox.mail_vsize_ext_id
Timo Sirainen [Mon, 30 Jan 2017 13:06:46 +0000 (15:06 +0200)] 
lib-storage: Move index_mail.vsize_ext_id to mailbox.mail_vsize_ext_id

It's mailbox-specific, so it doesn't have to be looked up every time.
Also this is needed for the following fix.

8 years agoimapc: Allow using LAYOUT=none without crashing.
Timo Sirainen [Wed, 14 Dec 2016 16:13:25 +0000 (18:13 +0200)] 
imapc: Allow using LAYOUT=none without crashing.

8 years agoimap: Don't unregister internal commands at deinit.
Timo Sirainen [Sat, 28 Jan 2017 22:24:33 +0000 (00:24 +0200)] 
imap: Don't unregister internal commands at deinit.

This allows plugins to unregister commands without errors being logged.

8 years agolib-storage: Lock autoexpunging so only a single process does it.
Timo Sirainen [Thu, 26 Jan 2017 20:42:09 +0000 (22:42 +0200)] 
lib-storage: Lock autoexpunging so only a single process does it.

This hopefully helps to avoid duplicates with lazy_expunge plugin.

8 years agoimap: Use struct mailbox_status.flags for FLAGS reply
Timo Sirainen [Sat, 28 Jan 2017 23:08:23 +0000 (01:08 +0200)] 
imap: Use struct mailbox_status.flags for FLAGS reply

8 years agolib-storage: Add struct mailbox_status.flags
Timo Sirainen [Sat, 28 Jan 2017 23:06:55 +0000 (01:06 +0200)] 
lib-storage: Add struct mailbox_status.flags

This is similar to permanent_flags, except it tells which flags can be
changed at all in the session. Mainly it allows plugins to make changes to
IMAP's untagged FLAGS reply.

8 years agolib: io_loop_set_current() - do nothing if ioloop doesn't change
Timo Sirainen [Fri, 27 Jan 2017 19:36:14 +0000 (21:36 +0200)] 
lib: io_loop_set_current() - do nothing if ioloop doesn't change

There's no need to call the switch callbacks if the ioloop doesn't change.

8 years agodoveadm: add doveadm_http_rawlog_dir setting
Martti Rannanjärvi [Fri, 27 Jan 2017 11:56:30 +0000 (13:56 +0200)] 
doveadm: add doveadm_http_rawlog_dir setting

8 years agolib-fts: Fix assert-crash in fts_icu_lcase()
Timo Sirainen [Tue, 24 Jan 2017 15:18:07 +0000 (17:18 +0200)] 
lib-fts: Fix assert-crash in fts_icu_lcase()

Fixes:
Panic: file fts-icu.c: line 152 (fts_icu_lcase): assertion failed: (err != U_BUFFER_OVERFLOW_ERROR)

8 years agolib-storage: Fix comparison to use virtual size instead of body virtual size
Aki Tuomi [Fri, 27 Jan 2017 07:41:36 +0000 (09:41 +0200)] 
lib-storage: Fix comparison to use virtual size instead of body virtual size

Was forgotten on 7f1ecb14

8 years agolib-index: Don't log error on dovecot.index.cache delete if it doesn't exist
Timo Sirainen [Thu, 26 Jan 2017 07:55:22 +0000 (09:55 +0200)] 
lib-index: Don't log error on dovecot.index.cache delete if it doesn't exist

For example if a cache is marked as corrupted and there is no cache, it's
not really an error that it doesn't exist.

Fixes:
Error: unlink(.../dovecot.index.cache) failed: No such file or directory (in mail-cache.c:29)

8 years agolib-storage: Filling vsize to index on read used wrong size
Timo Sirainen [Thu, 26 Jan 2017 17:51:34 +0000 (19:51 +0200)] 
lib-storage: Filling vsize to index on read used wrong size

8 years agolib-storage: Clear virtual size from index if size is corrupted
Aki Tuomi [Thu, 26 Jan 2017 07:42:26 +0000 (09:42 +0200)] 
lib-storage: Clear virtual size from index if size is corrupted

8 years agofts: Fix search query generation when tokens are filtered out.
Timo Sirainen [Sat, 14 Jan 2017 16:34:11 +0000 (18:34 +0200)] 
fts: Fix search query generation when tokens are filtered out.

For example with English stopwords when searching "foo and bar" it should
be equilevant to "foo bar", since "and" is filtered out.

8 years agolib: Add t_hash helpers for hashing
Aki Tuomi [Mon, 9 Jan 2017 08:43:01 +0000 (10:43 +0200)] 
lib: Add t_hash helpers for hashing

8 years agolib-dict: Fix test-dict-sql in out-of-tree build
Aki Tuomi [Wed, 25 Jan 2017 08:11:05 +0000 (10:11 +0200)] 
lib-dict: Fix test-dict-sql in out-of-tree build

8 years agolib-dict: Add unit tests
Aki Tuomi [Mon, 16 Jan 2017 13:31:10 +0000 (15:31 +0200)] 
lib-dict: Add unit tests

8 years agolib-sql: Add test driver
Aki Tuomi [Mon, 16 Jan 2017 13:30:14 +0000 (15:30 +0200)] 
lib-sql: Add test driver

Mock SQL driver

8 years agodict-sql: Fix iterator to not fail
Aki Tuomi [Tue, 17 Jan 2017 07:59:54 +0000 (09:59 +0200)] 
dict-sql: Fix iterator to not fail

When iterating a prefix without exact key flag,
do not fail when no more maps are matched if at least
one map has already matched.

Fixes
Error: dict_iterate_deinit failed: sql dict iterate failed for ...: Invalid/unmapped path

8 years agodict-sql: Move struct sql_dict to header
Aki Tuomi [Mon, 16 Jan 2017 13:29:25 +0000 (15:29 +0200)] 
dict-sql: Move struct sql_dict to header

This allows dereferencing it on test programs

8 years agodict-sql: Do not increment on set
Aki Tuomi [Mon, 16 Jan 2017 12:01:57 +0000 (14:01 +0200)] 
dict-sql: Do not increment on set

When merging sets do not use increment mode in builder.

8 years agodirector: "doveadm director move" to same host now refreshes user's timeout
Timo Sirainen [Mon, 23 Jan 2017 16:02:05 +0000 (18:02 +0200)] 
director: "doveadm director move" to same host now refreshes user's timeout

This allows keeping user constantly in the same backend by just periodically
moving the user there.

8 years agoglobal: Update http_server_request_set_destroy_callback usage
Aki Tuomi [Tue, 24 Jan 2017 07:56:29 +0000 (09:56 +0200)] 
global: Update http_server_request_set_destroy_callback usage

8 years agolib-http: Improve http_server_request_set_destroy_callback API
Aki Tuomi [Tue, 24 Jan 2017 07:55:49 +0000 (09:55 +0200)] 
lib-http: Improve http_server_request_set_destroy_callback API

It now allows using non-void* context

8 years agoglobal: Update http_client_request_set_destroy_callback usage
Aki Tuomi [Sun, 22 Jan 2017 15:58:55 +0000 (17:58 +0200)] 
global: Update http_client_request_set_destroy_callback usage

8 years agolib-http: Improve http_client_request_set_destroy_callback
Aki Tuomi [Sun, 22 Jan 2017 15:56:19 +0000 (17:56 +0200)] 
lib-http: Improve http_client_request_set_destroy_callback

It now allows using non-void* context

8 years agolib-http: client: Fixed handling of errors occurring for unsubmitted requests during...
Stephan Bosch [Sun, 22 Jan 2017 22:55:24 +0000 (23:55 +0100)] 
lib-http: client: Fixed handling of errors occurring for unsubmitted requests during http_client_request_send_payload().

When http_client_request_send_payload() is executed for the first time, the request is submitted.
Errors occurring during submission don't trigger a callback immediately.
Instead, these are queued in the client and will trigger a callback when an ioloop is run with the client.
However, in http_client_request_send_payload() the ioloop is never executed when the request fails that way, meaning that
the callback was never called. Since for example SOLR assumes the callback is always called for an error in
http_client_request_send_payload(), this causes all kinds of problems.

Fixed by manually handling the delayed request errors in http_client_request_send_payload() explicitly.

8 years agolib-sasl: Add OAUTHBEARER and XOAUTH2 mechanism
Aki Tuomi [Wed, 18 Jan 2017 11:46:12 +0000 (13:46 +0200)] 
lib-sasl: Add OAUTHBEARER and XOAUTH2 mechanism

8 years agolib-sasl: Add API for setting and getting extra values
Aki Tuomi [Wed, 18 Jan 2017 11:45:27 +0000 (13:45 +0200)] 
lib-sasl: Add API for setting and getting extra values

This allows setting extra parameters for authentication
and recovering extended result information from
mechanism.

8 years agoimapc: Fix assert-crash on some connect failures
Timo Sirainen [Fri, 20 Jan 2017 16:19:05 +0000 (18:19 +0200)] 
imapc: Fix assert-crash on some connect failures

imapc_storage_has_modseqs() causes imapc_client_get_capabilities() to be
called, which assert-crashes if there isn't a valid connection:

Panic: file imapc-client.c: line 438 (imapc_client_get_capabilities): assertion failed: (conn != NULL)

8 years agodirector: Add more debug logging for moving & killing users
Timo Sirainen [Fri, 20 Jan 2017 13:57:10 +0000 (15:57 +0200)] 
director: Add more debug logging for moving & killing users

8 years agodirector: Fix USER-MOVE getting stuck if a director already uses the correct host
Timo Sirainen [Fri, 20 Jan 2017 14:06:48 +0000 (16:06 +0200)] 
director: Fix USER-MOVE getting stuck if a director already uses the correct host

8 years agodirector: Ignore doveadm user move if host is already the same.
Timo Sirainen [Fri, 20 Jan 2017 14:03:12 +0000 (16:03 +0200)] 
director: Ignore doveadm user move if host is already the same.

8 years agodirector: Make sure USER-KILLED isn't sent before USER-MOVE
Timo Sirainen [Fri, 20 Jan 2017 13:54:27 +0000 (15:54 +0200)] 
director: Make sure USER-KILLED isn't sent before USER-MOVE

If USER-MOVE was for a user that didn't exist, killing sent USER-KILLED
immediately before the forwarding USER-MOVE. This caused the move to get
stuck, giving errors like:

director: Error: Finishing user 3224731354 move timed out, its state may now be inconsistent (state=waiting-for-everyone)

8 years agodirector: Add assert to make sure USER-MOVE doesn't change tag
Timo Sirainen [Fri, 20 Jan 2017 13:52:43 +0000 (15:52 +0200)] 
director: Add assert to make sure USER-MOVE doesn't change tag

8 years agolib-storage: Copy cache decisions from inbox on create
Aki Tuomi [Tue, 27 Dec 2016 07:45:58 +0000 (09:45 +0200)] 
lib-storage: Copy cache decisions from inbox on create

Otherwise the decisions are definitely wrong, since
they are nonexistent. Copying from INBOX would make sense.

8 years agolib-index: Add mail_cache_decisions_copy
Aki Tuomi [Tue, 27 Dec 2016 07:44:52 +0000 (09:44 +0200)] 
lib-index: Add mail_cache_decisions_copy

This allows priming cache decisions for a folder.

8 years agolib-index: Unconstify mail_cache_register_get_list
Aki Tuomi [Tue, 3 Jan 2017 10:50:58 +0000 (12:50 +0200)] 
lib-index: Unconstify mail_cache_register_get_list

This way the result is usable as input for
mail_cache_register_fields.

8 years agolib-storage: Fix mailbox's vsize header check for mailboxes not in dovecot.list.index
Timo Sirainen [Fri, 20 Jan 2017 12:46:30 +0000 (14:46 +0200)] 
lib-storage: Fix mailbox's vsize header check for mailboxes not in dovecot.list.index

If mailbox wasn't yet in the dovecot.list.index, mailbox_list_index_status()
for it returns FALSE and doesn't initialize the status. In some situations this
may have caused a non-empty mailbox's vsize to be returned as 0.

8 years agossl: add ssl_curve_list setting for selecting ECHDE curves
Juha Koho [Mon, 10 Oct 2016 22:13:49 +0000 (00:13 +0200)] 
ssl: add ssl_curve_list setting for selecting ECHDE curves

8 years agolib-http: client: Make sure req->conn is only not NULL when that connection holds...
Stephan Bosch [Tue, 10 Jan 2017 01:12:25 +0000 (02:12 +0100)] 
lib-http: client: Make sure req->conn is only not NULL when that connection holds a reference to that request.

This consolidates the management of req->conn to one place, thereby preventing mishaps.
It makes sure req->conn is always properly assigned, making it more reliable.
This fixes a problem that emerged in the http-proxy.

8 years agolib-http: client: Keep connection reference throughout http_client_connection_return_...
Stephan Bosch [Thu, 19 Jan 2017 01:16:06 +0000 (02:16 +0100)] 
lib-http: client: Keep connection reference throughout http_client_connection_return_response().

Before, it was held in two intervals.
Next commit requires this change, but it also simplifies this function significantly.

8 years agomaster: Remove unnecessary service listener start
Timo Sirainen [Tue, 17 Jan 2017 17:49:39 +0000 (19:49 +0200)] 
master: Remove unnecessary service listener start

The listening was already started later on in the same function. Also
in some cases it would have been started unnecessarily, like when service
was stopped or more processes were created immediately.

8 years agodoc: add ssl_dh to example-config
Martti Rannanjärvi [Fri, 30 Dec 2016 08:20:32 +0000 (10:20 +0200)] 
doc: add ssl_dh to example-config

8 years agoindex: don't try to unlink in-memory cache file
Josef 'Jeff' Sipek [Wed, 18 Jan 2017 09:46:15 +0000 (04:46 -0500)] 
index: don't try to unlink in-memory cache file

Avoid these errors:

Error: unlink((in-memory index).cache) failed: No such file or directory (in mail-cache.c:29)

8 years agodoveadm direcor add: Fix checking number as hostname.
Timo Sirainen [Tue, 17 Jan 2017 18:34:51 +0000 (20:34 +0200)] 
doveadm direcor add: Fix checking number as hostname.

521c0460fe705f32ea6899c8b1f101043fe0898c was completely broken.

8 years agodoveconf: Don't read freed memory.
Timo Sirainen [Tue, 17 Jan 2017 18:03:40 +0000 (20:03 +0200)] 
doveconf: Don't read freed memory.

Giving -c parameter frees the returned orig_config_path.

8 years agodoveadm direcor add: Don't accept number as a valid hostname.
Timo Sirainen [Tue, 17 Jan 2017 13:22:44 +0000 (15:22 +0200)] 
doveadm direcor add: Don't accept number as a valid hostname.

This is usually a mistake. For example "doveadm director add -t host 100"
shouldn't be adding a new IP 100 (0.0.0.100)

8 years agostats plugin: Fix /proc/self/io fd leak on plugin deinit
Timo Sirainen [Tue, 17 Jan 2017 14:28:10 +0000 (16:28 +0200)] 
stats plugin: Fix /proc/self/io fd leak on plugin deinit

This could have been a problem with doveadm-server processes if they had
service_count>1, because doveadm unloads all plugins between commands.

8 years agodoveadm: Outgoing dsync TCP connections leaked socket
Timo Sirainen [Tue, 17 Jan 2017 14:23:50 +0000 (16:23 +0200)] 
doveadm: Outgoing dsync TCP connections leaked socket

If doveadm-server was running with service_count>1, each dsync run leaked a
socket.

8 years agolib-dict: Compiler warning fix
Timo Sirainen [Tue, 17 Jan 2017 17:21:08 +0000 (19:21 +0200)] 
lib-dict: Compiler warning fix

8 years agodict-file: Fix potential crash when doing other dict calls during iteration.
Timo Sirainen [Mon, 16 Jan 2017 14:58:31 +0000 (16:58 +0200)] 
dict-file: Fix potential crash when doing other dict calls during iteration.

If file was refreshed, the hash table was cleared, which broke the existing
iterators.

8 years agolib-dict: Add assert to make sure all iterators are deinitialized.
Timo Sirainen [Mon, 16 Jan 2017 15:12:41 +0000 (17:12 +0200)] 
lib-dict: Add assert to make sure all iterators are deinitialized.

8 years agolib: Add asserts to make sure hash table isn't freed while it's frozen.
Timo Sirainen [Mon, 16 Jan 2017 14:57:21 +0000 (16:57 +0200)] 
lib: Add asserts to make sure hash table isn't freed while it's frozen.

8 years agofts-solr: Escape {} chars when sending queries
Timo Sirainen [Mon, 16 Jan 2017 21:55:17 +0000 (23:55 +0200)] 
fts-solr: Escape {} chars when sending queries

Fixes:
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Based on patch by Michael Welsh Duggan

8 years agolib-http: server: Do not generate a payload for a failure response for a HEAD request.
Stephan Bosch [Tue, 17 Jan 2017 00:37:25 +0000 (01:37 +0100)] 
lib-http: server: Do not generate a payload for a failure response for a HEAD request.

8 years agolib-http: server: Prevent sending response payload when it is not allowed by the...
Stephan Bosch [Tue, 17 Jan 2017 00:36:10 +0000 (01:36 +0100)] 
lib-http: server: Prevent sending response payload when it is not allowed by the specification.

For a HEAD request, the payload is omitted, but the associated headers are generated.
For the other cases, an assert failure is now triggered.

8 years agodict-sql: Fix flushing
Aki Tuomi [Mon, 16 Jan 2017 07:37:05 +0000 (09:37 +0200)] 
dict-sql: Fix flushing

Remove flushing from set, and add it to unset. Fixes
signal 11 crash caused by infinite recursion.

8 years agolib-storage: Add vsize extension to index
Aki Tuomi [Tue, 3 Jan 2017 15:21:33 +0000 (17:21 +0200)] 
lib-storage: Add vsize extension to index

Keep virtual size in index, instead of cache
when it's less than 2^32-1. This helps when
cache becomes corrupted, and goes away, we
still have virtual sizes for quota calculations.

8 years agolib-storage: Fix assert-crash on mailbox_copy/move() failure
Timo Sirainen [Sun, 15 Jan 2017 17:56:32 +0000 (19:56 +0200)] 
lib-storage: Fix assert-crash on mailbox_copy/move() failure

If mailbox_save_cancel() was being called outside mail_storage_copy()
it assert-crashed:

Panic: file mail-storage.c: line 2168 (mailbox_save_context_reset): assertion failed: (ctx->copying_via_save)

8 years agolib-storage: If namespaces weren't successfully created, don't autoexpunge at deinit.
Timo Sirainen [Sat, 14 Jan 2017 14:11:37 +0000 (16:11 +0200)] 
lib-storage: If namespaces weren't successfully created, don't autoexpunge at deinit.

8 years agolib-storage: Add struct mail_user.namespaces_created
Timo Sirainen [Sat, 14 Jan 2017 14:12:56 +0000 (16:12 +0200)] 
lib-storage: Add struct mail_user.namespaces_created

This makes it easier to determine in mail_namespaces_added hook if the
namespaces being added are the initial ones or later ones.