changeset 12272:2d6396330099

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.
author Timo Sirainen <tss@iki.fi>
date Fri, 15 Oct 2010 14:57:36 +0100
parents 0cc916fc09f9
children b277b71fb57f
files src/lib-storage/index/shared/shared-storage.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/shared/shared-storage.c	Fri Oct 15 14:56:05 2010 +0100
+++ b/src/lib-storage/index/shared/shared-storage.c	Fri Oct 15 14:57:36 2010 +0100
@@ -286,7 +286,8 @@
 		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);