[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-storage.c, 1.165, 1.166

tss at dovecot.org tss at dovecot.org
Fri May 11 15:30:01 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv32759

Modified Files:
	maildir-storage.c 
Log Message:
If we don't have write access to cur/ directory, treat the mailbox as
read-only.



Index: maildir-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-storage.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- maildir-storage.c	17 Apr 2007 12:41:28 -0000	1.165
+++ maildir-storage.c	11 May 2007 12:29:58 -0000	1.166
@@ -526,6 +526,10 @@
 	}
 
 	index_storage_mailbox_init(&mbox->ibox, name, flags, FALSE);
+
+	if (access(t_strconcat(path, "/cur", NULL), W_OK) < 0 &&
+	    errno == EACCES)
+		mbox->ibox.readonly = TRUE;
 	return &mbox->ibox.box;
 }
 



More information about the dovecot-cvs mailing list