From: Timo Sirainen Date: Fri, 31 Mar 2017 13:42:55 +0000 (+0300) Subject: lmtp: Die at startup if config reading fails. X-Git-Tag: 2.3.0.rc1~1818 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f33cd5b8b44175256eb92bec51a60ad8fb98bbe0;p=thirdparty%2Fdovecot%2Fcore.git lmtp: Die at startup if config reading fails. Although most of the time it's not strictly required for config to be read here, one exception is SSL server settings. If this config reading fails, the SSL initialization just crashes. So this gives a better error message than a crash. Also config reading really isn't supposed to fail anyway. --- diff --git a/src/lmtp/main.c b/src/lmtp/main.c index 232c5006aa..47c8ce4333 100644 --- a/src/lmtp/main.c +++ b/src/lmtp/main.c @@ -50,8 +50,9 @@ static void drop_privileges(void) i_zero(&input); input.module = "lmtp"; input.service = "lmtp"; - (void)master_service_settings_read(master_service, - &input, &output, &error); + if (master_service_settings_read(master_service, + &input, &output, &error) < 0) + i_fatal("Error reading configuration: %s", error); restrict_access_by_env(NULL, FALSE); }