[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c,
1.82, 1.83
cras at procontrol.fi
cras at procontrol.fi
Thu Jun 24 17:00:23 EEST 2004
Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv15712/lib-storage/index/mbox
Modified Files:
mbox-storage.c
Log Message:
Check immediately if we have write-access to mbox.
Index: mbox-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- mbox-storage.c 22 Jun 2004 07:48:18 -0000 1.82
+++ mbox-storage.c 24 Jun 2004 14:00:21 -0000 1.83
@@ -457,6 +457,15 @@
ibox->mail_deinit = mbox_mail_deinit;
ibox->mail_interface = &mbox_mail;
+ if (access(path, R_OK|W_OK) < 0) {
+ if (errno < EACCES)
+ mbox_set_syscall_error(ibox, "access()");
+ else {
+ ibox->readonly = TRUE;
+ ibox->mbox_readonly = TRUE;
+ }
+ }
+
return &ibox->box;
}
More information about the dovecot-cvs
mailing list