dovecot-2.2: lib-storage: Updated MAILBOX_ATTRIBUTE_KEY_IS_USER_...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Sep 7 12:09:10 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/1a49a8d12fe0
changeset: 19099:1a49a8d12fe0
user: Timo Sirainen <tss at iki.fi>
date: Mon Sep 07 15:06:40 2015 +0300
description:
lib-storage: Updated MAILBOX_ATTRIBUTE_KEY_IS_USER_ACCESSIBLE() to not allow private server attributes.
diffstat:
src/lib-storage/mailbox-attribute.h | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (22 lines):
diff -r 74fb129251e2 -r 1a49a8d12fe0 src/lib-storage/mailbox-attribute.h
--- a/src/lib-storage/mailbox-attribute.h Mon Sep 07 14:16:39 2015 +0300
+++ b/src/lib-storage/mailbox-attribute.h Mon Sep 07 15:06:40 2015 +0300
@@ -20,12 +20,15 @@
#define MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER \
MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT"server/"
-/* User can get/set all non-pvt/ attributes and also pvt/server/ attributes. */
+/* User can get/set all non-pvt/ attributes and also pvt/server/
+ (but not pvt/server/pvt/) attributes. */
#define MAILBOX_ATTRIBUTE_KEY_IS_USER_ACCESSIBLE(key) \
(strncmp(key, MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT, \
strlen(MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT)) != 0 || \
- strncmp(key, MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER, \
- strlen(MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER)) == 0)
+ (strncmp(key, MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER, \
+ strlen(MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER)) == 0 && \
+ strncmp(key, MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT, \
+ strlen(MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT)) != 0))
enum mail_attribute_type {
MAIL_ATTRIBUTE_TYPE_PRIVATE,
More information about the dovecot-cvs
mailing list