dovecot-2.0: mbox: Another utime()=EPERM log message hiding.

dovecot at dovecot.org dovecot at dovecot.org
Tue Nov 16 20:51:40 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/586d549732f5
changeset: 12428:586d549732f5
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Nov 16 18:51:37 2010 +0000
description:
mbox: Another utime()=EPERM log message hiding.

diffstat:

 src/lib-storage/index/mbox/mbox-file.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (17 lines):

diff -r 3daec8435d29 -r 586d549732f5 src/lib-storage/index/mbox/mbox-file.c
--- a/src/lib-storage/index/mbox/mbox-file.c	Tue Nov 16 18:47:48 2010 +0000
+++ b/src/lib-storage/index/mbox/mbox-file.c	Tue Nov 16 18:51:37 2010 +0000
@@ -114,10 +114,9 @@
 		if (st.st_atime >= st.st_mtime) {
 			buf.modtime = st.st_mtime;
 			buf.actime = buf.modtime - 1;
-			if (utime(mbox->box.path, &buf) < 0) {
-				mbox_set_syscall_error(mbox, "utimes()");
-				return;
-			}
+			/* EPERM can happen with shared mailboxes */
+			if (utime(mbox->box.path, &buf) < 0 && errno != EPERM)
+				mbox_set_syscall_error(mbox, "utime()");
 		}
 	}
 }


More information about the dovecot-cvs mailing list