dovecot-2.2: acl: Skip ACLs if admin user flag is set (especiall...

dovecot at dovecot.org dovecot at dovecot.org
Wed Feb 20 16:03:59 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/8e992ae76c45
changeset: 15862:8e992ae76c45
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Feb 20 15:56:56 2013 +0200
description:
acl: Skip ACLs if admin user flag is set (especially dsync).

diffstat:

 src/plugins/acl/acl-api.c |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (25 lines):

diff -r cfdd31b26493 -r 8e992ae76c45 src/plugins/acl/acl-api.c
--- a/src/plugins/acl/acl-api.c	Wed Feb 20 15:49:46 2013 +0200
+++ b/src/plugins/acl/acl-api.c	Wed Feb 20 15:56:56 2013 +0200
@@ -3,6 +3,8 @@
 #include "lib.h"
 #include "str.h"
 #include "hash.h"
+#include "mail-user.h"
+#include "mailbox-list.h"
 #include "acl-cache.h"
 #include "acl-api-private.h"
 
@@ -31,6 +33,12 @@
 	struct acl_backend *backend = aclobj->backend;
 	const struct acl_mask *have_mask;
 
+	if (mailbox_list_get_user(aclobj->backend->list)->admin) {
+		/* admin user (especially dsync) can do anything regardless
+		   of ACLs */
+		return 1;
+	}
+
 	if (backend->v.object_refresh_cache(aclobj) < 0)
 		return -1;
 


More information about the dovecot-cvs mailing list