[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c,
1.93, 1.94
cras at dovecot.org
cras at dovecot.org
Fri Sep 3 23:06:48 EEST 2004
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv28208/lib-storage/index/mbox
Modified Files:
mbox-storage.c
Log Message:
Don't allow creating mailboxes under INBOX.
Index: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- mbox-storage.c 28 Aug 2004 16:39:54 -0000 1.93
+++ mbox-storage.c 3 Sep 2004 20:06:46 -0000 1.94
@@ -495,6 +495,16 @@
return -1;
}
+ if (strncasecmp(name, "INBOX/", 6) == 0) {
+ /* We might actually be able to create mailboxes under INBOX
+ because the real INBOX file isn't usually named as INBOX
+ in the root mail directory. that would anyway be a special
+ case which would require special handling elsewhere, so just
+ don't allow it. */
+ mail_storage_set_error(_storage, "Mailbox already exists");
+ return -1;
+ }
+
/* make sure it doesn't exist already */
path = mbox_get_path(storage, name);
if (stat(path, &st) == 0) {
More information about the dovecot-cvs
mailing list