[dovecot-cvs] dovecot/src/imap main.c,1.77.2.4,1.77.2.5
tss at dovecot.org
tss at dovecot.org
Thu Feb 22 14:36:01 UTC 2007
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv15806/imap
Modified Files:
Tag: branch_1_0
main.c
Log Message:
Don't compare to PACKAGE_VERSION in lib/ core directly, rather make
module_dir_load() have the version string as parameter. Plugin version
checks can be skipped with version_ignore=yes.
Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/main.c,v
retrieving revision 1.77.2.4
retrieving revision 1.77.2.5
diff -u -d -r1.77.2.4 -r1.77.2.5
--- main.c 16 Feb 2007 13:12:03 -0000 1.77.2.4
+++ main.c 22 Feb 2007 14:35:59 -0000 1.77.2.5
@@ -128,6 +128,15 @@
static void drop_privileges(void)
{
+ const char *version;
+
+ version = getenv("DOVECOT_VERSION");
+ if (version != NULL && strcmp(version, PACKAGE_VERSION) != 0) {
+ i_fatal("Dovecot version mismatch: "
+ "Master is v%s, imap is v"PACKAGE_VERSION" "
+ "(if you don't care, set version_ignore=yes)", version);
+ }
+
/* Log file or syslog opening probably requires roots */
open_logfile();
@@ -142,7 +151,7 @@
if (plugin_dir == NULL)
plugin_dir = MODULEDIR"/imap";
modules = module_dir_load(plugin_dir, getenv("MAIL_PLUGINS"),
- TRUE);
+ TRUE, version);
}
restrict_access_by_env(!IS_STANDALONE());
@@ -153,13 +162,6 @@
struct client *client;
const char *user, *str;
- str = getenv("DOVECOT_VERSION");
- if (str != NULL && strcmp(str, PACKAGE_VERSION) != 0) {
- i_fatal("Dovecot version mismatch: "
- "Master is v%s, imap is v"PACKAGE_VERSION" "
- "(if you don't care, set version_ignore=yes)", str);
- }
-
lib_signals_init();
lib_signals_set_handler(SIGINT, TRUE, sig_die, NULL);
lib_signals_set_handler(SIGTERM, TRUE, sig_die, NULL);
More information about the dovecot-cvs
mailing list