From 11b3775f514f521f353741ff6ac4d66cf0e928e8 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Mon, 8 Jul 2024 17:12:20 +0200 Subject: 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 --- test/units/TEST-07-PID1.issue-33672.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/units/TEST-07-PID1.issue-33672.sh') diff --git a/test/units/TEST-07-PID1.issue-33672.sh b/test/units/TEST-07-PID1.issue-33672.sh index ab388e32b1..370497c346 100755 --- a/test/units/TEST-07-PID1.issue-33672.sh +++ b/test/units/TEST-07-PID1.issue-33672.sh @@ -37,5 +37,4 @@ systemctl unmask "$UNIT" assert_eq "$(systemctl show -P NeedDaemonReload "$UNIT")" no systemctl mask "$UNIT" -# FIXME: should be "no" -assert_eq "$(systemctl show -P NeedDaemonReload "$UNIT")" yes +assert_eq "$(systemctl show -P NeedDaemonReload "$UNIT")" no -- cgit v1.2.3