summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-03-13 02:41:29 +0100
committerLennart Poettering <lennart@poettering.net>2012-03-13 02:41:29 +0100
commit62f168a05b5a0b81a75a50791b80ae700dd00afb (patch)
tree15fe758f2e4835991da1c1b75f19fb07c46ca743 /src
parentb19be9eb9e231ccf350e0e051b687fc425c61904 (diff)
conf-parser: warn if an assignment is place outside of a section
https://bugzilla.redhat.com/show_bug.cgi?id=783134
Diffstat (limited to 'src')
-rw-r--r--src/conf-parser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/conf-parser.c b/src/conf-parser.c
index 135b175c09..a9b01135e6 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) {