From: Timo Sirainen Date: Sat, 25 Jul 2009 00:59:49 +0000 (-0400) Subject: If imap/pop3 service is tried to be started without being auth_dest_service, log... X-Git-Tag: 2.0.alpha1~399 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cef2be5fb553b05f421f86c1ef497f0dc29d069e;p=thirdparty%2Fdovecot%2Fcore.git 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. --HG-- branch : HEAD --- diff --git a/src/imap/main.c b/src/imap/main.c index cf8733898c..88a5ef03af 100644 --- a/src/imap/main.c +++ b/src/imap/main.c @@ -206,11 +206,15 @@ int main(int argc, char *argv[], char *envp[]) 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 --git a/src/pop3/main.c b/src/pop3/main.c index 6d86aeb9af..528a826a92 100644 --- a/src/pop3/main.c +++ b/src/pop3/main.c @@ -113,11 +113,15 @@ int main(int argc, char *argv[], char *envp[]) 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);