[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-storage.c, 1.115.2.27, 1.115.2.28

tss at dovecot.org tss at dovecot.org
Fri May 11 15:29:58 EEST 2007


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

Modified Files:
      Tag: branch_1_0
	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.115.2.27
retrieving revision 1.115.2.28
diff -u -d -r1.115.2.27 -r1.115.2.28
--- maildir-storage.c	27 Mar 2007 19:59:25 -0000	1.115.2.27
+++ maildir-storage.c	11 May 2007 12:29:56 -0000	1.115.2.28
@@ -552,6 +552,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