From: Lennart Poettering Date: Tue, 13 Mar 2012 01:41:29 +0000 (+0100) Subject: conf-parser: warn if an assignment is place outside of a section X-Git-Tag: v44~43 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62f168a05b5a0b81a75a50791b80ae700dd00afb;p=systemd conf-parser: warn if an assignment is place outside of a section https://bugzilla.redhat.com/show_bug.cgi?id=783134 --- 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) {