]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Use MAIL_STORAGE_FLAG_NO_AUTOVERIFY for creating shared namespace storages.
authorTimo Sirainen <tss@iki.fi>
Fri, 15 Oct 2010 13:57:36 +0000 (14:57 +0100)
committerTimo Sirainen <tss@iki.fi>
Fri, 15 Oct 2010 13:57:36 +0000 (14:57 +0100)
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.

src/lib-storage/index/shared/shared-storage.c

index 480c078c21dae51b8b563526eefea02bccdf6d74..6402dd8ce68bc80445a42311d7c85b3a770b5256 100644 (file)
@@ -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);