From 0878b1e492b7c10a2cb99ef479dbb8506992309a Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Tue, 13 Sep 2016 07:49:41 -0400 Subject: [PATCH] lib-storage: remove attribute accessibility checks index_storage_attribute_{set,get} should assume that the caller performed due diligence and checked whether or not the user is allowed to store under the key. --- src/lib-storage/index/index-attribute.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/lib-storage/index/index-attribute.c b/src/lib-storage/index/index-attribute.c index 0ed10ca1e3..c36b039ef0 100644 --- a/src/lib-storage/index/index-attribute.c +++ b/src/lib-storage/index/index-attribute.c @@ -197,13 +197,6 @@ int index_storage_attribute_set(struct mailbox_transaction_context *t, time_t ts = value->last_change != 0 ? value->last_change : ioloop_time; int ret = 0; - if (!t->internal_attribute && - !MAILBOX_ATTRIBUTE_KEY_IS_USER_ACCESSIBLE(key)) { - mail_storage_set_error(t->box->storage, MAIL_ERROR_PARAMS, - "Internal attributes cannot be changed directly"); - return -1; - } - if (index_storage_attribute_get_dict_trans(t, type, &dtrans, &mailbox_prefix) < 0) return -1; @@ -238,10 +231,6 @@ int index_storage_attribute_get(struct mailbox_transaction_context *t, memset(value_r, 0, sizeof(*value_r)); - if (!t->internal_attribute && - !MAILBOX_ATTRIBUTE_KEY_IS_USER_ACCESSIBLE(key)) - return 0; - if (index_storage_get_dict(t->box, type, &dict, &mailbox_prefix) < 0) return -1;