From 0a470c5b96fd8a8a7ecbb56fb1cd2b75136f11df Mon Sep 17 00:00:00 2001 From: Ali Mirjamali Date: Tue, 11 Mar 2025 14:06:30 +0330 Subject: [PATCH] vmupdate: Fix `meminfo-writer` SELinux label for both bin & sbin Since `meminfo-writer` is moved from `/usr/sbin` to `/usr/bin`, the patch should look for both scenarios and apply the patch accordingly --- vmupdate/agent/source/plugins/fix_meminfo_writer_label.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vmupdate/agent/source/plugins/fix_meminfo_writer_label.py b/vmupdate/agent/source/plugins/fix_meminfo_writer_label.py index a449d48..fde593e 100644 --- a/vmupdate/agent/source/plugins/fix_meminfo_writer_label.py +++ b/vmupdate/agent/source/plugins/fix_meminfo_writer_label.py @@ -12,7 +12,10 @@ def fix_meminfo_writer_label(os_data, log, **kwargs): if os_data["id"] == "fedora": if os.path.exists("/usr/sbin/selinuxenabled"): - meminfo_path = "/usr/sbin/meminfo-writer" + if os.path.exists("/usr/bin/meminfo-writer"): + meminfo_path = "/usr/bin/meminfo-writer" + else: + meminfo_path = "/usr/sbin/meminfo-writer" expected_label = "qubes_meminfo_writer_exec_t" label_changed = False