[systemd-devel] [PATCH] Prevent crash due to infinite .include loop
Lennart Poettering
lennart at poettering.net
Mon Mar 11 07:17:51 PDT 2013
On Mon, 11.03.13 01:16, Timothée Ravier (siosm99 at gmail.com) wrote:
> Hi,
>
> A friend of mine found that with the current configuration system, it is
> possible for a unit to include itself thus creating an infinite loop.
Hmm, detecting these cases down properly would require a bit too much
code for my taste. I am tempted to just disallow transitive
includes. i.e. if a file that is included tries to include another file
we'd just generate a parsing error (or maybe just a warning, and ignore
it).
I guess this is another reason why we should really suggest people to
use .d/*.conf drop-ins rather than .include everywhere. I am also
tempted to drop the description of .include from the man pages, to
gently push people in the direction of using .d/*.conf more.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list