]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Tue, 21 Jan 2020 13:54:42 +0000 (15:54 +0200)]
lib-fs: Use fs_set_error_errno() where appropriate
Timo Sirainen [Tue, 21 Jan 2020 13:50:07 +0000 (15:50 +0200)]
lib-fs: Add fs_set_error_errno()
This is in preparation for adding errno parameter for fs_set_error().
Siavash Tavakoli [Mon, 13 Jan 2020 09:50:51 +0000 (11:50 +0200)]
doc: example-config: Add documentation for "revision" field in imap_id_send
Siavash Tavakoli [Mon, 9 Dec 2019 11:58:50 +0000 (13:58 +0200)]
lib-imap: Add revision field for ID command
Returns short commit ID of the revision dovecot was built from.
Timo Sirainen [Mon, 20 Jan 2020 14:15:41 +0000 (16:15 +0200)]
lib-fs: Fix event leak when EAGAIN error is logged via fs_set_error()
Broken by
f7aafd832151dd34e28cb1bba214accf9b15d908
Timo Sirainen [Tue, 14 Jan 2020 21:28:53 +0000 (23:28 +0200)]
lib-fs: Don't log "Asynchronous operation in progress" debug messages
Timo Sirainen [Thu, 28 Nov 2019 18:30:08 +0000 (20:30 +0200)]
lazy-expunge: Track duplicate messages using REFCOUNT_ID rather than GUID
Although these are usually the same, that's not really guaranteed.
Also REFCOUNT_ID can be more efficient to lookup than GUID.
Timo Sirainen [Thu, 28 Nov 2019 18:28:35 +0000 (20:28 +0200)]
lib-storage: Add MAIL_FETCH_REFCOUNT_ID
This returns a unique ID for the mail that is counted by
MAIL_FETCH_REFCOUNT. For example if the refcount is counted using the
file's st_nlinks, then the refcount-id is the file's inode number. This is
likely only going to be used by lazy_expunge_only_last_instance=yes
tracking.
Timo Sirainen [Tue, 3 Dec 2019 22:45:34 +0000 (00:45 +0200)]
lib-ssl-iostream: Don't link unit test with -static
It's not useful and it breaks in some systems.
Stephan Bosch [Tue, 8 Oct 2019 16:57:02 +0000 (18:57 +0200)]
plugins: fts-solr: solr-response - Fix incremental parsing of XML element data in small chunks.
Stephan Bosch [Tue, 8 Oct 2019 16:57:00 +0000 (18:57 +0200)]
plugins: fts-solr: solr-response - Use strnum.h for numeric parsing.
Stephan Bosch [Tue, 8 Oct 2019 16:57:00 +0000 (18:57 +0200)]
plugins: fts-solr: solr-response - Make lookup response parser a separate entity.
This improves the structure of the code and allows writing a unit test for the
parser, which is included in this commit.
Stephan Bosch [Tue, 8 Oct 2019 16:57:00 +0000 (18:57 +0200)]
plugins: fts-solr: solr-reponse - Move init/deinit of struct solr_response_parser to separate functions.
Stephan Bosch [Tue, 8 Oct 2019 16:56:59 +0000 (18:56 +0200)]
plugins: fts-solr: solr-connection - Use i_stream_get_error() for reporting stream errors.
Stephan Bosch [Tue, 8 Oct 2019 16:56:59 +0000 (18:56 +0200)]
plugins: fts-solr: Move xml_parser field from struct solr_connection to struct solr_response_parser.
Stephan Bosch [Tue, 8 Oct 2019 16:56:59 +0000 (18:56 +0200)]
plugins: fts-solr: solr-response - Rename struct solr_lookup_xml_context to struct solr_response_parser.
Also rename the variable names accordingly.
Stephan Bosch [Tue, 8 Oct 2019 16:56:58 +0000 (18:56 +0200)]
plugins: fts-solr: solr-connection - Remove useless XML_ParserReset() calls.
Stephan Bosch [Tue, 8 Oct 2019 16:56:58 +0000 (18:56 +0200)]
plugins: fts-solr: solr-connection - Put all update context data in struct solr_connection_post.
Stephan Bosch [Tue, 8 Oct 2019 16:56:58 +0000 (18:56 +0200)]
plugins: fts-solr: solr-connection - Move lookup context data to separate struct.
Stephan Bosch [Tue, 8 Oct 2019 16:56:57 +0000 (18:56 +0200)]
plugins: fts-solr: Move solr_lookup_xml_data() from solr-connection.c to solr-response.c.
Stephan Bosch [Tue, 8 Oct 2019 16:56:57 +0000 (18:56 +0200)]
plugins: fts-solr: Move solr_lookup_xml_end() from solr-connection.c to solr-response.c.
Stephan Bosch [Tue, 8 Oct 2019 16:56:56 +0000 (18:56 +0200)]
plugins: fts-solr: Move solr_lookup_add_doc() from solr-connection.c to solr-response.c.
Stephan Bosch [Tue, 8 Oct 2019 16:56:55 +0000 (18:56 +0200)]
plugins: fts-solr: Move solr_result_get() from solr-connection.c to solr-response.c.
Stephan Bosch [Tue, 8 Oct 2019 16:56:55 +0000 (18:56 +0200)]
plugins: fts-solr: Move solr_lookup_xml_start() from solr-connection.c to solr-response.c.
Stephan Bosch [Tue, 8 Oct 2019 16:56:54 +0000 (18:56 +0200)]
plugins: fts-solr: Move solr_xml_parse() from solr-connection.c to solr-response.c.
Stephan Bosch [Tue, 8 Oct 2019 16:56:54 +0000 (18:56 +0200)]
plugins: fts-solr: Move definition of struct solr_lookup_xml_context from solr-connection.c to solr-response.c.
Stephan Bosch [Tue, 8 Oct 2019 16:56:53 +0000 (18:56 +0200)]
plugins: fts-solr: Move definition of struct solr_result from solr-connection.h to solr-response.h.
Stephan Bosch [Tue, 8 Oct 2019 16:56:51 +0000 (18:56 +0200)]
plugins: fts-solr: Reformat solr-connection.c.
Sina Tavakoli [Wed, 8 Jan 2020 11:13:18 +0000 (13:13 +0200)]
lib-master: master-login-auth - Fix master_login_auth_request leakage
Sina Tavakoli [Wed, 8 Jan 2020 11:10:34 +0000 (13:10 +0200)]
lib-master: master-login-auth - Fix auth lookup privilege problem when imap process is reused and user is un-hibernated.
Sina Tavakoli [Wed, 8 Jan 2020 11:05:20 +0000 (13:05 +0200)]
lib-test: test-common - Add "test_expect_error_string_n_times" function to expect an error output for an arbitrary times.
Sina Tavakoli [Wed, 8 Jan 2020 11:02:23 +0000 (13:02 +0200)]
lib-master: master-login-auth - Reformat unnecessary semicolon
Timo Sirainen [Wed, 11 Dec 2019 12:10:12 +0000 (14:10 +0200)]
lib-master: Simplify auth-master connection code
For UNIX sockets the client_connected callback is always called immediately
after successful connection_client_connect(). So we might as well directly
add auth->connected=TRUE after it succeeds without having to go through the
callback.
If the callback had been called later, the current code would have been
broken because it already assumed that auth->connected=TRUE is set
immediately after returning from master_login_auth_connect(). So this
change just makes it clearer what happens and what is required.
Timo Sirainen [Thu, 2 Jan 2020 18:20:24 +0000 (20:20 +0200)]
stats: Make sure unit tests don't fail with fast CPUs
Martti Rannanjärvi [Mon, 23 Dec 2019 11:59:48 +0000 (13:59 +0200)]
run-test-valgrind.supp: Drop fun:*msync from libunwind suppression
This is either fun:__msync_nocancel or fun:msync, and hopefully the
suppression here works for both.
Martti Rannanjärvi [Mon, 23 Dec 2019 10:36:13 +0000 (12:36 +0200)]
m4: Always generate suppressions with valgrind
Aki Tuomi [Fri, 20 Dec 2019 10:31:17 +0000 (12:31 +0200)]
stats: Output multi level sub-metrics correctly
Aki Tuomi [Mon, 9 Dec 2019 17:57:32 +0000 (19:57 +0200)]
stats: Add unit test for group by
Aki Tuomi [Mon, 9 Dec 2019 13:17:48 +0000 (15:17 +0200)]
stats: Add initial unit tests
Aki Tuomi [Sun, 1 Dec 2019 14:06:25 +0000 (16:06 +0200)]
stats: Implement group_by
group_by allows dynamic creation of sub-metrics for metric.
Example:
metric imap_command {
event_name = imap_command_finished
group_by = cmd_name tagged_reply_state
}
will generate following metrics
imap_command_select_ok
imap_command_select_bad
imap_command_select_no
etc.
based on what sort of events come in. new metrics are generated
when event comes in and then they are tracked.
only strings can be used for group_by for now.
Aki Tuomi [Sun, 1 Dec 2019 14:06:42 +0000 (16:06 +0200)]
stats: Dump sub-metrics
Aki Tuomi [Sun, 1 Dec 2019 16:24:01 +0000 (18:24 +0200)]
stats: Add sub-metrics to metrics
Needed by next commit
Aki Tuomi [Sun, 1 Dec 2019 14:51:15 +0000 (16:51 +0200)]
stats: Move metric initialization to stats_metric_alloc()
Aki Tuomi [Wed, 4 Dec 2019 12:00:37 +0000 (14:00 +0200)]
stats: Add data stack frames when handling events
Reduces memory usage
Timo Sirainen [Thu, 12 Dec 2019 10:36:23 +0000 (12:36 +0200)]
lib-storage: Always fix inconsistency when syncing private flags index
The flags index can't be fully synced with the main index at all times
anyway, so don't even try. Just fully sync it always and fix any found
inconsistencies.
Fixes:
Error: dovecot.index.pvt reset, view is now inconsistent
Timo Sirainen [Thu, 12 Dec 2019 10:30:37 +0000 (12:30 +0200)]
lib-index: Fix potential crash when view is synced after index is reset
view_sync_set_log_view_range() sees that index is reset, so it clears the
log_view, which sets log_view->cur=NULL. Later on view_sync_have_expunges()
calls mail_transaction_log_view_mark(), which crashes because
log_view->cur==NULL.
This crash mainly happened when searching for seen flags in a newly created
mailbox with INDEXPVT. This commit doesn't actually fix the bug, but it
fixes the resulting crash.
Timo Sirainen [Tue, 3 Dec 2019 21:55:55 +0000 (23:55 +0200)]
lib-storage: mailbox_get_metadata() - Return cache_fields allocated from data stack
Using mailbox.metacache_pool breaks if it's called multiple times for the
same mailbox and the old results are still used. This happened in
index_copy_cache_fields() when copying mails within the same mailbox. In
some situations this could have caused a crash.
Timo Sirainen [Tue, 3 Dec 2019 19:07:46 +0000 (21:07 +0200)]
lib-http: Update event fields once more in http_client_request_submit()
Especially the port number could have changed.
Timo Sirainen [Tue, 3 Dec 2019 18:04:47 +0000 (20:04 +0200)]
lib-http: Add support for permanent headers
Timo Sirainen [Tue, 3 Dec 2019 14:26:42 +0000 (16:26 +0200)]
lib-http: Add http_client_request_set_event_headers()
Timo Sirainen [Tue, 3 Dec 2019 12:20:24 +0000 (14:20 +0200)]
lib-http: Include HTTP response reason text in debug log messages
Timo Sirainen [Mon, 2 Dec 2019 19:19:04 +0000 (21:19 +0200)]
fs-compress, fs-crypt: Remove duplicate fs-driver prefix in init errors
fs_init() already prefixes the error with "fs-driver: "
Timo Sirainen [Sat, 30 Nov 2019 16:14:21 +0000 (18:14 +0200)]
global: Don't use CALLBACK_TYPECHECK() in arithmetic with context
This fails if the context type is incomplete.
Timo Sirainen [Sat, 30 Nov 2019 16:14:09 +0000 (18:14 +0200)]
lib-http: Add http_client_request_get_attempts()
Aki Tuomi [Fri, 13 Dec 2019 11:40:14 +0000 (13:40 +0200)]
NEWS: Add news for 2.3.9.2
Timo Sirainen [Fri, 13 Dec 2019 11:35:06 +0000 (13:35 +0200)]
push-notification: Fix crash with empty from/to header
Hector Martin [Tue, 19 Nov 2019 04:59:53 +0000 (13:59 +0900)]
mdbox: Support setting save_date
Aki Tuomi [Wed, 11 Dec 2019 14:58:38 +0000 (16:58 +0200)]
NEWS: Add news for 2.3.9.1
Timo Sirainen [Thu, 28 Nov 2019 19:23:15 +0000 (21:23 +0200)]
cassandra: Handle CASS_ERROR_SERVER_WRITE_FAILURE also as "uncertain write"
This error apparently doesn't happen often, but it seems to be a per-node
failure so some Cassandra nodes could have written the change.
Stephan Bosch [Sun, 8 Dec 2019 12:17:42 +0000 (13:17 +0100)]
lib-smtp: Add smtp_address_case_equals().
Stephan Bosch [Sun, 8 Dec 2019 12:16:26 +0000 (13:16 +0100)]
lib-smtp: Add smtp_address_cmp_icase().
Aki Tuomi [Wed, 11 Dec 2019 12:04:32 +0000 (14:04 +0200)]
push-notification-driver-lua: Provide missing to/from as empty string
Aki Tuomi [Wed, 11 Dec 2019 11:16:19 +0000 (13:16 +0200)]
push-notification: Handle group names correctly in from/to
Fixes signal 11 crash
Timo Sirainen [Mon, 22 Jul 2019 13:16:51 +0000 (16:16 +0300)]
submission: Fix submission_max_mail_size setting type
Timo Sirainen [Mon, 2 Dec 2019 17:06:40 +0000 (19:06 +0200)]
lib-fs: Add fs event category to fs events
Timo Sirainen [Fri, 29 Nov 2019 15:49:23 +0000 (17:49 +0200)]
lib-fs: Log any pending errors in fs_file_deinit()
If error was set to the file but it wasn't accessed with
fs_file_last_error(), it means the error message would become lost.
Usually this is probably not intended.
Timo Sirainen [Fri, 29 Nov 2019 15:11:15 +0000 (17:11 +0200)]
lib-fs: Log previous fs_file error if it's being overridden
This makes sure that errors aren't lost. If fs_file_last_error() has been
used it means that the error has been looked at and there's no need to log
it.
Some of the "expected" errors won't be logged though. This check is done
based on errno. This is also why this commit reorders
fs_file_set_error_async() to set errno=EAGAIN earlier.
Timo Sirainen [Sun, 1 Dec 2019 21:07:14 +0000 (23:07 +0200)]
test-fs-posix: Check for failed fs_read() error string
Timo Sirainen [Fri, 29 Nov 2019 15:01:26 +0000 (17:01 +0200)]
lib-fs: Replace fs error with file/iter-specific error
Removed fs_last_error(), since it can't be used anymore.
Timo Sirainen [Fri, 29 Nov 2019 14:55:42 +0000 (16:55 +0200)]
lib-fs: Move file deinit code from fs_file_deinit() to fs_file_free()
Timo Sirainen [Fri, 29 Nov 2019 14:53:47 +0000 (16:53 +0200)]
lib-fs: Add fs_file_free() to run common deinit code
Timo Sirainen [Fri, 29 Nov 2019 14:25:49 +0000 (16:25 +0200)]
lib-fs: Change fs_set_error() to take event instead of fs
Also log the error as debug message. This allows capturing the events for
statistics or event exporting.
Timo Sirainen [Fri, 29 Nov 2019 13:30:46 +0000 (15:30 +0200)]
lib-fs: Set internal fs/file/iter pointers to events
This will be used by the following commit
Timo Sirainen [Fri, 29 Nov 2019 14:08:37 +0000 (16:08 +0200)]
lib-fs: Rename fs_set_error_async() to fs_file_set_error_async()
Also changed to take fs_file instead of fs parameter.
Timo Sirainen [Fri, 29 Nov 2019 14:01:40 +0000 (16:01 +0200)]
fs-posix: Change fs_posix_rmdir_parents() to take fs_file instead of fs
Timo Sirainen [Fri, 29 Nov 2019 13:58:59 +0000 (15:58 +0200)]
fs-sis: Don't overwrite error already set by fs_sis_path_parse()
Timo Sirainen [Fri, 29 Nov 2019 13:56:22 +0000 (15:56 +0200)]
fs-sis: Change some internal functions to take fs_file instead of fs
Timo Sirainen [Fri, 29 Nov 2019 13:54:13 +0000 (15:54 +0200)]
fs-posix: Change fs_posix_get_mode() to take file parameter, not fs
Timo Sirainen [Mon, 25 Nov 2019 11:20:53 +0000 (13:20 +0200)]
lib-fs: Remove fs_set_critical()
The original idea was similar to mail_storage_set_error/critical()
separation. But in storage they are used to clearly separate between
errors caused by untrusted users vs internal errors. In lib-fs case
all the errors are internal errors. Also all the lib-fs callers are
supposed to log the errors unless they decide to handle them specially,
so there's really no need a fs_set_critical() that just causes them to
be logged twice.
Timo Sirainen [Mon, 25 Nov 2019 11:19:55 +0000 (13:19 +0200)]
fs-posix: Replace fs_set_critical() with e_error()
fs_set_error() can't be used in fs_file_close() and fs_file_deinit(),
because they don't return an error.
Timo Sirainen [Mon, 25 Nov 2019 11:19:00 +0000 (13:19 +0200)]
fs-posix: Log lseek() error with fs_set_error()
Makes it consistent with logging the read() error.
Timo Sirainen [Mon, 25 Nov 2019 09:43:50 +0000 (11:43 +0200)]
lib-fs: Add error_r parameter to the internal fs.init() method
This will help removing fs_set_error() calls.
Timo Sirainen [Mon, 25 Nov 2019 09:25:37 +0000 (11:25 +0200)]
global: Replace fs_last_error() with fs_file_last_error() wherever possible
Timo Sirainen [Thu, 5 Dec 2019 11:41:26 +0000 (13:41 +0200)]
lib-fs: Free fs_iter in fs_iter_deinit(), not in individual drivers
Timo Sirainen [Mon, 25 Nov 2019 09:13:08 +0000 (11:13 +0200)]
lib-fs: Change fs_iter_deinit() API to return error_r string
Timo Sirainen [Mon, 25 Nov 2019 09:06:07 +0000 (11:06 +0200)]
lib-fs: Change last_error from string_t to char *
The string isn't modified in a way that string_t is useful. This change
also allows fs_set_error() parameters to point to previous error string
without breaking.
Timo Sirainen [Fri, 29 Nov 2019 13:25:21 +0000 (15:25 +0200)]
lib: Allow events to store internal pointers
These pointers are independent of event fields, so they're ignored by event
matching, exporting and importing. Their main purpose is to allow storing
internal state to an event and allow it to be accessed by any code that can
access the event.
Timo Sirainen [Wed, 4 Dec 2019 17:39:10 +0000 (19:39 +0200)]
fs-posix: Use container_of()
Josef 'Jeff' Sipek [Wed, 4 Dec 2019 17:30:26 +0000 (12:30 -0500)]
lib: Don't use EAI_{ADDRFAMILY,NODATA} when they don't exist
Broken by
c85f1bc3ce612c736c9d2c468cc08306db1b5851
Stephan Bosch [Wed, 4 Dec 2019 19:52:26 +0000 (20:52 +0100)]
plugins: quota: quota-status - Check that the MTA is in the RCPT state.
The quota-status service can currently only be used for Postfix
smtpd_recipient_restrictions.
Stephan Bosch [Wed, 4 Dec 2019 19:38:14 +0000 (20:38 +0100)]
plugins: quota: quota-status - Delay parsing recipient address until after message is fully read.
Stephan Bosch [Wed, 4 Dec 2019 20:16:17 +0000 (21:16 +0100)]
plugins: quota: quota-status - Remove duplicate "quota-status" prefix from error message.
Stephan Bosch [Sun, 4 Nov 2018 18:04:34 +0000 (19:04 +0100)]
plugins: quota: quota-status - Accept addresses with badly broken localparts from Postfix.
Stephan Bosch [Sun, 4 Nov 2018 16:45:29 +0000 (17:45 +0100)]
plugins: quota: quota-status - Fix protocol hang occurring when recipient address is invalid.
The line handler returned 0 in the event of an invalid recipient address, which
halts input handling.
Stephan Bosch [Sun, 4 Nov 2018 16:37:04 +0000 (17:37 +0100)]
plugins: quota: quota-status - Add event support for debug logging.
Stephan Bosch [Wed, 31 Oct 2018 22:09:48 +0000 (23:09 +0100)]
plugins: quota: quota-status - Improve error message for invalid recipient address.
Stephan Bosch [Mon, 7 Jan 2019 19:03:16 +0000 (20:03 +0100)]
auth: mech-scram: Add support for SCRAM-SHA-256.
Stephan Bosch [Mon, 7 Jan 2019 19:09:07 +0000 (20:09 +0100)]
auth: password-scheme: scram: Add support for SCRAM-SHA-256.
Stephan Bosch [Sun, 6 Jan 2019 22:08:38 +0000 (23:08 +0100)]
auth: mech-scram: Make implementation generic to support other hash algorithms.
Stephan Bosch [Sun, 6 Jan 2019 22:04:37 +0000 (23:04 +0100)]
auth: password-scheme: scram: Make implementation generic to support other hash algorithms.