dovecot-2.0: If imap/pop3 service is tried to be started without...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Jul 25 03:59:58 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/ad5d34c9031d
changeset: 9653:ad5d34c9031d
user: Timo Sirainen <tss at iki.fi>
date: Fri Jul 24 20:59:49 2009 -0400
description:
If imap/pop3 service is tried to be started without being auth_dest_service, log better error.
If login_executable=imap/pop3, give better error message.
diffstat:
2 files changed, 14 insertions(+), 6 deletions(-)
src/imap/main.c | 10 +++++++---
src/pop3/main.c | 10 +++++++---
diffs (44 lines):
diff -r 1644c25bfbef -r ad5d34c9031d src/imap/main.c
--- a/src/imap/main.c Fri Jul 24 16:57:17 2009 -0400
+++ b/src/imap/main.c Fri Jul 24 20:59:49 2009 -0400
@@ -206,11 +206,15 @@ int main(int argc, char *argv[], char *e
input.module = "imap";
input.service = "imap";
input.username = getenv("USER");
+ if (input.username == NULL && IS_STANDALONE())
+ input.username = getlogin();
if (input.username == NULL) {
- if (IS_STANDALONE())
- input.username = getlogin();
- if (input.username == NULL)
+ if (getenv(MASTER_UID_ENV) == NULL)
i_fatal("USER environment missing");
+ else {
+ i_fatal("login_executable setting must be imap-login, "
+ "not imap");
+ }
}
if ((value = getenv("IP")) != NULL)
net_addr2ip(value, &input.remote_ip);
diff -r 1644c25bfbef -r ad5d34c9031d src/pop3/main.c
--- a/src/pop3/main.c Fri Jul 24 16:57:17 2009 -0400
+++ b/src/pop3/main.c Fri Jul 24 20:59:49 2009 -0400
@@ -113,11 +113,15 @@ int main(int argc, char *argv[], char *e
input.module = "pop3";
input.service = "pop3";
input.username = getenv("USER");
+ if (input.username == NULL && IS_STANDALONE())
+ input.username = getlogin();
if (input.username == NULL) {
- if (IS_STANDALONE())
- input.username = getlogin();
- if (input.username == NULL)
+ if (getenv(MASTER_UID_ENV) == NULL)
i_fatal("USER environment missing");
+ else {
+ i_fatal("login_executable setting must be pop3-login, "
+ "not pop3");
+ }
}
if ((value = getenv("IP")) != NULL)
net_addr2ip(value, &input.remote_ip);
More information about the dovecot-cvs
mailing list