From dovecot at dovecot.org Tue Feb 4 18:22:57 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 04 Feb 2014 18:22:57 +0200 Subject: dovecot-2.2: pop3-migration: Work around IMAP/POP3 server bugs w... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/18d0ce83bf7a changeset: 17122:18d0ce83bf7a user: Timo Sirainen date: Mon Feb 03 10:47:31 2014 -0500 description: pop3-migration: Work around IMAP/POP3 server bugs which truncate the header too early. diffstat: src/plugins/pop3-migration/pop3-migration-plugin.c | 82 +++++++++++++++++---- 1 files changed, 67 insertions(+), 15 deletions(-) diffs (121 lines): diff -r 5432b55a2b87 -r 18d0ce83bf7a src/plugins/pop3-migration/pop3-migration-plugin.c --- a/src/plugins/pop3-migration/pop3-migration-plugin.c Fri Jan 31 02:12:30 2014 +0100 +++ b/src/plugins/pop3-migration/pop3-migration-plugin.c Mon Feb 03 10:47:31 2014 -0500 @@ -6,6 +6,7 @@ #include "istream-header-filter.h" #include "sha1.h" #include "message-size.h" +#include "message-header-parser.h" #include "mail-namespace.h" #include "mail-search-build.h" #include "mail-storage-private.h" @@ -110,26 +111,33 @@ return memcmp(map1->hdr_sha1, map2->hdr_sha1, sizeof(map1->hdr_sha1)); } -static int get_hdr_sha1(struct mail *mail, unsigned char sha1[SHA1_RESULTLEN]) +static void +pop3_header_filter_callback(struct header_filter_istream *input ATTR_UNUSED, + struct message_header_line *hdr, + bool *matched ATTR_UNUSED, bool *have_eoh) { - struct message_size hdr_size; - struct istream *input, *input2; - const unsigned char *data; - size_t size; + if (hdr != NULL && hdr->eoh) + *have_eoh = TRUE; +} + +static int +get_hdr_sha1_stream(struct mail *mail, struct istream *input, uoff_t hdr_size, + unsigned char sha1_r[SHA1_RESULTLEN], bool *have_eoh_r) +{ + struct istream *input2; + const unsigned char *data, *p; + size_t size, idx; struct sha1_ctxt sha1_ctx; - if (mail_get_hdr_stream(mail, &hdr_size, &input) < 0) { - i_error("pop3_migration: Failed to get header for msg %u: %s", - mail->seq, mailbox_get_last_error(mail->box, NULL)); - return -1; - } - input2 = i_stream_create_limit(input, hdr_size.physical_size); + *have_eoh_r = FALSE; + + input2 = i_stream_create_limit(input, hdr_size); /* hide headers that might change or be different in IMAP vs. POP3 */ input = i_stream_create_header_filter(input2, HEADER_FILTER_EXCLUDE | HEADER_FILTER_NO_CR, hdr_hash_skip_headers, N_ELEMENTS(hdr_hash_skip_headers), - *null_header_filter_callback, (void *)NULL); + pop3_header_filter_callback, have_eoh_r); i_stream_unref(&input2); sha1_init(&sha1_ctx); @@ -138,16 +146,60 @@ i_stream_skip(input, size); } if (input->stream_errno != 0) { - i_error("pop3_migration: Failed to read header for msg %u: %m", - mail->seq); + i_error("pop3_migration: Failed to read header for msg %u: %s", + mail->seq, i_stream_get_error(input)); i_stream_unref(&input); return -1; } - sha1_result(&sha1_ctx, sha1); + sha1_result(&sha1_ctx, sha1_r); i_stream_unref(&input); return 0; } +static int +get_hdr_sha1(struct mail *mail, unsigned char sha1_r[SHA1_RESULTLEN]) +{ + struct istream *input; + struct message_size hdr_size; + bool have_eoh; + + if (mail_get_hdr_stream(mail, &hdr_size, &input) < 0) { + i_error("pop3_migration: Failed to get header for msg %u: %s", + mail->seq, mailbox_get_last_error(mail->box, NULL)); + return -1; + } + if (get_hdr_sha1_stream(mail, input, hdr_size.physical_size, + sha1_r, &have_eoh) < 0) + return -1; + if (have_eoh) + return 0; + + /* The empty "end of headers" line is missing. Either this means that + the headers ended unexpectedly (which is ok) or that the remote + server is buggy. Some servers have problems with + + 1) header line continuations that contain only whitespace and + 2) headers that have no ":". The header gets truncated when such + line is reached. + + At least Oracle IMS IMAP FETCH BODY[HEADER] handles 1) by not + returning the whitespace line and 2) by returning the line but + truncating the rest. POP3 TOP instead returns the entire header. + This causes the IMAP and POP3 hashes not to match. + + So we'll try to avoid this by falling back to full FETCH BODY[] + (and/or RETR) and we'll parse the header ourself from it. This + should work around any similar bugs in all IMAP/POP3 servers. */ + if (mail_get_stream(mail, &hdr_size, NULL, &input) < 0) { + i_error("pop3_migration: Failed to get body for msg %u: %s", + mail->seq, mailbox_get_last_error(mail->box, NULL)); + return -1; + } + return get_hdr_sha1_stream(mail, input, hdr_size.physical_size, + sha1_r, &have_eoh); + +} + static struct mailbox *pop3_mailbox_alloc(struct mail_storage *storage) { struct pop3_migration_mail_storage *mstorage = From dovecot at dovecot.org Tue Feb 4 18:22:57 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 04 Feb 2014 18:22:57 +0200 Subject: dovecot-2.2: pop3-migration: If UIDLs can't be set, fail unless ... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/1c298212ab70 changeset: 17124:1c298212ab70 user: Timo Sirainen date: Mon Feb 03 10:53:59 2014 -0500 description: pop3-migration: If UIDLs can't be set, fail unless pop3_migration_ignore_missing_uidls=yes. diffstat: src/plugins/pop3-migration/pop3-migration-plugin.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diffs (35 lines): diff -r 3839e4e62413 -r 1c298212ab70 src/plugins/pop3-migration/pop3-migration-plugin.c --- a/src/plugins/pop3-migration/pop3-migration-plugin.c Mon Feb 03 10:49:03 2014 -0500 +++ b/src/plugins/pop3-migration/pop3-migration-plugin.c Mon Feb 03 10:53:59 2014 -0500 @@ -48,6 +48,7 @@ unsigned int all_mailboxes:1; unsigned int pop3_all_hdr_sha1_set:1; + unsigned int ignore_missing_uidls:1; }; struct pop3_migration_mailbox { @@ -501,6 +502,13 @@ missing_uids_count++; } if (missing_uids_count > 0 && !mstorage->all_mailboxes) { + if (!mstorage->ignore_missing_uidls) { + i_error("pop3_migration: %u POP3 messages have no " + "matching IMAP messages (set " + "pop3_migration_ignore_missing_uidls=yes " + "to continue anyway)", missing_uids_count); + return -1; + } i_warning("pop3_migration: %u POP3 messages have no " "matching IMAP messages", missing_uids_count); } @@ -670,6 +678,9 @@ mstorage->all_mailboxes = mail_user_plugin_getenv(storage->user, "pop3_migration_all_mailboxes") != NULL; + mstorage->ignore_missing_uidls = + mail_user_plugin_getenv(storage->user, + "pop3_migration_ignore_missing_uidls") != NULL; MODULE_CONTEXT_SET(storage, pop3_migration_storage_module, mstorage); } From dovecot at dovecot.org Tue Feb 4 18:22:57 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 04 Feb 2014 18:22:57 +0200 Subject: dovecot-2.2: pop3-migration: Convert NULs to 0x80 chars in heade... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/3839e4e62413 changeset: 17123:3839e4e62413 user: Timo Sirainen date: Mon Feb 03 10:49:03 2014 -0500 description: pop3-migration: Convert NULs to 0x80 chars in header when hashing. This should help at least with Dovecot and I think also with UW-IMAP/POP3. diffstat: src/plugins/pop3-migration/pop3-migration-plugin.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diffs (21 lines): diff -r 18d0ce83bf7a -r 3839e4e62413 src/plugins/pop3-migration/pop3-migration-plugin.c --- a/src/plugins/pop3-migration/pop3-migration-plugin.c Mon Feb 03 10:47:31 2014 -0500 +++ b/src/plugins/pop3-migration/pop3-migration-plugin.c Mon Feb 03 10:49:03 2014 -0500 @@ -142,6 +142,17 @@ sha1_init(&sha1_ctx); while (i_stream_read_data(input, &data, &size, 0) > 0) { + /* if there are NULs in header, replace them with 0x80 + character. This is done by at least Dovecot IMAP and also + POP3 with outlook-no-nuls workaround. */ + while ((p = memchr(data, '\0', size)) != NULL) { + idx = p - data; + sha1_loop(&sha1_ctx, data, idx); + sha1_loop(&sha1_ctx, "\x80", 1); + i_assert(size > idx); + data += idx + 1; + size -= idx + 1; + } sha1_loop(&sha1_ctx, data, size); i_stream_skip(input, size); } From dovecot at dovecot.org Tue Feb 4 18:22:57 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 04 Feb 2014 18:22:57 +0200 Subject: dovecot-2.2: test-istream-concat unit test improved. Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/e1db4af9e2c1 changeset: 17125:e1db4af9e2c1 user: Timo Sirainen date: Mon Feb 03 11:38:40 2014 -0500 description: test-istream-concat unit test improved. Still pretty ugly to test with randomness, but at least it caught the bug in v2.1. diffstat: src/lib/test-istream-concat.c | 31 +++++++++++++++++++++---------- 1 files changed, 21 insertions(+), 10 deletions(-) diffs (76 lines): diff -r 1c298212ab70 -r e1db4af9e2c1 src/lib/test-istream-concat.c --- a/src/lib/test-istream-concat.c Mon Feb 03 10:53:59 2014 -0500 +++ b/src/lib/test-istream-concat.c Mon Feb 03 11:38:40 2014 -0500 @@ -8,6 +8,10 @@ #include #include +#define TEST_MAX_ISTREAM_COUNT 10 +#define TEST_MAX_ISTREAM_SIZE 1024 +#define TEST_MAX_BUFFER_SIZE 128 + static void test_istream_concat_one(unsigned int buffer_size) { static const char *input_string = "xyz"; @@ -47,17 +51,17 @@ static void test_istream_concat_random(void) { - struct istream **streams, *input; + struct istream **streams, *input, *input1, *input2; const unsigned char *data; unsigned char *w_data; size_t size = 0; unsigned int i, j, offset, stream_count, data_len; - srand(1234); - stream_count = (rand() % 10) + 2; + srand(3); + stream_count = (rand() % TEST_MAX_ISTREAM_COUNT) + 2; streams = t_new(struct istream *, stream_count + 1); for (i = 0, offset = 0; i < stream_count; i++) { - data_len = rand() % 100 + 1; + data_len = rand() % TEST_MAX_ISTREAM_SIZE + 1; w_data = t_malloc(data_len); for (j = 0; j < data_len; j++) w_data[j] = offset++; @@ -68,14 +72,21 @@ i_assert(offset > 0); input = i_stream_create_concat(streams); - for (i = 0; i < 100; i++) { + i_stream_set_max_buffer_size(input, TEST_MAX_BUFFER_SIZE); + input1 = i_stream_create_limit(input, (uoff_t)-1); + input2 = i_stream_create_limit(input, (uoff_t)-1); + i_stream_unref(&input); + + for (i = 0; i < 1000; i++) { + input = i % 2 == 0 ? input1 : input2; if (rand() % 3 == 0) { i_stream_seek(input, rand() % offset); } else { ssize_t ret = i_stream_read(input); - if (input->v_offset + size == offset) - test_assert(ret < 0); - else { + size = i_stream_get_data_size(input); + if (ret == -2) { + test_assert(size >= TEST_MAX_BUFFER_SIZE); + } else if (input->v_offset + size != offset) { test_assert(ret > 0); test_assert(input->v_offset + ret <= offset); i_stream_skip(input, rand() % ret); @@ -86,11 +97,11 @@ } } } - size = i_stream_get_data_size(input); } for (i = 0; i < stream_count; i++) i_stream_unref(&streams[i]); - i_stream_unref(&input); + i_stream_unref(&input1); + i_stream_unref(&input2); } void test_istream_concat(void) From dovecot at dovecot.org Tue Feb 4 18:22:57 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 04 Feb 2014 18:22:57 +0200 Subject: dovecot-2.2: dsync: Added extra asserts Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/e5e7579e30f0 changeset: 17126:e5e7579e30f0 user: Timo Sirainen date: Mon Feb 03 11:50:10 2014 -0500 description: dsync: Added extra asserts diffstat: src/doveadm/dsync/dsync-mailbox-tree-sync.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diffs (45 lines): diff -r e1db4af9e2c1 -r e5e7579e30f0 src/doveadm/dsync/dsync-mailbox-tree-sync.c --- a/src/doveadm/dsync/dsync-mailbox-tree-sync.c Mon Feb 03 11:38:40 2014 -0500 +++ b/src/doveadm/dsync/dsync-mailbox-tree-sync.c Mon Feb 03 11:50:10 2014 -0500 @@ -88,6 +88,8 @@ struct dsync_mailbox_tree_sync_change *change; const char *name; + i_assert(ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL); + name = dsync_mailbox_node_get_full_name(ctx->local_tree, node); change = array_append_space(&ctx->changes); @@ -102,6 +104,8 @@ { struct dsync_mailbox_tree_sync_change *change; + i_assert(ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL); + change = array_append_space(&ctx->changes); change->type = DSYNC_MAILBOX_TREE_SYNC_TYPE_CREATE_BOX; change->ns = node->ns; @@ -162,6 +166,7 @@ if (tree == ctx->local_tree) { /* delete this mailbox locally */ + i_assert(ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL); change = array_append_space(&ctx->changes); change->type = DSYNC_MAILBOX_TREE_SYNC_TYPE_DELETE_BOX; change->ns = node->ns; @@ -393,6 +398,7 @@ /* we're modifying a local tree. remember this change. */ new_name = dsync_mailbox_node_get_full_name(tree, node); + i_assert(ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL); i_assert(strcmp(old_name, "INBOX") != 0); change = array_append_space(&ctx->changes); change->type = DSYNC_MAILBOX_TREE_SYNC_TYPE_RENAME; @@ -460,6 +466,7 @@ /* we're modifying a local tree. remember this change. */ other_name = dsync_mailbox_node_get_full_name(other_tree, other_node); + i_assert(ctx->sync_type != DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL); i_assert(strcmp(name, "INBOX") != 0); change = array_append_space(&ctx->changes); change->type = DSYNC_MAILBOX_TREE_SYNC_TYPE_RENAME; From dovecot at dovecot.org Tue Feb 4 18:22:57 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 04 Feb 2014 18:22:57 +0200 Subject: dovecot-2.2: doveadm backup: Fixed assert-crash when syncing mai... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/fbc8fe46dfce changeset: 17127:fbc8fe46dfce user: Timo Sirainen date: Mon Feb 03 11:50:49 2014 -0500 description: doveadm backup: Fixed assert-crash when syncing mailbox deletion. diffstat: src/doveadm/dsync/dsync-mailbox-tree-sync.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (15 lines): diff -r e5e7579e30f0 -r fbc8fe46dfce src/doveadm/dsync/dsync-mailbox-tree-sync.c --- a/src/doveadm/dsync/dsync-mailbox-tree-sync.c Mon Feb 03 11:50:10 2014 -0500 +++ b/src/doveadm/dsync/dsync-mailbox-tree-sync.c Mon Feb 03 11:50:49 2014 -0500 @@ -1217,9 +1217,9 @@ ctx->sync_flags = sync_flags; i_array_init(&ctx->changes, 128); + ignore_deletes = sync_type == DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_REMOTE; + sync_tree_sort_and_delete_mailboxes(ctx, remote_tree, ignore_deletes); ignore_deletes = sync_type == DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_LOCAL; - sync_tree_sort_and_delete_mailboxes(ctx, remote_tree, ignore_deletes); - ignore_deletes = sync_type == DSYNC_MAILBOX_TREES_SYNC_TYPE_PRESERVE_REMOTE; sync_tree_sort_and_delete_mailboxes(ctx, local_tree, ignore_deletes); dsync_mailbox_tree_update_child_timestamps(&local_tree->root, 0); From dovecot at dovecot.org Tue Feb 4 18:22:57 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 04 Feb 2014 18:22:57 +0200 Subject: dovecot-2.2: imapc: Fixed assert-crash when listing INBOX and im... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/0b86bd67f1e4 changeset: 17128:0b86bd67f1e4 user: Timo Sirainen date: Mon Feb 03 12:04:19 2014 -0500 description: imapc: Fixed assert-crash when listing INBOX and imapc_list_prefix was set. diffstat: src/lib-storage/index/imapc/imapc-list.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diffs (13 lines): diff -r fbc8fe46dfce -r 0b86bd67f1e4 src/lib-storage/index/imapc/imapc-list.c --- a/src/lib-storage/index/imapc/imapc-list.c Mon Feb 03 11:50:49 2014 -0500 +++ b/src/lib-storage/index/imapc/imapc-list.c Mon Feb 03 12:04:19 2014 -0500 @@ -493,7 +493,8 @@ MAILBOX_LIST_ITER_RETURN_NO_FLAGS); while ((info = mailbox_list_iter_next(iter)) != NULL) T_BEGIN { vname = info->vname; - if (imapc_list_prefix_len > 0) { + if (imapc_list_prefix_len > 0 && + strcasecmp(vname, "INBOX") != 0) { /* skip over the namespace prefix */ i_assert(strncmp(vname, fs_list->ns->prefix, fs_list->ns->prefix_len) == 0); From dovecot at dovecot.org Tue Feb 4 18:22:58 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 04 Feb 2014 18:22:58 +0200 Subject: dovecot-2.2: imap: SEARCH/SORT PARTIAL reponses may have been to... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/c329508e4fec changeset: 17129:c329508e4fec user: Timo Sirainen date: Mon Feb 03 12:42:13 2014 -0500 description: imap: SEARCH/SORT PARTIAL reponses may have been too large. diffstat: src/imap/imap-search.c | 37 +++++++++++++------------------------ 1 files changed, 13 insertions(+), 24 deletions(-) diffs (53 lines): diff -r 0b86bd67f1e4 -r c329508e4fec src/imap/imap-search.c --- a/src/imap/imap-search.c Mon Feb 03 12:04:19 2014 -0500 +++ b/src/imap/imap-search.c Mon Feb 03 12:42:13 2014 -0500 @@ -229,36 +229,25 @@ imap_search_send_partial(struct imap_search_context *ctx, string_t *str) { struct seq_range *range; - uint32_t n, diff; - unsigned int i, count, delete_count; + unsigned int i, count; str_printfa(str, " PARTIAL (%u:%u ", ctx->partial1, ctx->partial2); - ctx->partial1--; - ctx->partial2--; - /* we need to be able to handle non-sorted seq ranges, so do this - ourself instead of using seq_range_array_*() functions. */ + /* we need to be able to handle non-sorted seq ranges (for SORT + replies), so do this ourself instead of using seq_range_array_*() + functions. */ range = array_get_modifiable(&ctx->result, &count); - delete_count = 0; - for (i = n = 0; i < count; i++) { - diff = range[i].seq2 - range[i].seq1; - if (n + diff >= ctx->partial1) { - range[i].seq1 += ctx->partial1 - n; - delete_count = i; - break; + for (i = count; i > 0; ) { + i--; + if (range[i].seq1 < ctx->partial1) + range[i].seq1 = ctx->partial1; + if (range[i].seq2 > ctx->partial2) + range[i].seq2 = ctx->partial2; + if (range[i].seq1 > range[i].seq2) { + array_delete(&ctx->result, i, 1); + range = array_get_modifiable(&ctx->result, &count); } - n += diff + 1; } - for (n = ctx->partial1; i < count; i++) { - diff = range[i].seq2 - range[i].seq1; - if (n + diff >= ctx->partial2) { - range[i].seq2 = range[i].seq1 + (ctx->partial2 - n); - array_delete(&ctx->result, i + 1, count-(i+1)); - break; - } - n += diff + 1; - } - array_delete(&ctx->result, 0, delete_count); if (array_count(&ctx->result) == 0) { /* no results (in range) */ From dovecot at dovecot.org Tue Feb 4 23:26:48 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 04 Feb 2014 23:26:48 +0200 Subject: dovecot-2.2: Updated copyright notices to include year 2014. Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/add8c00fb3cc changeset: 17130:add8c00fb3cc user: Timo Sirainen date: Tue Feb 04 16:23:22 2014 -0500 description: Updated copyright notices to include year 2014. diffstat: src/anvil/anvil-connection.c | 2 +- src/anvil/anvil-settings.c | 2 +- src/anvil/connect-limit.c | 2 +- src/anvil/main.c | 2 +- src/anvil/penalty.c | 2 +- src/anvil/test-penalty.c | 2 +- src/auth/auth-cache.c | 2 +- src/auth/auth-client-connection.c | 2 +- src/auth/auth-fields.c | 2 +- src/auth/auth-master-connection.c | 2 +- src/auth/auth-penalty.c | 2 +- src/auth/auth-postfix-connection.c | 2 +- src/auth/auth-request-handler.c | 2 +- src/auth/auth-request.c | 2 +- src/auth/auth-settings.c | 2 +- src/auth/auth-token.c | 2 +- src/auth/auth-worker-client.c | 2 +- src/auth/auth-worker-server.c | 2 +- src/auth/auth.c | 2 +- src/auth/db-checkpassword.c | 2 +- src/auth/db-dict-cache-key.c | 2 +- src/auth/db-dict.c | 2 +- src/auth/db-ldap.c | 2 +- src/auth/db-passwd-file.c | 2 +- src/auth/db-sql.c | 2 +- src/auth/main.c | 2 +- src/auth/mech-anonymous.c | 2 +- src/auth/mech-cram-md5.c | 2 +- src/auth/mech-digest-md5.c | 2 +- src/auth/mech-dovecot-token.c | 2 +- src/auth/mech-external.c | 2 +- src/auth/mech-plain.c | 2 +- src/auth/mech.c | 2 +- src/auth/passdb-blocking.c | 2 +- src/auth/passdb-bsdauth.c | 2 +- src/auth/passdb-cache.c | 2 +- src/auth/passdb-checkpassword.c | 2 +- src/auth/passdb-dict.c | 2 +- src/auth/passdb-imap.c | 2 +- src/auth/passdb-ldap.c | 2 +- src/auth/passdb-passwd-file.c | 2 +- src/auth/passdb-passwd.c | 2 +- src/auth/passdb-shadow.c | 2 +- src/auth/passdb-sql.c | 2 +- src/auth/passdb-static.c | 2 +- src/auth/passdb-template.c | 2 +- src/auth/passdb-vpopmail.c | 2 +- src/auth/passdb.c | 2 +- src/auth/password-scheme-crypt.c | 2 +- src/auth/password-scheme.c | 2 +- src/auth/test-auth-cache.c | 2 +- src/auth/test-db-dict.c | 2 +- src/auth/userdb-blocking.c | 2 +- src/auth/userdb-checkpassword.c | 2 +- src/auth/userdb-dict.c | 2 +- src/auth/userdb-ldap.c | 2 +- src/auth/userdb-nss.c | 2 +- src/auth/userdb-passwd-file.c | 2 +- src/auth/userdb-passwd.c | 2 +- src/auth/userdb-prefetch.c | 2 +- src/auth/userdb-sql.c | 2 +- src/auth/userdb-static.c | 2 +- src/auth/userdb-template.c | 2 +- src/auth/userdb-vpopmail.c | 2 +- src/auth/userdb.c | 2 +- src/config/config-connection.c | 2 +- src/config/config-filter.c | 2 +- src/config/config-parser.c | 2 +- src/config/config-request.c | 2 +- src/config/config-settings.c | 2 +- src/config/doveconf.c | 2 +- src/config/main.c | 2 +- src/config/old-set-parser.c | 2 +- src/config/sysinfo-get.c | 2 +- src/dict/dict-commands.c | 2 +- src/dict/dict-connection.c | 2 +- src/dict/dict-settings.c | 2 +- src/dict/main.c | 2 +- src/director/auth-connection.c | 2 +- src/director/director-connection.c | 2 +- src/director/director-host.c | 2 +- src/director/director-request.c | 2 +- src/director/director-settings.c | 2 +- src/director/director-test.c | 2 +- src/director/director.c | 2 +- src/director/doveadm-connection.c | 2 +- src/director/login-connection.c | 2 +- src/director/mail-host.c | 2 +- src/director/main.c | 2 +- src/director/notify-connection.c | 2 +- src/director/test-user-directory.c | 2 +- src/director/user-directory.c | 2 +- src/dns/dns-client-settings.c | 2 +- src/dns/dns-client.c | 2 +- src/doveadm/client-connection.c | 2 +- src/doveadm/doveadm-auth.c | 2 +- src/doveadm/doveadm-director.c | 2 +- src/doveadm/doveadm-dump-dbox.c | 2 +- src/doveadm/doveadm-dump-index.c | 2 +- src/doveadm/doveadm-dump-log.c | 2 +- src/doveadm/doveadm-dump-mailboxlog.c | 2 +- src/doveadm/doveadm-dump-thread.c | 2 +- src/doveadm/doveadm-dump.c | 2 +- src/doveadm/doveadm-fs.c | 2 +- src/doveadm/doveadm-instance.c | 2 +- src/doveadm/doveadm-kick.c | 2 +- src/doveadm/doveadm-log.c | 2 +- src/doveadm/doveadm-mail-altmove.c | 2 +- src/doveadm/doveadm-mail-copymove.c | 2 +- src/doveadm/doveadm-mail-deduplicate.c | 2 +- src/doveadm/doveadm-mail-expunge.c | 2 +- src/doveadm/doveadm-mail-fetch.c | 2 +- src/doveadm/doveadm-mail-flags.c | 2 +- src/doveadm/doveadm-mail-import.c | 2 +- src/doveadm/doveadm-mail-index.c | 2 +- src/doveadm/doveadm-mail-iter.c | 2 +- src/doveadm/doveadm-mail-mailbox-status.c | 2 +- src/doveadm/doveadm-mail-mailbox.c | 2 +- src/doveadm/doveadm-mail-search.c | 2 +- src/doveadm/doveadm-mail-server.c | 2 +- src/doveadm/doveadm-mail.c | 2 +- src/doveadm/doveadm-mailbox-list-iter.c | 2 +- src/doveadm/doveadm-master.c | 2 +- src/doveadm/doveadm-mount.c | 2 +- src/doveadm/doveadm-mutf7.c | 2 +- src/doveadm/doveadm-penalty.c | 2 +- src/doveadm/doveadm-print-flow.c | 2 +- src/doveadm/doveadm-print-pager.c | 2 +- src/doveadm/doveadm-print-server.c | 2 +- src/doveadm/doveadm-print-tab.c | 2 +- src/doveadm/doveadm-print-table.c | 2 +- src/doveadm/doveadm-print.c | 2 +- src/doveadm/doveadm-proxy.c | 2 +- src/doveadm/doveadm-pw.c | 2 +- src/doveadm/doveadm-replicator.c | 2 +- src/doveadm/doveadm-settings.c | 2 +- src/doveadm/doveadm-sis.c | 2 +- src/doveadm/doveadm-stats.c | 2 +- src/doveadm/doveadm-util.c | 2 +- src/doveadm/doveadm-who.c | 2 +- src/doveadm/doveadm-zlib.c | 2 +- src/doveadm/doveadm.c | 2 +- src/doveadm/dsync/doveadm-dsync.c | 2 +- src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c | 2 +- src/doveadm/dsync/dsync-brain-mailbox-tree.c | 2 +- src/doveadm/dsync/dsync-brain-mailbox.c | 2 +- src/doveadm/dsync/dsync-brain-mails.c | 2 +- src/doveadm/dsync/dsync-brain.c | 2 +- src/doveadm/dsync/dsync-deserializer.c | 2 +- src/doveadm/dsync/dsync-ibc-pipe.c | 2 +- src/doveadm/dsync/dsync-ibc-stream.c | 2 +- src/doveadm/dsync/dsync-ibc.c | 2 +- src/doveadm/dsync/dsync-mail.c | 2 +- src/doveadm/dsync/dsync-mailbox-export.c | 2 +- src/doveadm/dsync/dsync-mailbox-import.c | 2 +- src/doveadm/dsync/dsync-mailbox-state.c | 2 +- src/doveadm/dsync/dsync-mailbox-tree-fill.c | 2 +- src/doveadm/dsync/dsync-mailbox-tree-sync.c | 2 +- src/doveadm/dsync/dsync-mailbox-tree.c | 2 +- src/doveadm/dsync/dsync-mailbox.c | 2 +- src/doveadm/dsync/dsync-serializer.c | 2 +- src/doveadm/dsync/dsync-transaction-log-scan.c | 2 +- src/doveadm/dsync/test-dsync-mailbox-tree-sync.c | 2 +- src/doveadm/main.c | 2 +- src/doveadm/server-connection.c | 2 +- src/imap-login/client-authenticate.c | 2 +- src/imap-login/client.c | 2 +- src/imap-login/imap-login-settings.c | 2 +- src/imap-login/imap-proxy.c | 2 +- src/imap-urlauth/imap-urlauth-client.c | 2 +- src/imap-urlauth/imap-urlauth-login-settings.c | 2 +- src/imap-urlauth/imap-urlauth-login.c | 2 +- src/imap-urlauth/imap-urlauth-settings.c | 2 +- src/imap-urlauth/imap-urlauth-worker-settings.c | 2 +- src/imap-urlauth/imap-urlauth-worker.c | 2 +- src/imap-urlauth/imap-urlauth.c | 2 +- src/imap/cmd-append.c | 2 +- src/imap/cmd-cancelupdate.c | 2 +- src/imap/cmd-capability.c | 2 +- src/imap/cmd-check.c | 2 +- src/imap/cmd-close.c | 2 +- src/imap/cmd-copy.c | 2 +- src/imap/cmd-create.c | 2 +- src/imap/cmd-delete.c | 2 +- src/imap/cmd-enable.c | 2 +- src/imap/cmd-examine.c | 2 +- src/imap/cmd-expunge.c | 2 +- src/imap/cmd-fetch.c | 2 +- src/imap/cmd-genurlauth.c | 2 +- src/imap/cmd-getmetadata.c | 2 +- src/imap/cmd-id.c | 2 +- src/imap/cmd-idle.c | 2 +- src/imap/cmd-list.c | 2 +- src/imap/cmd-logout.c | 2 +- src/imap/cmd-lsub.c | 2 +- src/imap/cmd-namespace.c | 2 +- src/imap/cmd-noop.c | 2 +- src/imap/cmd-notify.c | 2 +- src/imap/cmd-rename.c | 2 +- src/imap/cmd-resetkey.c | 2 +- src/imap/cmd-search.c | 2 +- src/imap/cmd-select.c | 2 +- src/imap/cmd-setmetadata.c | 2 +- src/imap/cmd-sort.c | 2 +- src/imap/cmd-status.c | 2 +- src/imap/cmd-store.c | 2 +- src/imap/cmd-subscribe.c | 2 +- src/imap/cmd-thread.c | 2 +- src/imap/cmd-unselect.c | 2 +- src/imap/cmd-unsubscribe.c | 2 +- src/imap/cmd-urlfetch.c | 2 +- src/imap/cmd-x-cancel.c | 2 +- src/imap/imap-client.c | 2 +- src/imap/imap-commands-util.c | 2 +- src/imap/imap-commands.c | 2 +- src/imap/imap-expunge.c | 2 +- src/imap/imap-fetch-body.c | 2 +- src/imap/imap-fetch.c | 2 +- src/imap/imap-list.c | 2 +- src/imap/imap-metadata.c | 2 +- src/imap/imap-notify.c | 2 +- src/imap/imap-search-args.c | 2 +- src/imap/imap-search.c | 2 +- src/imap/imap-settings.c | 2 +- src/imap/imap-status.c | 2 +- src/imap/imap-sync.c | 2 +- src/imap/mail-storage-callbacks.c | 2 +- src/imap/main.c | 2 +- src/indexer/indexer-client.c | 2 +- src/indexer/indexer-queue.c | 2 +- src/indexer/indexer-settings.c | 2 +- src/indexer/indexer-worker-settings.c | 2 +- src/indexer/indexer-worker.c | 2 +- src/indexer/indexer.c | 2 +- src/indexer/master-connection.c | 2 +- src/indexer/worker-connection.c | 2 +- src/indexer/worker-pool.c | 2 +- src/ipc/client.c | 2 +- src/ipc/ipc-connection.c | 2 +- src/ipc/ipc-group.c | 2 +- src/ipc/ipc-settings.c | 2 +- src/ipc/main.c | 2 +- src/lda/main.c | 2 +- src/lib-auth/auth-client-request.c | 2 +- src/lib-auth/auth-client.c | 2 +- src/lib-auth/auth-master.c | 2 +- src/lib-auth/auth-server-connection.c | 2 +- src/lib-charset/charset-iconv.c | 2 +- src/lib-charset/charset-utf8.c | 2 +- src/lib-compression/compression.c | 2 +- src/lib-compression/istream-bzlib.c | 2 +- src/lib-compression/istream-lzma.c | 2 +- src/lib-compression/istream-zlib.c | 2 +- src/lib-compression/ostream-bzlib.c | 2 +- src/lib-compression/ostream-lzma.c | 2 +- src/lib-compression/ostream-zlib.c | 2 +- src/lib-dict/dict-cdb.c | 2 +- src/lib-dict/dict-client.c | 2 +- src/lib-dict/dict-db.c | 2 +- src/lib-dict/dict-file.c | 2 +- src/lib-dict/dict-fs.c | 2 +- src/lib-dict/dict-memcached-ascii.c | 2 +- src/lib-dict/dict-memcached.c | 2 +- src/lib-dict/dict-redis.c | 2 +- src/lib-dict/dict-register.c | 2 +- src/lib-dict/dict-sql-settings.c | 2 +- src/lib-dict/dict-sql.c | 2 +- src/lib-dict/dict-transaction-memory.c | 2 +- src/lib-dict/dict.c | 2 +- src/lib-dict/test-dict.c | 2 +- src/lib-dns/dns-lookup.c | 2 +- src/lib-fs/fs-api.c | 2 +- src/lib-fs/fs-metawrap.c | 2 +- src/lib-fs/fs-posix.c | 2 +- src/lib-fs/fs-sis-common.c | 2 +- src/lib-fs/fs-sis-queue.c | 2 +- src/lib-fs/fs-sis.c | 2 +- src/lib-fs/istream-fs-file.c | 2 +- src/lib-fs/istream-metawrap.c | 2 +- src/lib-fs/ostream-cmp.c | 2 +- src/lib-fs/ostream-metawrap.c | 2 +- src/lib-http/http-client-connection.c | 2 +- src/lib-http/http-client-host.c | 2 +- src/lib-http/http-client-peer.c | 2 +- src/lib-http/http-client-queue.c | 2 +- src/lib-http/http-client-request.c | 2 +- src/lib-http/http-client.c | 2 +- src/lib-http/http-date.c | 2 +- src/lib-http/http-header-parser.c | 2 +- src/lib-http/http-header.c | 2 +- src/lib-http/http-message-parser.c | 2 +- src/lib-http/http-parser.c | 2 +- src/lib-http/http-request-parser.c | 2 +- src/lib-http/http-response-parser.c | 2 +- src/lib-http/http-transfer-chunked.c | 2 +- src/lib-http/http-url.c | 2 +- src/lib-http/test-http-client.c | 2 +- src/lib-http/test-http-date.c | 2 +- src/lib-http/test-http-header-parser.c | 2 +- src/lib-http/test-http-request-parser.c | 2 +- src/lib-http/test-http-response-parser.c | 2 +- src/lib-http/test-http-server.c | 2 +- src/lib-http/test-http-transfer.c | 2 +- src/lib-http/test-http-url.c | 2 +- src/lib-imap-client/imapc-client.c | 2 +- src/lib-imap-client/imapc-connection.c | 2 +- src/lib-imap-client/imapc-msgmap.c | 2 +- src/lib-imap-storage/imap-msgpart-url.c | 2 +- src/lib-imap-storage/imap-msgpart.c | 2 +- src/lib-imap-urlauth/imap-urlauth-backend.c | 2 +- src/lib-imap-urlauth/imap-urlauth-connection.c | 2 +- src/lib-imap-urlauth/imap-urlauth-fetch.c | 2 +- src/lib-imap-urlauth/imap-urlauth.c | 2 +- src/lib-imap/imap-arg.c | 2 +- src/lib-imap/imap-base-subject.c | 2 +- src/lib-imap/imap-bodystructure.c | 2 +- src/lib-imap/imap-date.c | 2 +- src/lib-imap/imap-envelope.c | 2 +- src/lib-imap/imap-id.c | 2 +- src/lib-imap/imap-match.c | 2 +- src/lib-imap/imap-parser.c | 2 +- src/lib-imap/imap-quote.c | 2 +- src/lib-imap/imap-seqset.c | 2 +- src/lib-imap/imap-url.c | 2 +- src/lib-imap/imap-utf7.c | 2 +- src/lib-imap/imap-util.c | 2 +- src/lib-imap/test-imap-bodystructure.c | 2 +- src/lib-imap/test-imap-match.c | 2 +- src/lib-imap/test-imap-parser.c | 2 +- src/lib-imap/test-imap-quote.c | 2 +- src/lib-imap/test-imap-url.c | 2 +- src/lib-imap/test-imap-utf7.c | 2 +- src/lib-imap/test-imap-util.c | 2 +- src/lib-index/mail-cache-compress.c | 2 +- src/lib-index/mail-cache-decisions.c | 2 +- src/lib-index/mail-cache-fields.c | 2 +- src/lib-index/mail-cache-lookup.c | 2 +- src/lib-index/mail-cache-sync-update.c | 2 +- src/lib-index/mail-cache-transaction.c | 2 +- src/lib-index/mail-cache.c | 2 +- src/lib-index/mail-index-alloc-cache.c | 2 +- src/lib-index/mail-index-dummy-view.c | 2 +- src/lib-index/mail-index-fsck.c | 2 +- src/lib-index/mail-index-lock.c | 2 +- src/lib-index/mail-index-map-hdr.c | 2 +- src/lib-index/mail-index-map-read.c | 2 +- src/lib-index/mail-index-map.c | 2 +- src/lib-index/mail-index-modseq.c | 2 +- src/lib-index/mail-index-strmap.c | 2 +- src/lib-index/mail-index-sync-ext.c | 2 +- src/lib-index/mail-index-sync-keywords.c | 2 +- src/lib-index/mail-index-sync-update.c | 2 +- src/lib-index/mail-index-sync.c | 2 +- src/lib-index/mail-index-transaction-export.c | 2 +- src/lib-index/mail-index-transaction-finish.c | 2 +- src/lib-index/mail-index-transaction-sort-appends.c | 2 +- src/lib-index/mail-index-transaction-update.c | 2 +- src/lib-index/mail-index-transaction-view.c | 2 +- src/lib-index/mail-index-transaction.c | 2 +- src/lib-index/mail-index-util.c | 2 +- src/lib-index/mail-index-view-sync.c | 2 +- src/lib-index/mail-index-view.c | 2 +- src/lib-index/mail-index-write.c | 2 +- src/lib-index/mail-index.c | 2 +- src/lib-index/mail-transaction-log-append.c | 2 +- src/lib-index/mail-transaction-log-file.c | 2 +- src/lib-index/mail-transaction-log-view.c | 2 +- src/lib-index/mail-transaction-log.c | 2 +- src/lib-index/mailbox-log.c | 2 +- src/lib-index/test-mail-index-sync-ext.c | 2 +- src/lib-index/test-mail-index-transaction-finish.c | 2 +- src/lib-index/test-mail-index-transaction-update.c | 2 +- src/lib-index/test-mail-transaction-log-append.c | 2 +- src/lib-index/test-mail-transaction-log-view.c | 2 +- src/lib-lda/duplicate.c | 2 +- src/lib-lda/lda-settings.c | 2 +- src/lib-lda/lmtp-client.c | 2 +- src/lib-lda/mail-deliver.c | 2 +- src/lib-lda/mail-send.c | 2 +- src/lib-lda/smtp-client.c | 2 +- src/lib-mail/istream-attachment-connector.c | 2 +- src/lib-mail/istream-attachment-extractor.c | 2 +- src/lib-mail/istream-binary-converter.c | 2 +- src/lib-mail/istream-dot.c | 2 +- src/lib-mail/istream-header-filter.c | 2 +- src/lib-mail/istream-nonuls.c | 2 +- src/lib-mail/istream-qp-decoder.c | 2 +- src/lib-mail/mail-user-hash.c | 2 +- src/lib-mail/mbox-from.c | 2 +- src/lib-mail/message-address.c | 2 +- src/lib-mail/message-binary-part.c | 2 +- src/lib-mail/message-date.c | 2 +- src/lib-mail/message-decoder.c | 2 +- src/lib-mail/message-header-decode.c | 2 +- src/lib-mail/message-header-encode.c | 2 +- src/lib-mail/message-header-parser.c | 2 +- src/lib-mail/message-id.c | 2 +- src/lib-mail/message-parser.c | 2 +- src/lib-mail/message-part-serialize.c | 2 +- src/lib-mail/message-search.c | 2 +- src/lib-mail/message-size.c | 2 +- src/lib-mail/quoted-printable.c | 2 +- src/lib-mail/rfc2231-parser.c | 2 +- src/lib-mail/rfc822-parser.c | 2 +- src/lib-mail/test-istream-attachment.c | 2 +- src/lib-mail/test-istream-binary-converter.c | 2 +- src/lib-mail/test-istream-dot.c | 2 +- src/lib-mail/test-istream-header-filter.c | 2 +- src/lib-mail/test-istream-qp-decoder.c | 2 +- src/lib-mail/test-mbox-from.c | 2 +- src/lib-mail/test-message-address.c | 2 +- src/lib-mail/test-message-date.c | 2 +- src/lib-mail/test-message-decoder.c | 2 +- src/lib-mail/test-message-header-decode.c | 2 +- src/lib-mail/test-message-header-encode.c | 2 +- src/lib-mail/test-message-header-parser.c | 2 +- src/lib-mail/test-message-id.c | 2 +- src/lib-mail/test-message-parser.c | 2 +- src/lib-mail/test-quoted-printable.c | 2 +- src/lib-mail/test-rfc2231-parser.c | 2 +- src/lib-master/anvil-client.c | 2 +- src/lib-master/ipc-client.c | 2 +- src/lib-master/ipc-server.c | 2 +- src/lib-master/master-auth.c | 2 +- src/lib-master/master-instance.c | 2 +- src/lib-master/master-login-auth.c | 2 +- src/lib-master/master-login.c | 2 +- src/lib-master/master-service-settings-cache.c | 2 +- src/lib-master/master-service-settings.c | 2 +- src/lib-master/master-service-ssl-settings.c | 2 +- src/lib-master/master-service-ssl.c | 2 +- src/lib-master/master-service.c | 2 +- src/lib-master/mountpoint-list.c | 2 +- src/lib-master/syslog-util.c | 2 +- src/lib-sasl/dsasl-client.c | 2 +- src/lib-sasl/mech-login.c | 2 +- src/lib-sasl/mech-plain.c | 2 +- src/lib-settings/settings-parser.c | 2 +- src/lib-settings/settings.c | 2 +- src/lib-sql/driver-mysql.c | 2 +- src/lib-sql/driver-pgsql.c | 2 +- src/lib-sql/driver-sqlite.c | 2 +- src/lib-sql/driver-sqlpool.c | 2 +- src/lib-sql/sql-api.c | 2 +- src/lib-sql/sql-db-cache.c | 2 +- src/lib-ssl-iostream/iostream-openssl-common.c | 2 +- src/lib-ssl-iostream/iostream-openssl-context.c | 2 +- src/lib-ssl-iostream/iostream-openssl-params.c | 2 +- src/lib-ssl-iostream/iostream-openssl.c | 2 +- src/lib-ssl-iostream/iostream-ssl.c | 2 +- src/lib-ssl-iostream/istream-openssl.c | 2 +- src/lib-ssl-iostream/ostream-openssl.c | 2 +- src/lib-storage/fail-mail-storage.c | 2 +- src/lib-storage/fail-mail.c | 2 +- src/lib-storage/fail-mailbox.c | 2 +- src/lib-storage/index/cydir/cydir-mail.c | 2 +- src/lib-storage/index/cydir/cydir-save.c | 2 +- src/lib-storage/index/cydir/cydir-storage.c | 2 +- src/lib-storage/index/cydir/cydir-sync.c | 2 +- src/lib-storage/index/dbox-common/dbox-attachment.c | 2 +- src/lib-storage/index/dbox-common/dbox-file-fix.c | 2 +- src/lib-storage/index/dbox-common/dbox-file.c | 2 +- src/lib-storage/index/dbox-common/dbox-mail.c | 2 +- src/lib-storage/index/dbox-common/dbox-save.c | 2 +- src/lib-storage/index/dbox-common/dbox-storage.c | 2 +- src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c | 2 +- src/lib-storage/index/dbox-multi/mdbox-file.c | 2 +- src/lib-storage/index/dbox-multi/mdbox-mail.c | 2 +- src/lib-storage/index/dbox-multi/mdbox-map.c | 2 +- src/lib-storage/index/dbox-multi/mdbox-purge.c | 2 +- src/lib-storage/index/dbox-multi/mdbox-save.c | 2 +- src/lib-storage/index/dbox-multi/mdbox-settings.c | 2 +- src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c | 2 +- src/lib-storage/index/dbox-multi/mdbox-storage.c | 2 +- src/lib-storage/index/dbox-multi/mdbox-sync.c | 2 +- src/lib-storage/index/dbox-single/sdbox-copy.c | 2 +- src/lib-storage/index/dbox-single/sdbox-file.c | 2 +- src/lib-storage/index/dbox-single/sdbox-mail.c | 2 +- src/lib-storage/index/dbox-single/sdbox-save.c | 2 +- src/lib-storage/index/dbox-single/sdbox-storage.c | 2 +- src/lib-storage/index/dbox-single/sdbox-sync-rebuild.c | 2 +- src/lib-storage/index/dbox-single/sdbox-sync.c | 2 +- src/lib-storage/index/imapc/imapc-list.c | 2 +- src/lib-storage/index/imapc/imapc-mail-fetch.c | 2 +- src/lib-storage/index/imapc/imapc-mail.c | 2 +- src/lib-storage/index/imapc/imapc-mailbox.c | 2 +- src/lib-storage/index/imapc/imapc-save.c | 2 +- src/lib-storage/index/imapc/imapc-settings.c | 2 +- src/lib-storage/index/imapc/imapc-storage.c | 2 +- src/lib-storage/index/imapc/imapc-sync.c | 2 +- src/lib-storage/index/index-attachment.c | 2 +- src/lib-storage/index/index-attribute.c | 2 +- src/lib-storage/index/index-mail-binary.c | 2 +- src/lib-storage/index/index-mail-headers.c | 2 +- src/lib-storage/index/index-mail.c | 2 +- src/lib-storage/index/index-mailbox-check.c | 2 +- src/lib-storage/index/index-rebuild.c | 2 +- src/lib-storage/index/index-search-result.c | 2 +- src/lib-storage/index/index-search.c | 2 +- src/lib-storage/index/index-sort-string.c | 2 +- src/lib-storage/index/index-sort.c | 2 +- src/lib-storage/index/index-status.c | 2 +- src/lib-storage/index/index-storage.c | 2 +- src/lib-storage/index/index-sync-changes.c | 2 +- src/lib-storage/index/index-sync-pvt.c | 2 +- src/lib-storage/index/index-sync-search.c | 2 +- src/lib-storage/index/index-sync.c | 2 +- src/lib-storage/index/index-thread-finish.c | 2 +- src/lib-storage/index/index-thread-links.c | 2 +- src/lib-storage/index/index-thread.c | 2 +- src/lib-storage/index/index-transaction.c | 2 +- src/lib-storage/index/istream-mail.c | 2 +- src/lib-storage/index/maildir/maildir-copy.c | 2 +- src/lib-storage/index/maildir/maildir-filename-flags.c | 2 +- src/lib-storage/index/maildir/maildir-filename.c | 2 +- src/lib-storage/index/maildir/maildir-keywords.c | 2 +- src/lib-storage/index/maildir/maildir-mail.c | 2 +- src/lib-storage/index/maildir/maildir-save.c | 2 +- src/lib-storage/index/maildir/maildir-settings.c | 2 +- src/lib-storage/index/maildir/maildir-storage.c | 2 +- src/lib-storage/index/maildir/maildir-sync-index.c | 2 +- src/lib-storage/index/maildir/maildir-sync.c | 2 +- src/lib-storage/index/maildir/maildir-uidlist.c | 2 +- src/lib-storage/index/maildir/maildir-util.c | 2 +- src/lib-storage/index/mbox/istream-raw-mbox.c | 2 +- src/lib-storage/index/mbox/mbox-file.c | 2 +- src/lib-storage/index/mbox/mbox-lock.c | 2 +- src/lib-storage/index/mbox/mbox-mail.c | 2 +- src/lib-storage/index/mbox/mbox-md5-all.c | 2 +- src/lib-storage/index/mbox/mbox-md5-apop3d.c | 2 +- src/lib-storage/index/mbox/mbox-save.c | 2 +- src/lib-storage/index/mbox/mbox-settings.c | 2 +- src/lib-storage/index/mbox/mbox-storage.c | 2 +- src/lib-storage/index/mbox/mbox-sync-list-index.c | 2 +- src/lib-storage/index/mbox/mbox-sync-parse.c | 2 +- src/lib-storage/index/mbox/mbox-sync-rewrite.c | 2 +- src/lib-storage/index/mbox/mbox-sync-update.c | 2 +- src/lib-storage/index/mbox/mbox-sync.c | 2 +- src/lib-storage/index/pop3c/pop3c-client.c | 2 +- src/lib-storage/index/pop3c/pop3c-mail.c | 2 +- src/lib-storage/index/pop3c/pop3c-settings.c | 2 +- src/lib-storage/index/pop3c/pop3c-storage.c | 2 +- src/lib-storage/index/pop3c/pop3c-sync.c | 2 +- src/lib-storage/index/raw/raw-mail.c | 2 +- src/lib-storage/index/raw/raw-storage.c | 2 +- src/lib-storage/index/raw/raw-sync.c | 2 +- src/lib-storage/index/shared/shared-list.c | 2 +- src/lib-storage/index/shared/shared-storage.c | 2 +- src/lib-storage/list/mailbox-list-delete.c | 2 +- src/lib-storage/list/mailbox-list-fs-flags.c | 2 +- src/lib-storage/list/mailbox-list-fs-iter.c | 2 +- src/lib-storage/list/mailbox-list-fs.c | 2 +- src/lib-storage/list/mailbox-list-index-backend.c | 2 +- src/lib-storage/list/mailbox-list-index-iter.c | 2 +- src/lib-storage/list/mailbox-list-index-notify.c | 2 +- src/lib-storage/list/mailbox-list-index-status.c | 2 +- src/lib-storage/list/mailbox-list-index-sync.c | 2 +- src/lib-storage/list/mailbox-list-index.c | 2 +- src/lib-storage/list/mailbox-list-iter.c | 2 +- src/lib-storage/list/mailbox-list-maildir-iter.c | 2 +- src/lib-storage/list/mailbox-list-maildir.c | 2 +- src/lib-storage/list/mailbox-list-none.c | 2 +- src/lib-storage/list/mailbox-list-notify-tree.c | 2 +- src/lib-storage/list/mailbox-list-subscriptions.c | 2 +- src/lib-storage/list/subscription-file.c | 2 +- src/lib-storage/mail-copy.c | 2 +- src/lib-storage/mail-error.c | 2 +- src/lib-storage/mail-namespace.c | 2 +- src/lib-storage/mail-search-build.c | 2 +- src/lib-storage/mail-search-parser-cmdline.c | 2 +- src/lib-storage/mail-search-parser-imap.c | 2 +- src/lib-storage/mail-search-parser.c | 2 +- src/lib-storage/mail-search-register-human.c | 2 +- src/lib-storage/mail-search-register-imap.c | 2 +- src/lib-storage/mail-search-register.c | 2 +- src/lib-storage/mail-search.c | 2 +- src/lib-storage/mail-storage-hooks.c | 2 +- src/lib-storage/mail-storage-service.c | 2 +- src/lib-storage/mail-storage-settings.c | 2 +- src/lib-storage/mail-storage.c | 2 +- src/lib-storage/mail-thread.c | 2 +- src/lib-storage/mail-user.c | 2 +- src/lib-storage/mail.c | 2 +- src/lib-storage/mailbox-get.c | 2 +- src/lib-storage/mailbox-guid-cache.c | 2 +- src/lib-storage/mailbox-header.c | 2 +- src/lib-storage/mailbox-keywords.c | 2 +- src/lib-storage/mailbox-list-notify.c | 2 +- src/lib-storage/mailbox-list.c | 2 +- src/lib-storage/mailbox-search-result.c | 2 +- src/lib-storage/mailbox-tree.c | 2 +- src/lib-storage/mailbox-uidvalidity.c | 2 +- src/lib-storage/test-mailbox-get.c | 2 +- src/lib-test/test-common.c | 2 +- src/lib/abspath.c | 2 +- src/lib/aqueue.c | 2 +- src/lib/array.c | 2 +- src/lib/askpass.c | 2 +- src/lib/backtrace-string.c | 2 +- src/lib/base64.c | 2 +- src/lib/bsearch-insert-pos.c | 2 +- src/lib/buffer.c | 2 +- src/lib/child-wait.c | 2 +- src/lib/compat.c | 2 +- src/lib/connection.c | 2 +- src/lib/crc32.c | 2 +- src/lib/data-stack.c | 2 +- src/lib/eacces-error.c | 2 +- src/lib/env-util.c | 2 +- src/lib/execv-const.c | 2 +- src/lib/failures.c | 2 +- src/lib/fd-close-on-exec.c | 2 +- src/lib/fd-set-nonblock.c | 2 +- src/lib/fdatasync-path.c | 2 +- src/lib/fdpass.c | 2 +- src/lib/file-cache.c | 2 +- src/lib/file-copy.c | 2 +- src/lib/file-dotlock.c | 2 +- src/lib/file-lock.c | 2 +- src/lib/file-set-size.c | 2 +- src/lib/guid.c | 2 +- src/lib/hash-format.c | 2 +- src/lib/hash-method.c | 2 +- src/lib/hash.c | 2 +- src/lib/hash2.c | 2 +- src/lib/hex-binary.c | 2 +- src/lib/hex-dec.c | 2 +- src/lib/home-expand.c | 2 +- src/lib/hostpid.c | 2 +- src/lib/imem.c | 2 +- src/lib/ioloop-epoll.c | 2 +- src/lib/ioloop-notify-dn.c | 2 +- src/lib/ioloop-notify-fd.c | 2 +- src/lib/ioloop-notify-inotify.c | 2 +- src/lib/ioloop-notify-none.c | 2 +- src/lib/ioloop-poll.c | 2 +- src/lib/ioloop-select.c | 2 +- src/lib/ioloop.c | 2 +- src/lib/iostream-rawlog.c | 2 +- src/lib/iostream-temp.c | 2 +- src/lib/iostream.c | 2 +- src/lib/ipwd.c | 2 +- src/lib/iso8601-date.c | 2 +- src/lib/istream-base64-decoder.c | 2 +- src/lib/istream-base64-encoder.c | 2 +- src/lib/istream-chain.c | 2 +- src/lib/istream-concat.c | 2 +- src/lib/istream-crlf.c | 2 +- src/lib/istream-data.c | 2 +- src/lib/istream-file.c | 2 +- src/lib/istream-hash.c | 2 +- src/lib/istream-jsonstr.c | 2 +- src/lib/istream-limit.c | 2 +- src/lib/istream-mmap.c | 2 +- src/lib/istream-rawlog.c | 2 +- src/lib/istream-seekable.c | 2 +- src/lib/istream-sized.c | 2 +- src/lib/istream-tee.c | 2 +- src/lib/istream.c | 2 +- src/lib/json-parser.c | 2 +- src/lib/lib-signals.c | 2 +- src/lib/lib.c | 2 +- src/lib/mempool-alloconly.c | 2 +- src/lib/mempool-datastack.c | 2 +- src/lib/mempool-system.c | 2 +- src/lib/mempool-unsafe-datastack.c | 2 +- src/lib/mempool.c | 2 +- src/lib/mkdir-parents.c | 2 +- src/lib/mmap-anon.c | 2 +- src/lib/mmap-util.c | 2 +- src/lib/module-dir.c | 2 +- src/lib/mountpoint.c | 2 +- src/lib/net.c | 2 +- src/lib/nfs-workarounds.c | 2 +- src/lib/numpack.c | 2 +- src/lib/ostream-buffer.c | 2 +- src/lib/ostream-file.c | 2 +- src/lib/ostream-hash.c | 2 +- src/lib/ostream-rawlog.c | 2 +- src/lib/ostream.c | 2 +- src/lib/primes.c | 2 +- src/lib/printf-format-fix.c | 2 +- src/lib/priorityq.c | 2 +- src/lib/process-title.c | 2 +- src/lib/randgen.c | 2 +- src/lib/read-full.c | 2 +- src/lib/restrict-access.c | 2 +- src/lib/restrict-process-size.c | 2 +- src/lib/safe-memset.c | 2 +- src/lib/safe-mkdir.c | 2 +- src/lib/safe-mkstemp.c | 2 +- src/lib/sendfile-util.c | 2 +- src/lib/seq-range-array.c | 2 +- src/lib/str-find.c | 2 +- src/lib/str-sanitize.c | 2 +- src/lib/str.c | 2 +- src/lib/strescape.c | 2 +- src/lib/strfuncs.c | 2 +- src/lib/strnum.c | 2 +- src/lib/test-aqueue.c | 2 +- src/lib/test-array.c | 2 +- src/lib/test-base64.c | 2 +- src/lib/test-bsearch-insert-pos.c | 2 +- src/lib/test-buffer.c | 2 +- src/lib/test-crc32.c | 2 +- src/lib/test-hash-format.c | 2 +- src/lib/test-hex-binary.c | 2 +- src/lib/test-iso8601-date.c | 2 +- src/lib/test-istream-base64-decoder.c | 2 +- src/lib/test-istream-base64-encoder.c | 2 +- src/lib/test-istream-concat.c | 2 +- src/lib/test-istream-crlf.c | 2 +- src/lib/test-istream-seekable.c | 2 +- src/lib/test-istream-tee.c | 2 +- src/lib/test-json-parser.c | 2 +- src/lib/test-lib.c | 2 +- src/lib/test-llist.c | 2 +- src/lib/test-mempool-alloconly.c | 2 +- src/lib/test-network.c | 2 +- src/lib/test-numpack.c | 2 +- src/lib/test-ostream-file.c | 2 +- src/lib/test-primes.c | 2 +- src/lib/test-priorityq.c | 2 +- src/lib/test-seq-range-array.c | 2 +- src/lib/test-str-find.c | 2 +- src/lib/test-str-sanitize.c | 2 +- src/lib/test-strescape.c | 2 +- src/lib/test-strfuncs.c | 2 +- src/lib/test-time-util.c | 2 +- src/lib/test-unichar.c | 2 +- src/lib/test-utc-mktime.c | 2 +- src/lib/test-var-expand.c | 2 +- src/lib/time-util.c | 2 +- src/lib/unichar.c | 2 +- src/lib/unix-socket-create.c | 2 +- src/lib/unlink-directory.c | 2 +- src/lib/unlink-old-files.c | 2 +- src/lib/uri-util.c | 2 +- src/lib/utc-mktime.c | 2 +- src/lib/utc-offset.c | 2 +- src/lib/var-expand.c | 2 +- src/lib/write-full.c | 2 +- src/lmtp/client.c | 2 +- src/lmtp/commands.c | 2 +- src/lmtp/lmtp-proxy.c | 2 +- src/lmtp/lmtp-settings.c | 2 +- src/lmtp/main.c | 2 +- src/log/doveadm-connection.c | 2 +- src/log/log-connection.c | 2 +- src/log/log-error-buffer.c | 2 +- src/log/log-settings.c | 2 +- src/log/main.c | 2 +- src/login-common/access-lookup.c | 2 +- src/login-common/client-common-auth.c | 2 +- src/login-common/client-common.c | 2 +- src/login-common/login-proxy-state.c | 2 +- src/login-common/login-proxy.c | 2 +- src/login-common/login-settings.c | 2 +- src/login-common/main.c | 2 +- src/login-common/sasl-server.c | 2 +- src/login-common/ssl-proxy-gnutls.c | 2 +- src/login-common/ssl-proxy-openssl.c | 2 +- src/login-common/ssl-proxy.c | 2 +- src/master/capabilities-posix.c | 2 +- src/master/dup2-array.c | 2 +- src/master/main.c | 2 +- src/master/master-settings.c | 2 +- src/master/service-anvil.c | 2 +- src/master/service-listen.c | 2 +- src/master/service-log.c | 2 +- src/master/service-monitor.c | 2 +- src/master/service-process-notify.c | 2 +- src/master/service-process.c | 2 +- src/master/service.c | 2 +- src/plugins/acl/acl-api.c | 2 +- src/plugins/acl/acl-attributes.c | 2 +- src/plugins/acl/acl-backend-vfile-acllist.c | 2 +- src/plugins/acl/acl-backend.c | 2 +- src/plugins/acl/acl-cache.c | 2 +- src/plugins/acl/acl-lookup-dict.c | 2 +- src/plugins/acl/acl-mailbox-list.c | 2 +- src/plugins/acl/acl-mailbox.c | 2 +- src/plugins/acl/acl-plugin.c | 2 +- src/plugins/acl/acl-shared-storage.c | 2 +- src/plugins/acl/acl-storage.c | 2 +- src/plugins/acl/doveadm-acl.c | 2 +- src/plugins/autocreate/autocreate-plugin.c | 2 +- src/plugins/expire/doveadm-expire.c | 2 +- src/plugins/expire/expire-plugin.c | 2 +- src/plugins/expire/expire-set.c | 2 +- src/plugins/fts-lucene/doveadm-fts-lucene.c | 2 +- src/plugins/fts-lucene/fts-backend-lucene.c | 2 +- src/plugins/fts-lucene/fts-lucene-plugin.c | 2 +- src/plugins/fts-solr/fts-backend-solr-old.c | 2 +- src/plugins/fts-solr/fts-backend-solr.c | 2 +- src/plugins/fts-solr/fts-solr-plugin.c | 2 +- src/plugins/fts-solr/solr-connection.c | 2 +- src/plugins/fts-squat/fts-backend-squat.c | 2 +- src/plugins/fts-squat/fts-squat-plugin.c | 2 +- src/plugins/fts-squat/squat-test.c | 2 +- src/plugins/fts-squat/squat-trie.c | 2 +- src/plugins/fts-squat/squat-uidlist.c | 2 +- src/plugins/fts/doveadm-dump-fts-expunge-log.c | 2 +- src/plugins/fts/doveadm-fts.c | 2 +- src/plugins/fts/fts-api.c | 2 +- src/plugins/fts/fts-build-mail.c | 2 +- src/plugins/fts/fts-expunge-log.c | 2 +- src/plugins/fts/fts-indexer.c | 2 +- src/plugins/fts/fts-parser-html.c | 2 +- src/plugins/fts/fts-parser-script.c | 2 +- src/plugins/fts/fts-parser.c | 2 +- src/plugins/fts/fts-plugin.c | 2 +- src/plugins/fts/fts-search-serialize.c | 2 +- src/plugins/fts/fts-search.c | 2 +- src/plugins/fts/fts-storage.c | 2 +- src/plugins/fts/xml2text.c | 2 +- src/plugins/imap-acl/imap-acl-plugin.c | 2 +- src/plugins/imap-quota/imap-quota-plugin.c | 2 +- src/plugins/imap-stats/imap-stats-plugin.c | 2 +- src/plugins/imap-zlib/imap-zlib-plugin.c | 2 +- src/plugins/lazy-expunge/lazy-expunge-plugin.c | 2 +- src/plugins/listescape/listescape-plugin.c | 2 +- src/plugins/mail-filter/istream-ext-filter.c | 2 +- src/plugins/mail-filter/mail-filter-plugin.c | 2 +- src/plugins/mail-filter/ostream-ext-filter.c | 2 +- src/plugins/mail-log/mail-log-plugin.c | 2 +- src/plugins/mailbox-alias/mailbox-alias-plugin.c | 2 +- src/plugins/notify/notify-plugin.c | 2 +- src/plugins/notify/notify-storage.c | 2 +- src/plugins/pop3-migration/pop3-migration-plugin.c | 2 +- src/plugins/quota/doveadm-quota.c | 2 +- src/plugins/quota/quota-count.c | 2 +- src/plugins/quota/quota-dict.c | 2 +- src/plugins/quota/quota-dirsize.c | 2 +- src/plugins/quota/quota-fs.c | 2 +- src/plugins/quota/quota-maildir.c | 2 +- src/plugins/quota/quota-plugin.c | 2 +- src/plugins/quota/quota-status.c | 2 +- src/plugins/quota/quota-storage.c | 2 +- src/plugins/quota/quota.c | 2 +- src/plugins/replication/replication-plugin.c | 2 +- src/plugins/snarf/snarf-plugin.c | 2 +- src/plugins/stats/stats-connection.c | 2 +- src/plugins/stats/stats-plugin.c | 2 +- src/plugins/trash/trash-plugin.c | 2 +- src/plugins/virtual/virtual-config.c | 2 +- src/plugins/virtual/virtual-mail.c | 2 +- src/plugins/virtual/virtual-plugin.c | 2 +- src/plugins/virtual/virtual-save.c | 2 +- src/plugins/virtual/virtual-search.c | 2 +- src/plugins/virtual/virtual-storage.c | 2 +- src/plugins/virtual/virtual-sync.c | 2 +- src/plugins/virtual/virtual-transaction.c | 2 +- src/plugins/zlib/zlib-plugin.c | 2 +- src/pop3-login/client-authenticate.c | 2 +- src/pop3-login/client.c | 2 +- src/pop3-login/pop3-login-settings.c | 2 +- src/pop3-login/pop3-proxy.c | 2 +- src/pop3/main.c | 2 +- src/pop3/pop3-client.c | 2 +- src/pop3/pop3-commands.c | 2 +- src/pop3/pop3-settings.c | 2 +- src/replication/aggregator/aggregator-settings.c | 2 +- src/replication/aggregator/aggregator.c | 2 +- src/replication/aggregator/notify-connection.c | 2 +- src/replication/aggregator/replicator-connection.c | 2 +- src/replication/replicator/doveadm-connection.c | 2 +- src/replication/replicator/dsync-client.c | 2 +- src/replication/replicator/notify-connection.c | 2 +- src/replication/replicator/replicator-brain.c | 2 +- src/replication/replicator/replicator-queue.c | 2 +- src/replication/replicator/replicator-settings.c | 2 +- src/replication/replicator/replicator.c | 2 +- src/ssl-params/main.c | 2 +- src/ssl-params/ssl-params-openssl.c | 2 +- src/ssl-params/ssl-params-settings.c | 2 +- src/ssl-params/ssl-params.c | 2 +- src/stats/client-export.c | 2 +- src/stats/client.c | 2 +- src/stats/global-memory.c | 2 +- src/stats/mail-command.c | 2 +- src/stats/mail-domain.c | 2 +- src/stats/mail-ip.c | 2 +- src/stats/mail-server-connection.c | 2 +- src/stats/mail-session.c | 2 +- src/stats/mail-stats.c | 2 +- src/stats/mail-user.c | 2 +- src/stats/main.c | 2 +- src/stats/stats-settings.c | 2 +- src/util/gdbhelper.c | 2 +- src/util/maildirlock.c | 2 +- src/util/rawlog.c | 2 +- src/util/script-login.c | 2 +- src/util/script.c | 2 +- src/util/tcpwrap-settings.c | 2 +- src/util/tcpwrap.c | 2 +- 896 files changed, 896 insertions(+), 896 deletions(-) diffs (truncated from 8064 to 300 lines): diff -r c329508e4fec -r add8c00fb3cc src/anvil/anvil-connection.c --- a/src/anvil/anvil-connection.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/anvil/anvil-connection.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2009-2014 Dovecot authors, see the included COPYING file */ #include "common.h" #include "llist.h" diff -r c329508e4fec -r add8c00fb3cc src/anvil/anvil-settings.c --- a/src/anvil/anvil-settings.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/anvil/anvil-settings.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2009-2014 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "buffer.h" diff -r c329508e4fec -r add8c00fb3cc src/anvil/connect-limit.c --- a/src/anvil/connect-limit.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/anvil/connect-limit.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2009-2014 Dovecot authors, see the included COPYING file */ #include "common.h" #include "hash.h" diff -r c329508e4fec -r add8c00fb3cc src/anvil/main.c --- a/src/anvil/main.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/anvil/main.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2009-2014 Dovecot authors, see the included COPYING file */ #include "common.h" #include "array.h" diff -r c329508e4fec -r add8c00fb3cc src/anvil/penalty.c --- a/src/anvil/penalty.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/anvil/penalty.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2009-2014 Dovecot authors, see the included COPYING file */ /* The idea behind checksums is that the same username+password doesn't increase the penalty, because it's most likely a user with a misconfigured diff -r c329508e4fec -r add8c00fb3cc src/anvil/test-penalty.c --- a/src/anvil/test-penalty.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/anvil/test-penalty.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2010-2014 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "ioloop.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/auth-cache.c --- a/src/auth/auth-cache.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth-cache.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2004-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "lib-signals.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/auth-client-connection.c --- a/src/auth/auth-client-connection.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth-client-connection.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2002-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "ioloop.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/auth-fields.c --- a/src/auth/auth-fields.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth-fields.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2005-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "array.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/auth-master-connection.c --- a/src/auth/auth-master-connection.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth-master-connection.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2002-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "buffer.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/auth-penalty.c --- a/src/auth/auth-penalty.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth-penalty.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2009-2014 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "ioloop.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/auth-postfix-connection.c --- a/src/auth/auth-postfix-connection.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth-postfix-connection.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2011-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "ioloop.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/auth-request-handler.c --- a/src/auth/auth-request-handler.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth-request-handler.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2005-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "ioloop.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/auth-request.c --- a/src/auth/auth-request.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth-request.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2002-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "ioloop.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/auth-settings.c --- a/src/auth/auth-settings.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth-settings.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2005-2014 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "array.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/auth-token.c --- a/src/auth/auth-token.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth-token.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2013-2014 Dovecot authors, see the included COPYING file */ /* Auth process maintains a random secret. Once a user authenticates the response to the REQUEST command from a master service is augmented with an diff -r c329508e4fec -r add8c00fb3cc src/auth/auth-worker-client.c --- a/src/auth/auth-worker-client.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth-worker-client.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2005-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "base64.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/auth-worker-server.c --- a/src/auth/auth-worker-server.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth-worker-server.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2005-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "ioloop.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/auth.c --- a/src/auth/auth.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/auth.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2005-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "array.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/db-checkpassword.c --- a/src/auth/db-checkpassword.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/db-checkpassword.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2004-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/db-dict-cache-key.c --- a/src/auth/db-dict-cache-key.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/db-dict-cache-key.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2013-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "array.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/db-dict.c --- a/src/auth/db-dict.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/db-dict.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2013-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/db-ldap.c --- a/src/auth/db-ldap.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/db-ldap.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2003-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2003-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/db-passwd-file.c --- a/src/auth/db-passwd-file.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/db-passwd-file.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2002-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/db-sql.c --- a/src/auth/db-sql.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/db-sql.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2003-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2003-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/main.c --- a/src/auth/main.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/main.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2002-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "array.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/mech-anonymous.c --- a/src/auth/mech-anonymous.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/mech-anonymous.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2002-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "mech.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/mech-cram-md5.c --- a/src/auth/mech-cram-md5.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/mech-cram-md5.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2002-2014 Dovecot authors, see the included COPYING file */ /* CRAM-MD5 SASL authentication, see RFC-2195 Joshua Goodall */ diff -r c329508e4fec -r add8c00fb3cc src/auth/mech-digest-md5.c --- a/src/auth/mech-digest-md5.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/mech-digest-md5.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2002-2014 Dovecot authors, see the included COPYING file */ /* Digest-MD5 SASL authentication, see RFC-2831 */ diff -r c329508e4fec -r add8c00fb3cc src/auth/mech-dovecot-token.c --- a/src/auth/mech-dovecot-token.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/mech-dovecot-token.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2013-2014 Dovecot authors, see the included COPYING file */ /* Used internally by Dovecot processes to authenticate against each others (e.g. imap to imap-urlauth). See auth-token.c */ diff -r c329508e4fec -r add8c00fb3cc src/auth/mech-external.c --- a/src/auth/mech-external.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/mech-external.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2009-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "passdb.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/mech-plain.c --- a/src/auth/mech-plain.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/mech-plain.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2002-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "safe-memset.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/mech.c --- a/src/auth/mech.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/mech.c Tue Feb 04 16:23:22 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2002-2014 Dovecot authors, see the included COPYING file */ #include "auth-common.h" #include "ioloop.h" diff -r c329508e4fec -r add8c00fb3cc src/auth/passdb-blocking.c --- a/src/auth/passdb-blocking.c Mon Feb 03 12:42:13 2014 -0500 +++ b/src/auth/passdb-blocking.c Tue Feb 04 16:23:22 2014 -0500 From dovecot at dovecot.org Tue Feb 4 23:30:32 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 04 Feb 2014 23:30:32 +0200 Subject: dovecot-2.1: istream-concat: Backported fixes from v2.2. Message-ID: details: http://hg.dovecot.org/dovecot-2.1/rev/b93e49f114e7 changeset: 15009:b93e49f114e7 user: Timo Sirainen date: Mon Feb 03 11:37:48 2014 -0500 description: istream-concat: Backported fixes from v2.2. This should fix corruption with LMTP proxying when the same mail was being sent to multiple backends. diffstat: src/lib/istream-concat.c | 41 ++++++++++++++++++++++++++--------------- 1 files changed, 26 insertions(+), 15 deletions(-) diffs (96 lines): diff -r 0eccb40ee3c4 -r b93e49f114e7 src/lib/istream-concat.c --- a/src/lib/istream-concat.c Thu Jan 30 22:03:40 2014 +0100 +++ b/src/lib/istream-concat.c Mon Feb 03 11:37:48 2014 -0500 @@ -87,7 +87,8 @@ { struct concat_istream *cstream = (struct concat_istream *)stream; const unsigned char *data; - size_t size, pos, cur_pos, bytes_skipped, new_bytes_count; + size_t size, data_size, cur_data_pos, new_pos, bytes_skipped; + size_t new_bytes_count; ssize_t ret; bool last_stream; @@ -101,7 +102,6 @@ if (cstream->prev_stream_left == 0) { /* no need to worry about buffers, skip everything */ - i_assert(cstream->prev_skip == 0); } else if (bytes_skipped < cstream->prev_stream_left) { /* we're still skipping inside buffer */ cstream->prev_stream_left -= bytes_skipped; @@ -111,17 +111,21 @@ bytes_skipped -= cstream->prev_stream_left; cstream->prev_stream_left = 0; } - i_stream_skip(cstream->cur_input, bytes_skipped); stream->pos -= bytes_skipped; stream->skip -= bytes_skipped; + stream->buffer += bytes_skipped; + cstream->prev_skip = stream->skip; + i_stream_skip(cstream->cur_input, bytes_skipped); - cur_pos = stream->pos - stream->skip - cstream->prev_stream_left; - data = i_stream_get_data(cstream->cur_input, &pos); - if (pos > cur_pos) + i_assert(stream->pos >= stream->skip + cstream->prev_stream_left); + cur_data_pos = stream->pos - (stream->skip + cstream->prev_stream_left); + + data = i_stream_get_data(cstream->cur_input, &data_size); + if (data_size > cur_data_pos) ret = 0; else { /* need to read more */ - i_assert(cur_pos == pos); + i_assert(cur_data_pos == data_size); ret = i_stream_read(cstream->cur_input); if (ret == -2 || ret == 0) return ret; @@ -145,18 +149,25 @@ stream->istream.eof = cstream->cur_input->eof && last_stream; i_assert(ret != -1 || stream->istream.eof); - data = i_stream_get_data(cstream->cur_input, &pos); + data = i_stream_get_data(cstream->cur_input, &data_size); } if (cstream->prev_stream_left == 0) { + /* we can point directly to the current stream's buffers */ stream->buffer = data; stream->pos -= stream->skip; stream->skip = 0; - } else if (pos == cur_pos) { + new_pos = data_size; + } else if (data_size == cur_data_pos) { + /* nothing new read */ + i_assert(ret == 0 || ret == -1); stream->buffer = stream->w_buffer; - pos = stream->pos; + new_pos = stream->pos; } else { - new_bytes_count = pos - cur_pos; + /* we still have some of the previous stream left. merge the + new data with it. */ + i_assert(data_size > cur_data_pos); + new_bytes_count = data_size - cur_data_pos; if (!i_stream_get_buffer_space(stream, new_bytes_count, &size)) { stream->buffer = stream->w_buffer; return -2; @@ -166,13 +177,13 @@ if (new_bytes_count > size) new_bytes_count = size; memcpy(stream->w_buffer + stream->pos, - data + cur_pos, new_bytes_count); - pos = stream->pos + new_bytes_count; + data + cur_data_pos, new_bytes_count); + new_pos = stream->pos + new_bytes_count; } - ret = pos > stream->pos ? (ssize_t)(pos - stream->pos) : + ret = new_pos > stream->pos ? (ssize_t)(new_pos - stream->pos) : (ret == 0 ? 0 : -1); - stream->pos = pos; + stream->pos = new_pos; cstream->prev_skip = stream->skip; return ret; } From dovecot at dovecot.org Tue Feb 4 23:30:32 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 04 Feb 2014 23:30:32 +0200 Subject: dovecot-2.1: test-istream-concat unit test improved. Message-ID: details: http://hg.dovecot.org/dovecot-2.1/rev/a8408943ded7 changeset: 15010:a8408943ded7 user: Timo Sirainen date: Mon Feb 03 11:38:51 2014 -0500 description: test-istream-concat unit test improved. Still pretty ugly to test with randomness, but at least it caught the bug. diffstat: src/lib/test-istream-concat.c | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diffs (68 lines): diff -r b93e49f114e7 -r a8408943ded7 src/lib/test-istream-concat.c --- a/src/lib/test-istream-concat.c Mon Feb 03 11:37:48 2014 -0500 +++ b/src/lib/test-istream-concat.c Mon Feb 03 11:38:51 2014 -0500 @@ -8,6 +8,10 @@ #include #include +#define TEST_MAX_ISTREAM_COUNT 10 +#define TEST_MAX_ISTREAM_SIZE 1024 +#define TEST_MAX_BUFFER_SIZE 128 + static void test_istream_concat_one(unsigned int buffer_size) { static const char *input_string = "xyz"; @@ -47,17 +51,17 @@ static void test_istream_concat_random(void) { - struct istream **streams, *input; + struct istream **streams, *input, *input1, *input2; const unsigned char *data; unsigned char *w_data; size_t size = 0; unsigned int i, j, offset, stream_count, data_len; - srand(1234); - stream_count = (rand() % 10) + 2; + srand(3); + stream_count = (rand() % TEST_MAX_ISTREAM_COUNT) + 2; streams = t_new(struct istream *, stream_count + 1); for (i = 0, offset = 0; i < stream_count; i++) { - data_len = rand() % 100 + 1; + data_len = rand() % TEST_MAX_ISTREAM_SIZE + 1; w_data = t_malloc(data_len); for (j = 0; j < data_len; j++) w_data[j] = offset++; @@ -68,14 +72,19 @@ i_assert(offset > 0); input = i_stream_create_concat(streams); - for (i = 0; i < 100; i++) { + i_stream_set_max_buffer_size(input, TEST_MAX_BUFFER_SIZE); + input1 = i_stream_create_limit(input, (uoff_t)-1); + input2 = i_stream_create_limit(input, (uoff_t)-1); + for (i = 0; i < 1000; i++) { + input = i % 2 == 0 ? input1 : input2; if (rand() % 3 == 0) { i_stream_seek(input, rand() % offset); } else { ssize_t ret = i_stream_read(input); - if (input->v_offset + size == offset) - test_assert(ret < 0); - else { + (void)i_stream_get_data(input, &size); + if (ret == -2) { + test_assert(size >= TEST_MAX_BUFFER_SIZE); + } else if (input->v_offset + size != offset) { test_assert(ret > 0); test_assert(input->v_offset + ret <= offset); i_stream_skip(input, rand() % ret); @@ -86,7 +95,6 @@ } } } - (void)i_stream_get_data(input, &size); } for (i = 0; i < stream_count; i++) i_stream_unref(&streams[i]); From dovecot at dovecot.org Wed Feb 5 00:48:20 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Wed, 05 Feb 2014 00:48:20 +0200 Subject: dovecot-2.1: Backported LZ4 compression support from v2.2. Message-ID: details: http://hg.dovecot.org/dovecot-2.1/rev/8e6b8d53c02b changeset: 15011:8e6b8d53c02b user: Timo Sirainen date: Wed Feb 05 00:47:55 2014 +0200 description: Backported LZ4 compression support from v2.2. diffstat: configure.in | 25 +++ src/plugins/zlib/Makefile.am | 8 +- src/plugins/zlib/iostream-lz4.h | 30 +++ src/plugins/zlib/istream-lz4.c | 315 ++++++++++++++++++++++++++++++++++++++++ src/plugins/zlib/istream-zlib.h | 1 + src/plugins/zlib/ostream-lz4.c | 184 +++++++++++++++++++++++ src/plugins/zlib/ostream-zlib.h | 1 + src/plugins/zlib/zlib-plugin.c | 18 ++ 8 files changed, 581 insertions(+), 1 deletions(-) diffs (truncated from 681 to 300 lines): diff -r a8408943ded7 -r 8e6b8d53c02b configure.in --- a/configure.in Mon Feb 03 11:38:51 2014 -0500 +++ b/configure.in Wed Feb 05 00:47:55 2014 +0200 @@ -169,6 +169,11 @@ TEST_WITH(bzlib, $withval), want_bzlib=auto) +AC_ARG_WITH(lz4, +AS_HELP_STRING([--with-lz4], [Build with LZ4 compression support]), + TEST_WITH(lz4, $withval), + want_lz4=auto) + AC_ARG_WITH(libcap, AS_HELP_STRING([--with-libcap], [Build with libcap support (Dropping capabilities).]), TEST_WITH(libcap, $withval), @@ -2598,6 +2603,26 @@ ]) fi AM_CONDITIONAL(BUILD_BZLIB, test "$have_bzlib" = "yes") + +if test "$want_lz4" != "no"; then + AC_CHECK_HEADER(lz4.h, [ + AC_CHECK_LIB(lz4, LZ4_compress, [ + have_lz4=yes + have_zlib_plugin=yes + AC_DEFINE(HAVE_LZ4,, Define if you have lz4 library) + ], [ + if test "$want_lz4" = "yes"; then + AC_ERROR([Can't build with lz4 support: liblz4 not found]) + fi + ]) + ], [ + if test "$want_lz4" = "yes"; then + AC_ERROR([Can't build with lz4 support: lz4.h not found]) + fi + ]) +fi +AM_CONDITIONAL(BUILD_LZ4, test "$have_lz4" = "yes") + AM_CONDITIONAL(BUILD_ZLIB_PLUGIN, test "$have_zlib_plugin" = "yes") RPCGEN=${RPCGEN-rpcgen} diff -r a8408943ded7 -r 8e6b8d53c02b src/plugins/zlib/Makefile.am --- a/src/plugins/zlib/Makefile.am Mon Feb 03 11:38:51 2014 -0500 +++ b/src/plugins/zlib/Makefile.am Wed Feb 05 00:47:55 2014 +0200 @@ -23,19 +23,25 @@ if BUILD_BZLIB BZLIB_LIB = -lbz2 endif +if BUILD_LZ4 +LZ4_LIB = -llz4 +endif lib20_zlib_plugin_la_LIBADD = \ - $(ZLIB_LIB) $(BZLIB_LIB) + $(ZLIB_LIB) $(BZLIB_LIB) $(LZ4_LIB) lib20_zlib_plugin_la_SOURCES = \ istream-bzlib.c \ + istream-lz4.c \ istream-zlib.c \ ostream-zlib.c \ ostream-bzlib.c \ + ostream-lz4.c \ zlib-plugin.c noinst_HEADERS = \ istream-zlib.h \ + iostream-lz4.h \ ostream-zlib.h \ zlib-plugin.h diff -r a8408943ded7 -r 8e6b8d53c02b src/plugins/zlib/iostream-lz4.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/plugins/zlib/iostream-lz4.h Wed Feb 05 00:47:55 2014 +0200 @@ -0,0 +1,30 @@ +#ifndef IOSTREAM_LZ4_H +#define IOSTREAM_LZ4_H + +/* + Dovecot's LZ4 compressed files contain: + + IOSTREAM_LZ4_HEADER + n x (4 byte big-endian: compressed chunk length, compressed chunk) +*/ + +#define IOSTREAM_LZ4_MAGIC "Dovecot-LZ4\x0d\x2a\x9b\xc5" +#define IOSTREAM_LZ4_MAGIC_LEN (sizeof(IOSTREAM_LZ4_MAGIC)-1) + +struct iostream_lz4_header { + unsigned char magic[IOSTREAM_LZ4_MAGIC_LEN]; + /* OSTREAM_LZ4_CHUNK_SIZE in big-endian */ + unsigned char max_uncompressed_chunk_size[4]; +}; + +/* How large chunks we're buffering into memory before compressing them */ +#define OSTREAM_LZ4_CHUNK_SIZE (1024*64) +/* How large chunks we allow in input data before returning a failure. + This must be at least OSTREAM_LZ4_CHUNK_SIZE, but for future compatibility + should be somewhat higher (but not too high to avoid wasting memory for + corrupted files). */ +#define ISTREAM_LZ4_CHUNK_SIZE (1024*1024) + +#define IOSTREAM_LZ4_CHUNK_PREFIX_LEN 4 /* big-endian size of chunk */ + +#endif diff -r a8408943ded7 -r 8e6b8d53c02b src/plugins/zlib/istream-lz4.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/plugins/zlib/istream-lz4.c Wed Feb 05 00:47:55 2014 +0200 @@ -0,0 +1,315 @@ +/* Copyright (c) 2013-2014 Dovecot authors, see the included COPYING file */ + +#include "lib.h" + +#ifdef HAVE_LZ4 + +#include "buffer.h" +#include "istream-private.h" +#include "istream-zlib.h" +#include "iostream-lz4.h" +#include + +struct lz4_istream { + struct istream_private istream; + + uoff_t stream_size; + struct stat last_parent_statbuf; + + buffer_t *chunk_buf; + uint32_t chunk_size, chunk_left, max_uncompressed_chunk_size; + + unsigned int log_errors:1; + unsigned int marked:1; + unsigned int header_read:1; +}; + +static void i_stream_lz4_close(struct iostream_private *stream) +{ + struct lz4_istream *zstream = (struct lz4_istream *)stream; + + if (zstream->chunk_buf != NULL) + buffer_free(&zstream->chunk_buf); +} + +static void lz4_read_error(struct lz4_istream *zstream, const char *error) +{ + if (!zstream->log_errors) + return; + i_error("lz4.read(%s): %s at %"PRIuUOFF_T, + i_stream_get_name(&zstream->istream.istream), error, + zstream->istream.abs_start_offset + + zstream->istream.istream.v_offset); +} + +static int i_stream_lz4_read_header(struct lz4_istream *zstream) +{ + const struct iostream_lz4_header *hdr; + const unsigned char *data; + size_t size; + int ret; + + ret = i_stream_read_data(zstream->istream.parent, &data, &size, + sizeof(*hdr)-1); + if (ret < 0) { + zstream->istream.istream.stream_errno = + zstream->istream.parent->stream_errno; + return ret; + } + if (ret == 0 && !zstream->istream.istream.eof) + return 0; + hdr = (const void *)data; + if (ret == 0 || memcmp(hdr->magic, IOSTREAM_LZ4_MAGIC, + IOSTREAM_LZ4_MAGIC_LEN) != 0) { + lz4_read_error(zstream, "wrong magic in header (not lz4 file?)"); + zstream->istream.istream.stream_errno = EINVAL; + return -1; + } + zstream->max_uncompressed_chunk_size = + ((uint32_t)hdr->max_uncompressed_chunk_size[0] << 24) | + (hdr->max_uncompressed_chunk_size[1] << 16) | + (hdr->max_uncompressed_chunk_size[2] << 8) | + hdr->max_uncompressed_chunk_size[3]; + if (zstream->max_uncompressed_chunk_size > ISTREAM_LZ4_CHUNK_SIZE) { + lz4_read_error(zstream, t_strdup_printf( + "lz4 max chunk size too large (%u > %u)", + zstream->max_uncompressed_chunk_size, + ISTREAM_LZ4_CHUNK_SIZE)); + zstream->istream.istream.stream_errno = EINVAL; + return -1; + } + i_stream_skip(zstream->istream.parent, sizeof(*hdr)); + return 1; +} + +static ssize_t i_stream_lz4_read(struct istream_private *stream) +{ + struct lz4_istream *zstream = (struct lz4_istream *)stream; + const unsigned char *data; + size_t size, max_size; + int ret; + + if (!zstream->header_read) { + if ((ret = i_stream_lz4_read_header(zstream)) <= 0) + return ret; + zstream->header_read = TRUE; + } + + if (zstream->chunk_left == 0) { + ret = i_stream_read_data(stream->parent, &data, &size, + IOSTREAM_LZ4_CHUNK_PREFIX_LEN); + if (ret < 0) { + stream->istream.stream_errno = + stream->parent->stream_errno; + if (stream->istream.stream_errno == 0) { + stream->istream.eof = TRUE; + zstream->stream_size = stream->istream.v_offset + + stream->pos - stream->skip; + } + return ret; + } + if (ret == 0 && !stream->istream.eof) + return 0; + zstream->chunk_size = zstream->chunk_left = + ((uint32_t)data[0] << 24) | + (data[1] << 16) | (data[2] << 8) | data[3]; + if (zstream->chunk_size == 0 || + zstream->chunk_size > ISTREAM_LZ4_CHUNK_SIZE) { + lz4_read_error(zstream, t_strdup_printf( + "invalid lz4 chunk size: %u", zstream->chunk_size)); + stream->istream.stream_errno = EINVAL; + return -1; + } + i_stream_skip(stream->parent, IOSTREAM_LZ4_CHUNK_PREFIX_LEN); + buffer_set_used_size(zstream->chunk_buf, 0); + } + + /* read the whole compressed chunk into memory */ + while (zstream->chunk_left > 0 && + (ret = i_stream_read_data(zstream->istream.parent, + &data, &size, 0)) > 0) { + if (size > zstream->chunk_left) + size = zstream->chunk_left; + buffer_append(zstream->chunk_buf, data, size); + i_stream_skip(zstream->istream.parent, size); + zstream->chunk_left -= size; + } + if (zstream->chunk_left > 0) { + if (ret == -1 && zstream->istream.parent->stream_errno == 0) { + lz4_read_error(zstream, "truncated lz4 chunk"); + stream->istream.stream_errno = EINVAL; + return -1; + } + zstream->istream.istream.stream_errno = + zstream->istream.parent->stream_errno; + return ret; + } + /* if we already have max_buffer_size amount of data, fail here */ + i_stream_compress(stream); + if (stream->pos >= stream->max_buffer_size) + return -2; + /* allocate enough space for the old data and the new + decompressed chunk. we don't know the original compressed size, + so just allocate the max amount of memory. */ + max_size = stream->pos + zstream->max_uncompressed_chunk_size; + if (stream->buffer_size < max_size) { + stream->w_buffer = i_realloc(stream->w_buffer, + stream->buffer_size, max_size); + stream->buffer_size = max_size; + stream->buffer = stream->w_buffer; + } + ret = LZ4_decompress_safe(zstream->chunk_buf->data, + (void *)(stream->w_buffer + stream->pos), + zstream->chunk_buf->used, + stream->buffer_size - stream->pos); + i_assert(ret <= (int)zstream->max_uncompressed_chunk_size); + if (ret < 0) { + lz4_read_error(zstream, "corrupted lz4 chunk"); + stream->istream.stream_errno = EINVAL; + return -1; + } + i_assert(ret > 0); + stream->pos += ret; + i_assert(stream->pos <= stream->buffer_size); + return ret; +} + +static void i_stream_lz4_reset(struct lz4_istream *zstream) +{ + struct istream_private *stream = &zstream->istream; + + i_stream_seek(stream->parent, stream->parent_start_offset); + zstream->header_read = FALSE; + zstream->chunk_size = zstream->chunk_left = 0; + + stream->parent_expected_offset = stream->parent_start_offset; + stream->skip = stream->pos = 0; + stream->istream.v_offset = 0; +} + +static void From dovecot at dovecot.org Wed Feb 5 01:17:57 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Wed, 05 Feb 2014 01:17:57 +0200 Subject: dovecot-2.2: lib-compression: Add assert for LZ4_compress return... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/e30597858a66 changeset: 17131:e30597858a66 user: Teemu Huovila date: Tue Feb 04 18:17:35 2014 -0500 description: lib-compression: Add assert for LZ4_compress return value. Make certain we detect if compressed data overflows the allocated space. diffstat: src/lib-compression/ostream-lz4.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diffs (32 lines): diff -r add8c00fb3cc -r e30597858a66 src/lib-compression/ostream-lz4.c --- a/src/lib-compression/ostream-lz4.c Tue Feb 04 16:23:22 2014 -0500 +++ b/src/lib-compression/ostream-lz4.c Tue Feb 04 18:17:35 2014 -0500 @@ -18,7 +18,8 @@ unsigned int compressbuf_offset; /* chunk size, followed by compressed data */ - unsigned char outbuf[IOSTREAM_LZ4_CHUNK_PREFIX_LEN + LZ4_COMPRESSBOUND(CHUNK_SIZE)]; + unsigned char outbuf[IOSTREAM_LZ4_CHUNK_PREFIX_LEN + + LZ4_COMPRESSBOUND(CHUNK_SIZE)]; unsigned int outbuf_offset, outbuf_used; }; @@ -70,11 +71,13 @@ i_assert(zstream->outbuf_offset == 0); i_assert(zstream->outbuf_used == 0); - zstream->outbuf_used = IOSTREAM_LZ4_CHUNK_PREFIX_LEN + - LZ4_compress((void *)zstream->compressbuf, - (void *)(zstream->outbuf + IOSTREAM_LZ4_CHUNK_PREFIX_LEN), - zstream->compressbuf_offset); - i_assert(zstream->outbuf_used > IOSTREAM_LZ4_CHUNK_PREFIX_LEN); + ret = LZ4_compress((void *)zstream->compressbuf, + (void *)(zstream->outbuf + + IOSTREAM_LZ4_CHUNK_PREFIX_LEN), + zstream->compressbuf_offset); + i_assert(ret > 0 && (unsigned int)ret <= sizeof(zstream->outbuf) - + IOSTREAM_LZ4_CHUNK_PREFIX_LEN); + zstream->outbuf_used = IOSTREAM_LZ4_CHUNK_PREFIX_LEN + ret; chunk_size = zstream->outbuf_used - IOSTREAM_LZ4_CHUNK_PREFIX_LEN; zstream->outbuf[0] = (chunk_size & 0xff000000) >> 24; zstream->outbuf[1] = (chunk_size & 0x00ff0000) >> 16; From dovecot at dovecot.org Wed Feb 5 18:57:52 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Wed, 05 Feb 2014 18:57:52 +0200 Subject: dovecot-2.2: Copyright updated to 2014 in two more places Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/cce087bde475 changeset: 17132:cce087bde475 user: Timo Sirainen date: Wed Feb 05 11:57:35 2014 -0500 description: Copyright updated to 2014 in two more places diffstat: src/doveadm/doveadm-mail-batch.c | 2 +- src/lib/test-str.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diffs (18 lines): diff -r e30597858a66 -r cce087bde475 src/doveadm/doveadm-mail-batch.c --- a/src/doveadm/doveadm-mail-batch.c Tue Feb 04 18:17:35 2014 -0500 +++ b/src/doveadm/doveadm-mail-batch.c Wed Feb 05 11:57:35 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2012-2014 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "array.h" diff -r e30597858a66 -r cce087bde475 src/lib/test-str.c --- a/src/lib/test-str.c Tue Feb 04 18:17:35 2014 -0500 +++ b/src/lib/test-str.c Wed Feb 05 11:57:35 2014 -0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 Dovecot authors, see the included COPYING file */ +/* Copyright (c) 2012-2014 Dovecot authors, see the included COPYING file */ #include "test-lib.h" #include "str.h" From dovecot at dovecot.org Fri Feb 7 15:17:33 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Fri, 07 Feb 2014 15:17:33 +0000 Subject: dovecot-2.2: doveadm user: Don't crash if multiple mask paramete... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/a16dbcb0f477 changeset: 17133:a16dbcb0f477 user: Timo Sirainen date: Fri Feb 07 17:17:25 2014 +0200 description: doveadm user: Don't crash if multiple mask parameters are given with at least one wildcard. diffstat: src/doveadm/doveadm-auth.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r cce087bde475 -r a16dbcb0f477 src/doveadm/doveadm-auth.c --- a/src/doveadm/doveadm-auth.c Wed Feb 05 11:57:35 2014 -0500 +++ b/src/doveadm/doveadm-auth.c Fri Feb 07 17:17:25 2014 +0200 @@ -201,7 +201,7 @@ char *const *users) { struct auth_master_user_list_ctx *ctx; - const char *username, *user_mask = NULL; + const char *username, *user_mask = "*"; unsigned int i; if (users[0] != NULL && users[1] == NULL) From dovecot at dovecot.org Fri Feb 7 19:24:56 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Fri, 07 Feb 2014 19:24:56 +0000 Subject: dovecot-2.2: doveadm fetch: Added pop3.order field. Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/36d11bf4e58d changeset: 17134:36d11bf4e58d user: Timo Sirainen date: Fri Feb 07 14:24:44 2014 -0500 description: doveadm fetch: Added pop3.order field. diffstat: src/doveadm/doveadm-mail-fetch.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diffs (30 lines): diff -r a16dbcb0f477 -r 36d11bf4e58d src/doveadm/doveadm-mail-fetch.c --- a/src/doveadm/doveadm-mail-fetch.c Fri Feb 07 17:17:25 2014 +0200 +++ b/src/doveadm/doveadm-mail-fetch.c Fri Feb 07 14:24:44 2014 -0500 @@ -402,6 +402,16 @@ return 0; } +static int fetch_pop3_order(struct fetch_cmd_context *ctx) +{ + const char *value; + + if (mail_get_special(ctx->mail, MAIL_FETCH_POP3_ORDER, &value) < 0) + return -1; + doveadm_print(value); + return 0; +} + static const struct fetch_field fetch_fields[] = { { "user", 0, fetch_user }, { "mailbox", 0, fetch_mailbox }, @@ -425,7 +435,8 @@ { "imap.envelope", MAIL_FETCH_IMAP_ENVELOPE, fetch_imap_envelope }, { "imap.body", MAIL_FETCH_IMAP_BODY, fetch_imap_body }, { "imap.bodystructure", MAIL_FETCH_IMAP_BODYSTRUCTURE, fetch_imap_bodystructure }, - { "pop3.uidl", MAIL_FETCH_UIDL_BACKEND, fetch_pop3_uidl } + { "pop3.uidl", MAIL_FETCH_UIDL_BACKEND, fetch_pop3_uidl }, + { "pop3.order", MAIL_FETCH_POP3_ORDER, fetch_pop3_order } }; static const struct fetch_field *fetch_field_find(const char *name) From dovecot at dovecot.org Fri Feb 7 20:03:43 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Fri, 07 Feb 2014 20:03:43 +0000 Subject: dovecot-2.2: pop3: Use POP3 order sorting only when directly lis... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/59decc957b39 changeset: 17135:59decc957b39 user: Timo Sirainen date: Fri Feb 07 15:03:33 2014 -0500 description: pop3: Use POP3 order sorting only when directly listing UIDLs. "Message ordering changed unexpectedly" errors can be completely avoided by using either pop3_lock_session=yes or adding %u to pop3_logout_format. diffstat: src/pop3/pop3-commands.c | 74 +++++++++++++++++++++++++++-------------------- 1 files changed, 43 insertions(+), 31 deletions(-) diffs (136 lines): diff -r 36d11bf4e58d -r 59decc957b39 src/pop3/pop3-commands.c --- a/src/pop3/pop3-commands.c Fri Feb 07 14:24:44 2014 -0500 +++ b/src/pop3/pop3-commands.c Fri Feb 07 15:03:33 2014 -0500 @@ -237,6 +237,7 @@ struct mail_search_args *search_args; struct mail_search_context *ctx; struct mail *mail; + ARRAY_TYPE(seq_range) deleted_msgs, seen_msgs; uint32_t msgnum, bit; bool ret = TRUE; @@ -245,27 +246,35 @@ return TRUE; } + /* translate msgnums to sequences (in case POP3 ordering is + different) */ + t_array_init(&deleted_msgs, 8); + if (client->deleted_bitmask != NULL) { + for (msgnum = 0; msgnum < client->messages_count; msgnum++) { + bit = 1 << (msgnum % CHAR_BIT); + if ((client->deleted_bitmask[msgnum / CHAR_BIT] & bit) != 0) + seq_range_array_add(&deleted_msgs, client->msgnum_to_seq_map[msgnum]); + } + } + t_array_init(&seen_msgs, 8); + if (client->seen_bitmask != NULL) { + for (msgnum = 0; msgnum < client->messages_count; msgnum++) { + bit = 1 << (msgnum % CHAR_BIT); + if ((client->seen_bitmask[msgnum / CHAR_BIT] & bit) != 0) + seq_range_array_add(&seen_msgs, client->msgnum_to_seq_map[msgnum]); + } + } + search_args = pop3_search_build(client, 0); - ctx = mailbox_search_init(client->trans, search_args, - pop3_sort_program, 0, NULL); + ctx = mailbox_search_init(client->trans, search_args, NULL, 0, NULL); mail_search_args_unref(&search_args); msgnum = 0; while (mailbox_search_next(ctx, &mail)) { - if (client_verify_ordering(client, mail, msgnum) < 0) { - ret = FALSE; - break; - } - - bit = 1 << (msgnum % CHAR_BIT); - if (client->deleted_bitmask != NULL && - (client->deleted_bitmask[msgnum / CHAR_BIT] & bit) != 0) { + if (seq_range_exists(&deleted_msgs, mail->seq)) client_expunge(client, mail); - } else if (client->seen_bitmask != NULL && - (client->seen_bitmask[msgnum / CHAR_BIT] & bit) != 0) { + else if (seq_range_exists(&seen_msgs, mail->seq)) mail_update_flags(mail, MODIFY_ADD, MAIL_SEEN); - } - msgnum++; } client->seen_change_count = 0; @@ -762,6 +771,7 @@ struct mail_search_args *search_args; struct mail *mail; HASH_TABLE_TYPE(uidl_counter) prev_uidls; + const char **seq_uidls; string_t *str; char *uidl; enum mail_fetch_field wanted_fields; @@ -776,47 +786,49 @@ wanted_fields |= MAIL_FETCH_HEADER_MD5; search_ctx = mailbox_search_init(client->trans, search_args, - pop3_sort_program, - wanted_fields, NULL); + NULL, wanted_fields, NULL); mail_search_args_unref(&search_args); uidl_duplicates_rename = strcmp(client->set->pop3_uidl_duplicates, "rename") == 0; hash_table_create(&prev_uidls, default_pool, 0, str_hash, strcmp); client->uidl_pool = pool_alloconly_create("message uidls", 1024); - client->message_uidls = p_new(client->uidl_pool, const char *, - client->messages_count+1); - str = t_str_new(128); msgnum = 0; + /* first read all the UIDLs into a temporary [seq] array */ + seq_uidls = i_new(const char *, client->messages_count); + str = t_str_new(128); while (mailbox_search_next(search_ctx, &mail)) { - if (client_verify_ordering(client, mail, msgnum) < 0) { - failed = TRUE; - break; - } - str_truncate(str, 0); if (pop3_get_uid(client, mail, str, &permanent_uidl) < 0) { failed = TRUE; break; } - - if (client->set->pop3_save_uidl && !permanent_uidl) - mail_update_pop3_uidl(mail, str_c(str)); - if (uidl_duplicates_rename) uidl_rename_duplicate(str, prev_uidls); + uidl = p_strdup(client->uidl_pool, str_c(str)); - client->message_uidls[msgnum] = uidl; + if (client->set->pop3_save_uidl && !permanent_uidl) + mail_update_pop3_uidl(mail, uidl); + + seq_uidls[mail->seq-1] = uidl; hash_table_insert(prev_uidls, uidl, POINTER_CAST(1)); - msgnum++; } (void)mailbox_search_deinit(&search_ctx); hash_table_destroy(&prev_uidls); if (failed) { pool_unref(&client->uidl_pool); - client->message_uidls = NULL; + i_free(seq_uidls); + return; } + /* map UIDLs to msgnums (in case POP3 sort ordering is different) */ + client->message_uidls = p_new(client->uidl_pool, const char *, + client->messages_count+1); + for (msgnum = 0; msgnum < client->messages_count; msgnum++) { + client->message_uidls[msgnum] = + seq_uidls[client->msgnum_to_seq_map[msgnum]]; + } + i_free(seq_uidls); } static struct cmd_uidl_context * From dovecot at dovecot.org Fri Feb 7 20:36:26 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Fri, 07 Feb 2014 20:36:26 +0000 Subject: dovecot-2.2: acl: Fixed assert-crash when using the new global A... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/c69ca1f5bc34 changeset: 17136:c69ca1f5bc34 user: Timo Sirainen date: Fri Feb 07 15:36:15 2014 -0500 description: acl: Fixed assert-crash when using the new global ACL file. diffstat: src/plugins/acl/acl-backend-vfile.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diffs (18 lines): diff -r 59decc957b39 -r c69ca1f5bc34 src/plugins/acl/acl-backend-vfile.c --- a/src/plugins/acl/acl-backend-vfile.c Fri Feb 07 15:03:33 2014 -0500 +++ b/src/plugins/acl/acl-backend-vfile.c Fri Feb 07 15:36:15 2014 -0500 @@ -255,9 +255,11 @@ } if (ret == 0 && backend->global_path != NULL) { - if (_backend->global_file != NULL) - ret = acl_global_file_have_any(_backend->global_file, vname) ? 1 : 0; - else { + if (_backend->global_file != NULL) { + ret = acl_global_file_refresh(_backend->global_file); + if (ret == 0 && acl_global_file_have_any(_backend->global_file, vname)) + ret = 1; + } else { global_path = t_strconcat(backend->global_path, "/", name, NULL); ret = acl_backend_vfile_exists(backend, global_path, &new_validity.global_validity); From dovecot at dovecot.org Fri Feb 7 20:44:19 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Fri, 07 Feb 2014 20:44:19 +0000 Subject: dovecot-2.2: lib-http: Fixed test-http-url not to crash with som... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/ff81b3f52e8f changeset: 17137:ff81b3f52e8f user: Timo Sirainen date: Fri Feb 07 15:44:10 2014 -0500 description: lib-http: Fixed test-http-url not to crash with some libcs Those that crash when %s attempts to print NULL. diffstat: src/lib-http/test-http-url.c | 52 +++++++++++++------------------------------ 1 files changed, 16 insertions(+), 36 deletions(-) diffs (84 lines): diff -r c69ca1f5bc34 -r ff81b3f52e8f src/lib-http/test-http-url.c --- a/src/lib-http/test-http-url.c Fri Feb 07 15:36:15 2014 -0500 +++ b/src/lib-http/test-http-url.c Fri Feb 07 15:44:10 2014 -0500 @@ -293,64 +293,44 @@ valid_url_tests[i].url), urlp != NULL, error); if (urlp != NULL) { if (urlp->host_name == NULL || urlt->host_name == NULL) { - test_out(t_strdup_printf("url->host_name = %s", urlp->host_name), - urlp->host_name == urlt->host_name); + test_assert(urlp->host_name == urlt->host_name); } else { - test_out(t_strdup_printf("url->host_name = %s", urlp->host_name), - strcmp(urlp->host_name, urlt->host_name) == 0); + test_assert(strcmp(urlp->host_name, urlt->host_name) == 0); } if (!urlp->have_port) { - test_out("url->port = (unspecified)", - urlp->have_port == urlt->have_port); + test_assert(urlp->have_port == urlt->have_port); } else { - test_out(t_strdup_printf("url->port = %u", urlp->port), - urlp->have_port == urlt->have_port && urlp->port == urlt->port); + test_assert(urlp->have_port == urlt->have_port && urlp->port == urlt->port); } if (!urlp->have_host_ip) { - test_out("url->host_ip = (unspecified)", - urlp->have_host_ip == urlt->have_host_ip); + test_assert(urlp->have_host_ip == urlt->have_host_ip); } else { - test_out("url->host_ip = (valid)", - urlp->have_host_ip == urlt->have_host_ip); + test_assert(urlp->have_host_ip == urlt->have_host_ip); } if (urlp->user == NULL || urlt->user == NULL) { - test_out(t_strdup_printf("url->user = %s", urlp->user), - urlp->user == urlt->user); + test_assert(urlp->user == urlt->user); } else { - test_out(t_strdup_printf("url->user = %s", urlp->user), - strcmp(urlp->user, urlt->user) == 0); + test_assert(strcmp(urlp->user, urlt->user) == 0); } if (urlp->password == NULL || urlt->password == NULL) { - test_out(t_strdup_printf("url->password = %s", urlp->password), - urlp->password == urlt->password); + test_assert(urlp->password == urlt->password); } else { - test_out(t_strdup_printf("url->password = %s", urlp->password), - strcmp(urlp->password, urlt->password) == 0); + test_assert(strcmp(urlp->password, urlt->password) == 0); } if (urlp->path == NULL || urlt->path == NULL) { - test_out(t_strdup_printf("url->path = %s", urlp->path), - urlp->path == urlt->path); + test_assert(urlp->path == urlt->path); } else { - test_out(t_strdup_printf("url->path = %s", urlp->path), - strcmp(urlp->path, urlt->path) == 0); + test_assert(strcmp(urlp->path, urlt->path) == 0); } if (urlp->enc_query == NULL || urlt->enc_query == NULL) { - test_out(t_strdup_printf( - "url->enc_query = %s", urlp->enc_query), - urlp->enc_query == urlt->enc_query); + test_assert(urlp->enc_query == urlt->enc_query); } else { - test_out(t_strdup_printf( - "url->enc_query = %s", urlp->enc_query), - strcmp(urlp->enc_query, urlt->enc_query) == 0); + test_assert(strcmp(urlp->enc_query, urlt->enc_query) == 0); } if (urlp->enc_fragment == NULL || urlt->enc_fragment == NULL) { - test_out(t_strdup_printf( - "url->enc_fragment = %s", urlp->enc_fragment), - urlp->enc_fragment == urlt->enc_fragment); + test_assert(urlp->enc_fragment == urlt->enc_fragment); } else { - test_out(t_strdup_printf( - "url->enc_fragment = %s", urlp->enc_fragment), - strcmp(urlp->enc_fragment, urlt->enc_fragment) == 0); + test_assert(strcmp(urlp->enc_fragment, urlt->enc_fragment) == 0); } } From dovecot at dovecot.org Fri Feb 7 20:54:04 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Fri, 07 Feb 2014 20:54:04 +0000 Subject: dovecot-2.2: auth: Fixed crash/NULL error if auth_verbose_passwo... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/afd3cfcf1bcb changeset: 17138:afd3cfcf1bcb user: Timo Sirainen date: Fri Feb 07 15:53:32 2014 -0500 description: auth: Fixed crash/NULL error if auth_verbose_passwords had an invalid value. diffstat: src/auth/auth-settings.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diffs (15 lines): diff -r ff81b3f52e8f -r afd3cfcf1bcb src/auth/auth-settings.c --- a/src/auth/auth-settings.c Fri Feb 07 15:44:10 2014 -0500 +++ b/src/auth/auth-settings.c Fri Feb 07 15:53:32 2014 -0500 @@ -351,8 +351,10 @@ return TRUE; else if (strcmp(value, "sha1") == 0) return TRUE; - else + else { + *error_r = "auth_verbose_passwords: Invalid value"; return FALSE; + } } static bool auth_settings_check(void *_set, pool_t pool, From dovecot at dovecot.org Fri Feb 7 20:54:09 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Fri, 07 Feb 2014 20:54:09 +0000 Subject: dovecot-2.2: auth: Allow auth_verbose_passwords=yes as an alias ... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/27ac53f11f1f changeset: 17139:27ac53f11f1f user: Timo Sirainen date: Fri Feb 07 15:53:54 2014 -0500 description: auth: Allow auth_verbose_passwords=yes as an alias for "plain". diffstat: src/auth/auth-settings.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diffs (25 lines): diff -r afd3cfcf1bcb -r 27ac53f11f1f src/auth/auth-settings.c --- a/src/auth/auth-settings.c Fri Feb 07 15:53:32 2014 -0500 +++ b/src/auth/auth-settings.c Fri Feb 07 15:53:54 2014 -0500 @@ -330,7 +330,7 @@ } static bool -auth_verify_verbose_password(const struct auth_settings *set, +auth_verify_verbose_password(struct auth_settings *set, const char **error_r) { const char *p, *value = set->verbose_passwords; @@ -351,7 +351,11 @@ return TRUE; else if (strcmp(value, "sha1") == 0) return TRUE; - else { + else if (strcmp(value, "yes") == 0) { + /* just use it as alias for "plain" */ + set->verbose_passwords = "plain"; + return TRUE; + } else { *error_r = "auth_verbose_passwords: Invalid value"; return FALSE; } From dovecot at dovecot.org Tue Feb 11 22:15:28 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 11 Feb 2014 22:15:28 +0000 Subject: dovecot-2.2: acl: Recent changes caused global ACL filenames to ... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/efba333bf4c0 changeset: 17140:efba333bf4c0 user: Timo Sirainen date: Wed Feb 12 07:14:58 2014 +0900 description: acl: Recent changes caused global ACL filenames to be looked up with real mailbox names, not vnames. diffstat: src/plugins/acl/acl-backend-vfile.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 27ac53f11f1f -r efba333bf4c0 src/plugins/acl/acl-backend-vfile.c --- a/src/plugins/acl/acl-backend-vfile.c Fri Feb 07 15:53:54 2014 -0500 +++ b/src/plugins/acl/acl-backend-vfile.c Wed Feb 12 07:14:58 2014 +0900 @@ -166,7 +166,7 @@ if (backend->global_path != NULL && _backend->global_file == NULL) { aclobj->global_path = - i_strconcat(backend->global_path, "/", name, NULL); + i_strconcat(backend->global_path, "/", vname, NULL); } } else { /* Invalid mailbox name, just use the default From dovecot at dovecot.org Tue Feb 11 23:43:51 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 11 Feb 2014 23:43:51 +0000 Subject: dovecot-2.2: Released v2.2.11. Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/6b96eb75ded2 changeset: 17141:6b96eb75ded2 user: Timo Sirainen date: Wed Feb 12 00:51:10 2014 +0200 description: Released v2.2.11. diffstat: NEWS | 15 +++++++++++++++ configure.ac | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diffs (36 lines): diff -r efba333bf4c0 -r 6b96eb75ded2 NEWS --- a/NEWS Wed Feb 12 07:14:58 2014 +0900 +++ b/NEWS Wed Feb 12 00:51:10 2014 +0200 @@ -1,3 +1,18 @@ +v2.2.11 2014-02-12 Timo Sirainen + + + acl plugin: Added an alternative global ACL file that can contain + mailbox patterns. See http://wiki2.dovecot.org/ACL for details. + + imap proxy: Added proxy_nopipelining passdb setting to work around + other IMAP servers' bugs (MS Exchange 2013 especially). + + Added %{auth_user}, %{auth_username} and %{auth_domain} variables. + See http://wiki2.dovecot.org/Variables for details. + + Added support for LZ4 compression. + + stats: Track also wall clock time for commands. + + pop3_migration plugin improvements to try harder to match the UIDLs + correctly. + - imap: SEARCH/SORT PARTIAL reponses may have been too large. + - doveadm backup: Fixed assert-crash when syncing mailbox deletion. + v2.2.10 2013-11-25 Timo Sirainen + auth: passdb/userdb dict rewrite to support much more complex diff -r efba333bf4c0 -r 6b96eb75ded2 configure.ac --- a/configure.ac Wed Feb 12 07:14:58 2014 +0900 +++ b/configure.ac Wed Feb 12 00:51:10 2014 +0200 @@ -2,8 +2,8 @@ # Be sure to update ABI version also if anything changes that might require # recompiling plugins. Most importantly that means if any structs are changed. -AC_INIT([Dovecot],[2.2.10],[dovecot at dovecot.org]) -AC_DEFINE_UNQUOTED([DOVECOT_ABI_VERSION], "2.2.ABIv10($PACKAGE_VERSION)", [Dovecot ABI version]) +AC_INIT([Dovecot],[2.2.11],[dovecot at dovecot.org]) +AC_DEFINE_UNQUOTED([DOVECOT_ABI_VERSION], "2.2.ABIv11($PACKAGE_VERSION)", [Dovecot ABI version]) AC_CONFIG_SRCDIR([src]) From dovecot at dovecot.org Tue Feb 11 23:43:51 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 11 Feb 2014 23:43:51 +0000 Subject: dovecot-2.2: Added tag 2.2.11 for changeset 6b96eb75ded2 Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/cd14178e77b8 changeset: 17142:cd14178e77b8 user: Timo Sirainen date: Wed Feb 12 00:51:10 2014 +0200 description: Added tag 2.2.11 for changeset 6b96eb75ded2 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 6b96eb75ded2 -r cd14178e77b8 .hgtags --- a/.hgtags Wed Feb 12 00:51:10 2014 +0200 +++ b/.hgtags Wed Feb 12 00:51:10 2014 +0200 @@ -114,3 +114,4 @@ 095a777edc2623fad2ad9d6321ed93a804e85889 2.2.8 2852a7c55fc756e489ebff6aefcb0553f638e851 2.2.9 614bd66000113a062c1a02751cc7d04c0fcef1d6 2.2.10 +6b96eb75ded21d09739c5662a52dd054059920f6 2.2.11 From dovecot at dovecot.org Tue Feb 11 23:43:51 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Tue, 11 Feb 2014 23:43:51 +0000 Subject: dovecot-2.2: Added signature for changeset 6b96eb75ded2 Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/179834c53f20 changeset: 17143:179834c53f20 user: Timo Sirainen date: Wed Feb 12 00:51:17 2014 +0200 description: Added signature for changeset 6b96eb75ded2 diffstat: .hgsigs | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r cd14178e77b8 -r 179834c53f20 .hgsigs --- a/.hgsigs Wed Feb 12 00:51:10 2014 +0200 +++ b/.hgsigs Wed Feb 12 00:51:17 2014 +0200 @@ -77,3 +77,4 @@ 095a777edc2623fad2ad9d6321ed93a804e85889 0 iEYEABECAAYFAlKL1YoACgkQyUhSUUBVismrpQCeP/ab1oKZp0VJ6PwmnRgDthf2hi8AoJZB+KuQIgKA5iBx3NpGcaZjmlzc 2852a7c55fc756e489ebff6aefcb0553f638e851 0 iEYEABECAAYFAlKSirAACgkQyUhSUUBVisn17ACgjsnbSktYkNMvoO2FNjA2DVBNYDwAnAtQ1Zjemwvi+Pow/px6TZ2K76J6 614bd66000113a062c1a02751cc7d04c0fcef1d6 0 iEYEABECAAYFAlKzsg8ACgkQyUhSUUBVism5cACdEM1jR3c6gO0dGodbsgVtDMZPSxsAoKGmvyIxt7MSQkdz9cbe+Kfn2jyK +6b96eb75ded21d09739c5662a52dd054059920f6 0 iEYEABECAAYFAlL6qV8ACgkQyUhSUUBVislKhwCgm48QhoYeogfLdMT6Ys65XD8n93gAnA7xLoUqp8qXP9xhMrXabhaLQCaC From dovecot at dovecot.org Thu Feb 13 03:33:34 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Thu, 13 Feb 2014 03:33:34 +0000 Subject: dovecot-2.2: pop3: Access sequence numbers correctly. Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/d20059f7d3a1 changeset: 17144:d20059f7d3a1 user: Teemu Huovila date: Thu Feb 13 05:33:13 2014 +0200 description: pop3: Access sequence numbers correctly. diffstat: src/pop3/pop3-commands.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (30 lines): diff -r 179834c53f20 -r d20059f7d3a1 src/pop3/pop3-commands.c --- a/src/pop3/pop3-commands.c Wed Feb 12 00:51:17 2014 +0200 +++ b/src/pop3/pop3-commands.c Thu Feb 13 05:33:13 2014 +0200 @@ -253,7 +253,7 @@ for (msgnum = 0; msgnum < client->messages_count; msgnum++) { bit = 1 << (msgnum % CHAR_BIT); if ((client->deleted_bitmask[msgnum / CHAR_BIT] & bit) != 0) - seq_range_array_add(&deleted_msgs, client->msgnum_to_seq_map[msgnum]); + seq_range_array_add(&deleted_msgs, msgnum_to_seq(client, msgnum)); } } t_array_init(&seen_msgs, 8); @@ -261,7 +261,7 @@ for (msgnum = 0; msgnum < client->messages_count; msgnum++) { bit = 1 << (msgnum % CHAR_BIT); if ((client->seen_bitmask[msgnum / CHAR_BIT] & bit) != 0) - seq_range_array_add(&seen_msgs, client->msgnum_to_seq_map[msgnum]); + seq_range_array_add(&seen_msgs, msgnum_to_seq(client, msgnum)); } } @@ -826,7 +826,7 @@ client->messages_count+1); for (msgnum = 0; msgnum < client->messages_count; msgnum++) { client->message_uidls[msgnum] = - seq_uidls[client->msgnum_to_seq_map[msgnum]]; + seq_uidls[msgnum_to_seq(client, msgnum)]; } i_free(seq_uidls); } From dovecot at dovecot.org Thu Feb 13 21:49:55 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Thu, 13 Feb 2014 21:49:55 +0000 Subject: dovecot-2.2: Released v2.2.12. Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/8e4433702920 changeset: 17145:8e4433702920 user: Timo Sirainen date: Thu Feb 13 23:36:03 2014 +0200 description: Released v2.2.12. diffstat: NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diffs (23 lines): diff -r d20059f7d3a1 -r 8e4433702920 NEWS --- a/NEWS Thu Feb 13 05:33:13 2014 +0200 +++ b/NEWS Thu Feb 13 23:36:03 2014 +0200 @@ -1,3 +1,7 @@ +v2.2.12 2014-02-14 Timo Sirainen + + - pop3 server was crashing in v2.2.11 + v2.2.11 2014-02-12 Timo Sirainen + acl plugin: Added an alternative global ACL file that can contain diff -r d20059f7d3a1 -r 8e4433702920 configure.ac --- a/configure.ac Thu Feb 13 05:33:13 2014 +0200 +++ b/configure.ac Thu Feb 13 23:36:03 2014 +0200 @@ -2,7 +2,7 @@ # Be sure to update ABI version also if anything changes that might require # recompiling plugins. Most importantly that means if any structs are changed. -AC_INIT([Dovecot],[2.2.11],[dovecot at dovecot.org]) +AC_INIT([Dovecot],[2.2.12],[dovecot at dovecot.org]) AC_DEFINE_UNQUOTED([DOVECOT_ABI_VERSION], "2.2.ABIv11($PACKAGE_VERSION)", [Dovecot ABI version]) AC_CONFIG_SRCDIR([src]) From dovecot at dovecot.org Thu Feb 13 21:49:55 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Thu, 13 Feb 2014 21:49:55 +0000 Subject: dovecot-2.2: Added tag 2.2.12 for changeset 8e4433702920 Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/95a22164e66e changeset: 17146:95a22164e66e user: Timo Sirainen date: Thu Feb 13 23:36:09 2014 +0200 description: Added tag 2.2.12 for changeset 8e4433702920 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 8e4433702920 -r 95a22164e66e .hgtags --- a/.hgtags Thu Feb 13 23:36:03 2014 +0200 +++ b/.hgtags Thu Feb 13 23:36:09 2014 +0200 @@ -115,3 +115,4 @@ 2852a7c55fc756e489ebff6aefcb0553f638e851 2.2.9 614bd66000113a062c1a02751cc7d04c0fcef1d6 2.2.10 6b96eb75ded21d09739c5662a52dd054059920f6 2.2.11 +8e4433702920216747e874d2914518de6748d05f 2.2.12 From dovecot at dovecot.org Thu Feb 13 21:49:55 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Thu, 13 Feb 2014 21:49:55 +0000 Subject: dovecot-2.2: Added signature for changeset 8e4433702920 Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/bc8822282f60 changeset: 17147:bc8822282f60 user: Timo Sirainen date: Thu Feb 13 23:36:14 2014 +0200 description: Added signature for changeset 8e4433702920 diffstat: .hgsigs | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 95a22164e66e -r bc8822282f60 .hgsigs --- a/.hgsigs Thu Feb 13 23:36:09 2014 +0200 +++ b/.hgsigs Thu Feb 13 23:36:14 2014 +0200 @@ -78,3 +78,4 @@ 2852a7c55fc756e489ebff6aefcb0553f638e851 0 iEYEABECAAYFAlKSirAACgkQyUhSUUBVisn17ACgjsnbSktYkNMvoO2FNjA2DVBNYDwAnAtQ1Zjemwvi+Pow/px6TZ2K76J6 614bd66000113a062c1a02751cc7d04c0fcef1d6 0 iEYEABECAAYFAlKzsg8ACgkQyUhSUUBVism5cACdEM1jR3c6gO0dGodbsgVtDMZPSxsAoKGmvyIxt7MSQkdz9cbe+Kfn2jyK 6b96eb75ded21d09739c5662a52dd054059920f6 0 iEYEABECAAYFAlL6qV8ACgkQyUhSUUBVislKhwCgm48QhoYeogfLdMT6Ys65XD8n93gAnA7xLoUqp8qXP9xhMrXabhaLQCaC +8e4433702920216747e874d2914518de6748d05f 0 iEYEABECAAYFAlL9OsoACgkQyUhSUUBVisnz6ACgmR2KgErDS5jB8SvPB2u7yaRN6SIAnRwxqa0LGPBM52Fdw2e8vDVFxSWU From dovecot at dovecot.org Sat Feb 15 01:42:02 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Sat, 15 Feb 2014 01:42:02 +0000 Subject: dovecot-2.2: lib-index: Minor code cleanup Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/0ecc40091784 changeset: 17148:0ecc40091784 user: Timo Sirainen date: Sat Feb 15 10:41:29 2014 +0900 description: lib-index: Minor code cleanup The previous calculation was correct also though. diffstat: src/lib-index/mail-cache-fields.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r bc8822282f60 -r 0ecc40091784 src/lib-index/mail-cache-fields.c --- a/src/lib-index/mail-cache-fields.c Thu Feb 13 23:36:14 2014 +0200 +++ b/src/lib-index/mail-cache-fields.c Sat Feb 15 10:41:29 2014 +0900 @@ -328,8 +328,7 @@ /* check the fixed size of the header. name[] has to be checked separately */ - if (field_hdr->size < sizeof(*field_hdr) + - field_hdr->fields_count * (sizeof(uint32_t)*2 + 1 + 2)) { + if (field_hdr->size < MAIL_CACHE_FIELD_NAMES(field_hdr->fields_count)) { mail_cache_set_corrupted(cache, "invalid field header size"); return -1; } @@ -356,6 +355,7 @@ names = CONST_PTR_OFFSET(field_hdr, MAIL_CACHE_FIELD_NAMES(field_hdr->fields_count)); end = CONST_PTR_OFFSET(field_hdr, field_hdr->size); + i_assert(names <= end); /* clear the old mapping */ for (i = 0; i < cache->fields_count; i++) From dovecot at dovecot.org Wed Feb 19 22:54:45 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Wed, 19 Feb 2014 22:54:45 +0000 Subject: dovecot-2.2: auth: Don't crash if passdb passwd-file is used wit... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/0378721ea755 changeset: 17149:0378721ea755 user: Timo Sirainen date: Wed Feb 19 14:54:16 2014 -0800 description: auth: Don't crash if passdb passwd-file is used without any userdbs. diffstat: src/auth/db-passwd-file.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r 0ecc40091784 -r 0378721ea755 src/auth/db-passwd-file.c --- a/src/auth/db-passwd-file.c Sat Feb 15 10:41:29 2014 +0900 +++ b/src/auth/db-passwd-file.c Wed Feb 19 14:54:16 2014 -0800 @@ -308,6 +308,7 @@ /* warn about missing userdb fields only when there aren't any other userdbs. */ db->userdb_warn_missing = + array_is_created(&global_auth_settings->userdbs) && array_count(&global_auth_settings->userdbs) == 1; } From dovecot at dovecot.org Mon Feb 24 17:32:41 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Mon, 24 Feb 2014 17:32:41 +0000 Subject: dovecot-2.2: imap: Return SPECIAL-USE flags for LSUB command. Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/2397adb8c1bd changeset: 17150:2397adb8c1bd user: Timo Sirainen date: Mon Feb 24 11:29:52 2014 -0600 description: imap: Return SPECIAL-USE flags for LSUB command. diffstat: src/imap/cmd-list.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diffs (15 lines): diff -r 0378721ea755 -r 2397adb8c1bd src/imap/cmd-list.c --- a/src/imap/cmd-list.c Wed Feb 19 14:54:16 2014 -0800 +++ b/src/imap/cmd-list.c Mon Feb 24 11:29:52 2014 -0600 @@ -435,6 +435,11 @@ tb-lsub-flags workaround is explicitly set */ ctx->list_flags |= MAILBOX_LIST_ITER_SELECT_SUBSCRIBED | MAILBOX_LIST_ITER_SELECT_RECURSIVEMATCH; + /* Return SPECIAL-USE flags for LSUB anyway. Outlook 2013 + does this and since it's not expensive for us to return + them, it's not worth the trouble of adding an explicit + workaround setting. */ + ctx->list_flags |= MAILBOX_LIST_ITER_RETURN_SPECIALUSE; if ((cmd->client->set->parsed_workarounds & WORKAROUND_TB_LSUB_FLAGS) == 0) ctx->list_flags |= MAILBOX_LIST_ITER_RETURN_NO_FLAGS; From dovecot at dovecot.org Mon Feb 24 18:31:24 2014 From: dovecot at dovecot.org (dovecot at dovecot.org) Date: Mon, 24 Feb 2014 18:31:24 +0000 Subject: dovecot-2.2: lib-storage: Fixed support for list=no prefix="" li... Message-ID: details: http://hg.dovecot.org/dovecot-2.2/rev/fad7f879caa1 changeset: 17151:fad7f879caa1 user: Timo Sirainen date: Mon Feb 24 12:30:51 2014 -0600 description: lib-storage: Fixed support for list=no prefix="" listing. This behavior works with e.g. Outlook where it's allowed to CREATE and LIST the Sent/Trash/etc mailboxes to root level, even though the primary namespace has a prefix. diffstat: src/lib-storage/list/mailbox-list-iter.c | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diffs (35 lines): diff -r 2397adb8c1bd -r fad7f879caa1 src/lib-storage/list/mailbox-list-iter.c --- a/src/lib-storage/list/mailbox-list-iter.c Mon Feb 24 11:29:52 2014 -0600 +++ b/src/lib-storage/list/mailbox-list-iter.c Mon Feb 24 12:30:51 2014 -0600 @@ -239,6 +239,15 @@ return FALSE; } +static bool list_pattern_has_wildcards(const char *pattern) +{ + for (; *pattern != '\0'; pattern++) { + if (*pattern == '%' || *pattern == '*') + return TRUE; + } + return FALSE; +} + static bool ns_match_next(struct ns_list_iterate_context *ctx, struct mail_namespace *ns, const char *pattern) { @@ -256,8 +265,13 @@ /* non-listable namespace matches only with exact prefix */ if (strncmp(ns->prefix, pattern, ns->prefix_len) != 0) return FALSE; - /* prefix="" list=no is never listed */ - if (ns->prefix_len == 0) + /* with prefix="", list=no we don't want to show anything, + except when the client explicitly lists a mailbox without + wildcards (e.g. LIST "" mailbox). this is mainly useful + for working around client bugs (and supporting a specific + IMAP client behavior that's not exactly buggy but not very + good IMAP behavior either). */ + if (ns->prefix_len == 0 && list_pattern_has_wildcards(pattern)) return FALSE; } From pigeonhole at rename-it.nl Mon Feb 24 23:49:17 2014 From: pigeonhole at rename-it.nl (pigeonhole at rename-it.nl) Date: Tue, 25 Feb 2014 00:49:17 +0100 Subject: dovecot-2.2-pigeonhole: lib-sieve: program-client: Removed stale... Message-ID: details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/cf5eba41f6bd changeset: 1844:cf5eba41f6bd user: Stephan Bosch date: Tue Feb 25 00:49:08 2014 +0100 description: lib-sieve: program-client: Removed stale assert. diffstat: src/lib-sieve/util/program-client-local.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diffs (17 lines): diff -r e111a2393a92 -r cf5eba41f6bd src/lib-sieve/util/program-client-local.c --- a/src/lib-sieve/util/program-client-local.c Sun Jan 12 23:23:50 2014 +0100 +++ b/src/lib-sieve/util/program-client-local.c Tue Feb 25 00:49:08 2014 +0100 @@ -226,7 +226,12 @@ time_t runtime, timeout = 0; int status; - i_assert( pid >= 0 ); + if ( pid < 0 ) { + /* program never started */ + pclient->exit_code = 0; + return 0; + } + slclient->pid = -1; /* Calculate timeout */