]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: Use namespace prefix when looking up global ACLs.
authorTimo Sirainen <tss@iki.fi>
Mon, 14 Sep 2009 01:22:53 +0000 (21:22 -0400)
committerTimo Sirainen <tss@iki.fi>
Mon, 14 Sep 2009 01:22:53 +0000 (21:22 -0400)
--HG--
branch : HEAD

src/plugins/acl/acl-backend-vfile.c

index 9cabb120dbb6c604516b64ce1a24dc931945214f..24090a7273cc2ad4fc5917c94c13e327a523dd55 100644 (file)
@@ -151,8 +151,17 @@ acl_backend_vfile_object_init(struct acl_backend *_backend,
        aclobj = i_new(struct acl_object_vfile, 1);
        aclobj->aclobj.backend = _backend;
        aclobj->aclobj.name = i_strdup(name);
-       aclobj->global_path = backend->global_dir == NULL ? NULL :
-               i_strconcat(backend->global_dir, "/", name, NULL);
+
+       if (backend->global_dir != NULL) T_BEGIN {
+               struct mail_namespace *ns =
+                       mailbox_list_get_namespace(_backend->list);
+               string_t *vname;
+
+               vname = t_str_new(128);
+               mail_namespace_get_vname(ns, vname, name);
+               aclobj->global_path = i_strconcat(backend->global_dir, "/",
+                                                 str_c(vname), NULL);
+       } T_END;
 
        if (*name == '\0') {
                /* the default ACL for mailbox list */