diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-01-17 15:02:13 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-02-05 17:31:47 +0100 |
commit | 28c58beca172e3c15c7b4bf128907db05f5c6385 (patch) | |
tree | a88e18ab9baa665a36e196300b0da1c7e50ccd56 | |
parent | d3b044b3e7ec1e42d26d8c75cd37fafb160b6df6 (diff) | |
download | systemd-28c58beca172e3c15c7b4bf128907db05f5c6385.tar.gz |
core: never allow perpetual units to be masked
Fixes: #14550
(cherry picked from commit 88414eed6f45f738ae765d9f72d67c6dc5a51950)
(cherry picked from commit 2f23c648bce479ed275b8f337e399880b5795711)
-rw-r--r-- | src/core/load-fragment.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index eb894eae0c..130f4d3345 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -4666,7 +4666,9 @@ int unit_load_fragment(Unit *u) { return r; if (null_or_empty(&st)) { - u->load_state = UNIT_MASKED; + /* Unit file is masked */ + + u->load_state = u->perpetual ? UNIT_LOADED : UNIT_MASKED; /* don't allow perpetual units to ever be masked */ u->fragment_mtime = 0; } else { u->load_state = UNIT_LOADED; |