dovecot-2.2: lib-storage: Verify that the shared library's versi...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 19 18:07:55 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/488c7dde19ad
changeset: 15090:488c7dde19ad
user: Timo Sirainen <tss at iki.fi>
date: Wed Sep 19 18:07:46 2012 +0300
description:
lib-storage: Verify that the shared library's version matches the binary's version.
diffstat:
src/lib-storage/mail-storage-service.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r 119225e4f305 -r 488c7dde19ad src/lib-storage/mail-storage-service.c
--- a/src/lib-storage/mail-storage-service.c Wed Sep 19 17:49:28 2012 +0300
+++ b/src/lib-storage/mail-storage-service.c Wed Sep 19 18:07:46 2012 +0300
@@ -733,9 +733,17 @@
enum mail_storage_service_flags flags)
{
struct mail_storage_service_ctx *ctx;
+ const char *version;
pool_t pool;
unsigned int count;
+ version = master_service_get_version_string(service);
+ if (version != NULL && strcmp(version, PACKAGE_VERSION) != 0) {
+ i_fatal("Version mismatch: libdovecot-storage.so is '%s', "
+ "while the running Dovecot binary is '%s'",
+ PACKAGE_VERSION, version);
+ }
+
(void)umask(0077);
io_loop_set_time_moved_callback(current_ioloop,
mail_storage_service_time_moved);
More information about the dovecot-cvs
mailing list