conf-parser: warn if an assignment is place outside of a section

https://bugzilla.redhat.com/show_bug.cgi?id=783134
This commit is contained in:
Lennart Poettering 2012-03-13 02:41:29 +01:00
parent b19be9eb9e
commit 62f168a05b
1 changed files with 6 additions and 1 deletions

View File

@ -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) {