dovecot-1.1: ACL: If any of the flag set rights were given, STOR...

dovecot at dovecot.org dovecot at dovecot.org
Mon May 5 00:23:48 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/85b48992cc97
changeset: 7498:85b48992cc97
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 05 00:22:36 2008 +0300
description:
ACL: If any of the flag set rights were given, STORE FLAGS allowed replacing
all flags (+/-FLAGS worked correctly).

diffstat:

1 file changed, 3 insertions(+), 1 deletion(-)
src/plugins/acl/acl-mailbox.c |    4 +++-

diffs (14 lines):

diff -r 1c1dc9d1f383 -r 85b48992cc97 src/plugins/acl/acl-mailbox.c
--- a/src/plugins/acl/acl-mailbox.c	Mon May 05 00:18:56 2008 +0300
+++ b/src/plugins/acl/acl-mailbox.c	Mon May 05 00:22:36 2008 +0300
@@ -155,7 +155,9 @@ acl_mail_update_flags(struct mail *_mail
 		/* handle this by first removing the allowed flags and
 		   then adding the allowed flags */
 		acl_mail_update_flags(_mail, MODIFY_REMOVE, ~flags);
-		acl_mail_update_flags(_mail, MODIFY_ADD, flags);
+		if (flags != 0)
+			acl_mail_update_flags(_mail, MODIFY_ADD, flags);
+		return;
 	}
 
 	amail->super.update_flags(_mail, modify_type, flags);


More information about the dovecot-cvs mailing list