summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-04-24 19:53:16 -0300
committerLennart Poettering <lennart@poettering.net>2013-04-25 00:05:14 -0300
commitdb5c0122853a9ecf1cc92e6593461932df2fa866 (patch)
tree45f2cca6a0050dfa36ecb08af64d974ec4542ea5 /src/core
parent60b6991a4dd687097bbc4f1e1ef7585efee079d9 (diff)
conf-parser: restrict .include usage
Disallow recursive .include, and make it unavailable in anything but unit files.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/load-dropin.c2
-rw-r--r--src/core/load-fragment.c2
-rw-r--r--src/core/main.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c
index 67774d5238..0318296f1f 100644
--- a/src/core/load-dropin.c
+++ b/src/core/load-dropin.c
@@ -200,7 +200,7 @@ int unit_load_dropin(Unit *u) {
STRV_FOREACH(f, u->dropin_paths) {
r = config_parse(u->id, *f, NULL,
UNIT_VTABLE(u)->sections, config_item_perf_lookup,
- (void*) load_fragment_gperf_lookup, false, u);
+ (void*) load_fragment_gperf_lookup, false, false, u);
if (r < 0)
return r;
}
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 3d23372630..e2015ed58f 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -2270,7 +2270,7 @@ static int load_from_path(Unit *u, const char *path) {
/* Now, parse the file contents */
r = config_parse(u->id, filename, f, UNIT_VTABLE(u)->sections,
config_item_perf_lookup,
- (void*) load_fragment_gperf_lookup, false, u);
+ (void*) load_fragment_gperf_lookup, false, true, u);
if (r < 0)
goto finish;
diff --git a/src/core/main.c b/src/core/main.c
index ab2ac00d76..695e232514 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -677,7 +677,7 @@ static int parse_config_file(void) {
return 0;
}
- r = config_parse(NULL, fn, f, "Manager\0", config_item_table_lookup, (void*) items, false, NULL);
+ r = config_parse(NULL, fn, f, "Manager\0", config_item_table_lookup, (void*) items, false, false, NULL);
if (r < 0)
log_warning("Failed to parse configuration file: %s", strerror(-r));