From b73b1f9e24f4bfa29eeb6b731f99eedc9c3d9580 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 31 Mar 2017 16:42:55 +0300 Subject: [PATCH] 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. --- src/lmtp/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); }