]> git.ipfire.org Git - thirdparty/systemd.git/commit
core/unit: ignore dropins for masked units completely when checking need_reload 33711/head
authorMike Yuan <me@yhndnzj.com>
Mon, 8 Jul 2024 15:12:20 +0000 (17:12 +0200)
committerDavid Tardon <dtardon@redhat.com>
Fri, 12 Jul 2024 13:59:36 +0000 (15:59 +0200)
commit11b3775f514f521f353741ff6ac4d66cf0e928e8
treec3a5b2c2bca55c99a4950947cbd27668d7147a2d
parent8b6de9e6381b39f59c936d2b0c6ce47f1b70a19e
core/unit: ignore dropins for masked units completely when checking need_reload

Follow-up for 19a44dfe4525ab01caf593a9c2beada4b412910d

If a drop-in is set from upper level, e.g. global unit_type.d/,
even if a unit is masked, its dropin_paths would still be partially
populated. However, unit_need_daemon_reload() would always
compare u->dropin_paths with empty strv in case of masked units,
resulting in it always returning true. Instead, let's ignore
dropins entirely here.

Fixes #33672
src/core/unit.c
test/units/TEST-07-PID1.issue-33672.sh