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.2.29.rc1~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b73b1f9e24f4bfa29eeb6b731f99eedc9c3d9580;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 9a8e034a7f..7ca127ec29 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); }