dovecot-2.0: acl: Use namespace prefix when looking up global ACLs.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Sep 14 04:25:40 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/6fac2ade5dd6
changeset: 9936:6fac2ade5dd6
user: Timo Sirainen <tss at iki.fi>
date: Sun Sep 13 21:22:53 2009 -0400
description:
acl: Use namespace prefix when looking up global ACLs.
diffstat:
1 file changed, 11 insertions(+), 2 deletions(-)
src/plugins/acl/acl-backend-vfile.c | 13 +++++++++++--
diffs (23 lines):
diff -r 364ee96c6195 -r 6fac2ade5dd6 src/plugins/acl/acl-backend-vfile.c
--- a/src/plugins/acl/acl-backend-vfile.c Sun Sep 13 21:10:33 2009 -0400
+++ b/src/plugins/acl/acl-backend-vfile.c Sun Sep 13 21:22:53 2009 -0400
@@ -151,8 +151,17 @@ acl_backend_vfile_object_init(struct acl
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 */
More information about the dovecot-cvs
mailing list