X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Fconf-parser.c;h=dde62b575501d66c04e2880b01e8058a34b79278;hp=d5a639e874a3138bfe040977f1e7fa46a1da905c;hb=b8e7a47baf10683f59bf848abd300b45cd5042f2;hpb=0183b74fa47d7f05b7bc3b46d82daf8cebb17fa7 diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index d5a639e87..dde62b575 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -225,6 +225,15 @@ static int parse_line(const char* unit, if (startswith(l, ".include ")) { _cleanup_free_ char *fn = NULL; + /* .includes are a bad idea, we only support them here + * for historical reasons. They create cyclic include + * problems and make it difficult to detect + * configuration file changes with an easy + * stat(). Better approaches, such as .d/ drop-in + * snippets exist. + * + * Support for them should be eventually removed. */ + if (!allow_include) { log_syntax(unit, LOG_ERR, filename, line, EBADMSG, ".include not allowed here. Ignoring.");