From: Timo Sirainen Date: Fri, 15 Oct 2010 13:57:36 +0000 (+0100) Subject: lib-storage: Use MAIL_STORAGE_FLAG_NO_AUTOVERIFY for creating shared namespace storages. X-Git-Tag: 2.0.6~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc2c73be39dfe988f52c0370667e3882d01c63a2;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Use MAIL_STORAGE_FLAG_NO_AUTOVERIFY for creating shared namespace storages. This avoids failing storage creation for nonexistent users. Previous failure made it possible for logged in users to figure out what other usernames existed on the system. --- diff --git a/src/lib-storage/index/shared/shared-storage.c b/src/lib-storage/index/shared/shared-storage.c index 480c078c21..6402dd8ce6 100644 --- a/src/lib-storage/index/shared/shared-storage.c +++ b/src/lib-storage/index/shared/shared-storage.c @@ -286,7 +286,8 @@ int shared_storage_get_namespace(struct mail_namespace **_ns, p_strdup(user->pool, storage->unexpanded_location); new_ns->unexpanded_set = unexpanded_ns_set; - if (mail_storage_create(new_ns, NULL, _storage->flags, &error) < 0) { + if (mail_storage_create(new_ns, NULL, _storage->flags | + MAIL_STORAGE_FLAG_NO_AUTOVERIFY, &error) < 0) { mailbox_list_set_critical(list, "Namespace '%s': %s", new_ns->prefix, error); mail_namespace_destroy(new_ns);