dovecot-2.2-pigeonhole: Doveadm Sieve plugin: Attempting synchro...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Thu Aug 28 09:34:44 UTC 2014


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/591019c327ad
changeset: 1913:591019c327ad
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Thu Aug 28 11:34:37 2014 +0200
description:
Doveadm Sieve plugin: Attempting synchronization with LDAP/DICT caused write access error.
If the main script storage does not allow synchronization, it is now just logged as a debug message.

diffstat:

 src/lib-sieve/sieve-storage-sync.c |   3 ++-
 src/lib-sieve/sieve-storage.c      |  11 ++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r dd2116e13393 -r 591019c327ad src/lib-sieve/sieve-storage-sync.c
--- a/src/lib-sieve/sieve-storage-sync.c	Wed Aug 27 00:19:40 2014 +0200
+++ b/src/lib-sieve/sieve-storage-sync.c	Thu Aug 28 11:34:37 2014 +0200
@@ -39,7 +39,6 @@
 		return 0;
 	}
 
-
 	ns = mail_namespace_find_inbox(user->namespaces);
 	storage->sync_inbox = box = mailbox_alloc(ns->list, "INBOX", flags);
 	if (mailbox_open(box) == 0)
@@ -67,6 +66,8 @@
 {
 	struct mailbox *inbox = storage->sync_inbox;
 
+	i_assert( storage->sync_inbox != NULL );
+
 	if (mailbox_transaction_commit(t) < 0) {
 		enum mail_error error;
 		
diff -r dd2116e13393 -r 591019c327ad src/lib-sieve/sieve-storage.c
--- a/src/lib-sieve/sieve-storage.c	Wed Aug 27 00:19:40 2014 +0200
+++ b/src/lib-sieve/sieve-storage.c	Thu Aug 28 11:34:37 2014 +0200
@@ -266,7 +266,16 @@
 	else
 		error_r = &error;
 
-	i_assert( storage_class->v.init != NULL );	
+	i_assert( storage_class->v.init != NULL );
+
+	if ( (flags & SIEVE_STORAGE_FLAG_SYNCHRONIZING) != 0 &&
+		!storage_class->allows_synchronization ) {
+		sieve_sys_debug(svinst, "%s storage: "
+			"Storage does not support synchronization",
+			storage_class->driver_name);
+		*error_r = SIEVE_ERROR_NOT_POSSIBLE;
+		return NULL;
+	}
 
 	if ((flags & SIEVE_STORAGE_FLAG_READWRITE) &&
 		storage_class->v.save_init == NULL) {


More information about the dovecot-cvs mailing list