From 62f168a05b5a0b81a75a50791b80ae700dd00afb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 13 Mar 2012 02:41:29 +0100 Subject: [PATCH] conf-parser: warn if an assignment is place outside of a section https://bugzilla.redhat.com/show_bug.cgi?id=783134 --- src/conf-parser.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/conf-parser.c b/src/conf-parser.c index 135b175c..a9b01135 100644 --- a/src/conf-parser.c +++ b/src/conf-parser.c @@ -219,8 +219,13 @@ static int parse_line( return 0; } - if (sections && !*section) + if (sections && !*section) { + + if (!relaxed) + log_info("[%s:%u] Assignment outside of section. Ignoring.", filename, line); + return 0; + } e = strchr(l, '='); if (!e) { -- 2.39.5