[dovecot-cvs] dovecot: If created dotlock file's ctime is smaller than the cur...
dovecot at dovecot.org
dovecot at dovecot.org
Fri May 25 18:11:03 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/fdc30be3b5e5
changeset: 5662:fdc30be3b5e5
user: Timo Sirainen <tss at iki.fi>
date: Fri May 25 18:10:47 2007 +0300
description:
If created dotlock file's ctime is smaller than the current time (NFS
server's clock is wrong), log a warning.
diffstat:
1 file changed, 9 insertions(+)
src/lib/file-dotlock.c | 9 +++++++++
diffs (19 lines):
diff -r f18a7fd8ac9a -r fdc30be3b5e5 src/lib/file-dotlock.c
--- a/src/lib/file-dotlock.c Thu May 24 20:21:29 2007 +0300
+++ b/src/lib/file-dotlock.c Fri May 25 18:10:47 2007 +0300
@@ -451,6 +451,15 @@ static int dotlock_create(const char *pa
dotlock->fd = lock_info.fd;
dotlock->lock_time = now;
lock_info.fd = -1;
+
+ if (st.st_ctime < now)
+ now = time(NULL);
+ if (st.st_ctime < now) {
+ i_warning("Created dotlock file's timestamp is "
+ "smaller than current time "
+ "(%s < %s): %s", dec2str(st.st_ctime),
+ dec2str(now), path);
+ }
}
}
More information about the dovecot-cvs
mailing list