]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: Try to prevent infinite recursive template instantiation 20609/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 1 Sep 2021 09:21:28 +0000 (11:21 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 28 Oct 2021 10:42:21 +0000 (11:42 +0100)
commit88022148c4769f7d39a9ef3cc41cef3f3479eaad
treebf75b3380bb7710d61f0f17476b757b937ecb037
parent11e9347bc63364ba6c8934c20e288e5664254024
core: Try to prevent infinite recursive template instantiation

To prevent situations like in #17602 from happening, let's drop
direct recursive template dependencies. These will almost certainly
lead to infinite recursion so let's drop them immediately to avoid
instantiating potentially thousands of irrelevant units.

Example of a template that would lead to infinite recursion which
is caught by this check:

notify@.service:

```
[Unit]
Wants=notify@%n.service
```
man/systemd.unit.xml
src/basic/unit-name.c
src/basic/unit-name.h
src/core/load-fragment.c
src/core/load-fragment.h
src/test/test-load-fragment.c
src/test/test-unit-name.c