dovecot-1.2: IMAP: SETACL +<rights> or -<rights> was broken.

dovecot at dovecot.org dovecot at dovecot.org
Wed Nov 19 20:03:47 EET 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/ba5f7a4b89d6
changeset: 8454:ba5f7a4b89d6
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Nov 19 20:03:33 2008 +0200
description:
IMAP: SETACL +<rights> or -<rights> was broken.

diffstat:

1 file changed, 14 insertions(+), 14 deletions(-)
src/plugins/imap-acl/imap-acl-plugin.c |   28 ++++++++++++++--------------

diffs (45 lines):

diff -r 1d542b149bed -r ba5f7a4b89d6 src/plugins/imap-acl/imap-acl-plugin.c
--- a/src/plugins/imap-acl/imap-acl-plugin.c	Wed Nov 19 19:54:41 2008 +0200
+++ b/src/plugins/imap-acl/imap-acl-plugin.c	Wed Nov 19 20:03:33 2008 +0200
@@ -382,20 +382,6 @@ static bool cmd_setacl(struct client_com
 		identifier++;
 	}
 
-	if (imap_acl_identifier_parse(identifier, &update.rights,
-				      TRUE, &error) < 0) {
-		client_send_command_error(cmd, error);
-		return TRUE;
-	}
-	if (imap_acl_letters_parse(rights, &update.rights.rights, &error) < 0) {
-		client_send_command_error(cmd, error);
-		return TRUE;
-	}
-
-	box = acl_mailbox_open_as_admin(cmd, mailbox);
-	if (box == NULL)
-		return TRUE;
-
 	switch (*rights) {
 	case '-':
 		update.modify_mode = ACL_MODIFY_MODE_REMOVE;
@@ -409,6 +395,20 @@ static bool cmd_setacl(struct client_com
 		update.modify_mode = ACL_MODIFY_MODE_REPLACE;
 		break;
 	}
+
+	if (imap_acl_identifier_parse(identifier, &update.rights,
+				      TRUE, &error) < 0) {
+		client_send_command_error(cmd, error);
+		return TRUE;
+	}
+	if (imap_acl_letters_parse(rights, &update.rights.rights, &error) < 0) {
+		client_send_command_error(cmd, error);
+		return TRUE;
+	}
+
+	box = acl_mailbox_open_as_admin(cmd, mailbox);
+	if (box == NULL)
+		return TRUE;
 
 	if (negative) {
 		update.neg_modify_mode = update.modify_mode;


More information about the dovecot-cvs mailing list