public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Milos Malik <mmalik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: test if systemd-machined can inspect dead/empty images
Date: Fri, 11 Sep 2026 13:23:14 GMT	[thread overview]
Message-ID: <178913299428.1.14507259761856237116.tests-selinux-a68d8721c6f5@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : a68d8721c6f56c31506bc66d0529d3d77eb21640
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2025-08-27T08:30:40+00:00
            Stats  : +11/-0 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/a68d8721c6f56c31506bc66d0529d3d77eb21640?branch=pr775-checkpolicy-revdeps

            Log:
            test if systemd-machined can inspect dead/empty images

Recent systemd-machined + selinux-policy testing revealed that
SELinux prevents the systemd-machined processes from creating
and removing the following directories and files:
 * /run/systemd/nspawn/
 * /run/systemd/nspawn/locks/
 * /run/systemd/nspawn/locks/inode-*

In order to support various systemd-machined and machinectl functions,
I believe that SELinux policy should allow above-mentioned actions.
The TC looks for appropriate policy rules and file context patterns.

The TC covers RHEL-105966 and RHEL-108849.

---
diff --git a/selinux-policy/systemd-machined-and-similar/Makefile b/selinux-policy/systemd-machined-and-similar/Makefile
index c954661..f99a7c8 100644
--- a/selinux-policy/systemd-machined-and-similar/Makefile
+++ b/selinux-policy/systemd-machined-and-similar/Makefile
@@ -73,6 +73,8 @@ $(METADATA): Makefile
 	@echo "Bug:             RHEL-78088" >> $(METADATA) # RHEL-10
 	@echo "Bug:             RHEL-85379" >> $(METADATA) # RHEL-9
 	@echo "Bug:             RHEL-86528" >> $(METADATA) # RHEL-10
+	@echo "Bug:             RHEL-105966" >> $(METADATA) # RHEL-10
+	@echo "Bug:             RHEL-108849" >> $(METADATA) # RHEL-9
 
 	rhts-lint $(METADATA)
 

diff --git a/selinux-policy/systemd-machined-and-similar/main.fmf b/selinux-policy/systemd-machined-and-similar/main.fmf
index 61d14a8..f76c62c 100644
--- a/selinux-policy/systemd-machined-and-similar/main.fmf
+++ b/selinux-policy/systemd-machined-and-similar/main.fmf
@@ -41,6 +41,8 @@ link:
   - verifies: https://issues.redhat.com/browse/RHEL-78088
   - verifies: https://issues.redhat.com/browse/RHEL-85379
   - verifies: https://issues.redhat.com/browse/RHEL-86528
+  - verifies: https://issues.redhat.com/browse/RHEL-105966
+  - verifies: https://issues.redhat.com/browse/RHEL-108849
 adjust:
   - enabled: false
     when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-alt-7

diff --git a/selinux-policy/systemd-machined-and-similar/runtest.sh b/selinux-policy/systemd-machined-and-similar/runtest.sh
index 688629f..0894522 100755
--- a/selinux-policy/systemd-machined-and-similar/runtest.sh
+++ b/selinux-policy/systemd-machined-and-similar/runtest.sh
@@ -173,6 +173,13 @@ rlJournalStart
         rlRun "rm -rf /var/lib/machines/test"
     rlPhaseEnd
 
+    rlPhaseStartTest "RHEL-105966 + RHEL-108849"
+        rlRun "mkdir -pZ /var/lib/machines/test"
+        rlRun "machinectl list-images"
+        rlRun "machinectl image-status test"
+        rlRun "rm -rf /var/lib/machines/test"
+    rlPhaseEnd
+
     rlPhaseStartCleanup
         sleep 2
         rlSECheckAVC

                 reply	other threads:[~2026-09-11 13:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178913299428.1.14507259761856237116.tests-selinux-a68d8721c6f5@fedoraproject.org \
    --to=mmalik@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox