dovecot-1.2: dovecot-auth: Give a nice error message if you try ...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Aug 5 03:34:52 EEST 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/6396a64b0fcb
changeset: 8069:6396a64b0fcb
user: Timo Sirainen <tss at iki.fi>
date: Mon Aug 04 20:34:35 2008 -0400
description:
dovecot-auth: Give a nice error message if you try to run it manually.
diffstat:
1 file changed, 9 insertions(+), 9 deletions(-)
src/auth/main.c | 18 +++++++++---------
diffs (36 lines):
diff -r 9569038e0816 -r 6396a64b0fcb src/auth/main.c
--- a/src/auth/main.c Mon Aug 04 17:33:09 2008 -0400
+++ b/src/auth/main.c Mon Aug 04 20:34:35 2008 -0400
@@ -188,6 +188,14 @@ static void drop_privileges(void)
"(if you don't care, set version_ignore=yes)", version);
}
+ standalone = getenv("DOVECOT_MASTER") == NULL;
+ if (standalone && getenv("AUTH_1") == NULL) {
+ i_fatal("dovecot-auth is usually started through "
+ "dovecot master process. If you wish to run "
+ "it standalone, you'll need to set AUTH_* "
+ "environment variables (AUTH_1 isn't set).");
+ }
+
open_logfile();
/* Open /dev/urandom before chrooting */
@@ -239,16 +247,8 @@ static void main_init(bool nodaemon)
return;
}
- standalone = getenv("DOVECOT_MASTER") == NULL;
- if (standalone) {
+ if (getenv("DOVECOT_MASTER") == NULL) {
/* starting standalone */
- if (getenv("AUTH_1") == NULL) {
- i_fatal("dovecot-auth is usually started through "
- "dovecot master process. If you wish to run "
- "it standalone, you'll need to set AUTH_* "
- "environment variables (AUTH_1 isn't set).");
- }
-
if (!nodaemon) {
switch (fork()) {
case -1:
More information about the dovecot-cvs
mailing list