[dovecot-cvs] dovecot/src/lib file-dotlock.c,1.13,1.14
cras at procontrol.fi
cras at procontrol.fi
Sun May 30 00:40:33 EEST 2004
- Previous message: [dovecot-cvs] dovecot/src/imap-login client-authenticate.c, 1.16,
1.17
- Next message: [dovecot-cvs] dovecot/src/auth Makefile.am, 1.24,
1.25 auth-client-connection.c, 1.5,
1.6 auth-client-interface.h, 1.4, 1.5 auth-master-connection.c,
1.6, 1.7 auth-master-connection.h, 1.2,
1.3 auth-master-interface.h, 1.3, 1.4 main.c, 1.23,
1.24 mech-anonymous.c, 1.3, 1.4 mech-cram-md5.c, 1.3,
1.4 mech-digest-md5.c, 1.19, 1.20 mech-plain.c, 1.16,
1.17 mech.c, 1.21, 1.22 mech.h, 1.15, 1.16 passdb.c, 1.14,
1.15 auth-mech-desc.h, 1.3, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv30244/lib
Modified Files:
file-dotlock.c
Log Message:
Removed hardcoded mechanism lists. It's now possible to add them
dynamically. Added support for SASL initial response.
Index: file-dotlock.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/file-dotlock.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- a/file-dotlock.c 16 May 2004 23:16:23 -0000 1.13
+++ b/file-dotlock.c 29 May 2004 21:40:30 -0000 1.14
@@ -371,13 +371,27 @@
return -1;
}
+ dotlock_r->dev = st.st_dev;
+ dotlock_r->ino = st.st_ino;
+
if (close(fd) < 0) {
i_error("fstat(%s) failed: %m", lock_path);
return -1;
}
- dotlock_r->dev = st.st_dev;
- dotlock_r->ino = st.st_ino;
+ /* some NFS implementations may have used cached mtime in previous
+ fstat() call. Check again to avoid "dotlock was modified" errors. */
+ if (stat(lock_path, &st) < 0) {
+ i_error("stat(%s) failed: %m", lock_path);
+ return -1;
+ }
+ /* extra sanity check won't hurt.. */
+ if (st.st_dev != dotlock_r->dev ||
+ st.st_ino != dotlock_r->ino) {
+ i_error("dotlock %s was immediately recreated under us",
+ lock_path);
+ return -1;
+ }
dotlock_r->mtime = st.st_mtime;
return 1;
}
- Previous message: [dovecot-cvs] dovecot/src/imap-login client-authenticate.c, 1.16,
1.17
- Next message: [dovecot-cvs] dovecot/src/auth Makefile.am, 1.24,
1.25 auth-client-connection.c, 1.5,
1.6 auth-client-interface.h, 1.4, 1.5 auth-master-connection.c,
1.6, 1.7 auth-master-connection.h, 1.2,
1.3 auth-master-interface.h, 1.3, 1.4 main.c, 1.23,
1.24 mech-anonymous.c, 1.3, 1.4 mech-cram-md5.c, 1.3,
1.4 mech-digest-md5.c, 1.19, 1.20 mech-plain.c, 1.16,
1.17 mech.c, 1.21, 1.22 mech.h, 1.15, 1.16 passdb.c, 1.14,
1.15 auth-mech-desc.h, 1.3, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list