cyrus-imapd/cyrus-imapd-2.3.1-replication_policycheck.patch
2006-02-28 20:04:01 +00:00

21 lines
836 B
Diff

diff -Naur cyrus-imapd-2.3.1.orig/imap/sync_commit.c cyrus-imapd-2.3.1/imap/sync_commit.c
--- cyrus-imapd-2.3.1.orig/imap/sync_commit.c 2005-12-13 16:31:10.000000000 +0100
+++ cyrus-imapd-2.3.1/imap/sync_commit.c 2006-01-25 10:18:50.000000000 +0100
@@ -834,9 +834,15 @@
/* Must be atleast MAX_PARTITION_LEN + 30 for partition, need
* MAX_PARTITION_LEN + HOSTNAME_SIZE + 2 for mupdate location */
char buf[MAX_PARTITION_LEN + HOSTNAME_SIZE + 2];
+ char *mbox = name;
+ char *p;
/* Need an extra sanity check here as normal ACL logic is bypassed */
- r = mboxname_policycheck(name);
+ if (config_virtdomains && (p = strchr(name, '!'))) {
+ /* pointer to mailbox w/o domain prefix */
+ mbox = p + 1;
+ }
+ r = mboxname_policycheck(mbox);
if (r) return r;
if (!uniqueid) {