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: disable the pager when running journalctl under root
Date: Fri, 11 Sep 2026 13:20:56 GMT	[thread overview]
Message-ID: <178913285672.1.2561112394319586719.tests-selinux-23f0ff97146a@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 23f0ff97146a85fc2c469559a0470c0929532b25
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2023-08-17T11:29:26+02:00
            Stats  : +1/-4 in 2 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/23f0ff97146a85fc2c469559a0470c0929532b25?branch=pr775-checkpolicy-revdeps

            Log:
            disable the pager when running journalctl under root

The journalctl command usually runs the less command as a pager.
The less command usually saves the performed actions in a history
file called ~/.lesshs*.
This sequence of commands can produce SELinux denials when executed
under the root user, because the less' history file is located in
the /root directory.

We believe that the number of programs (SELinux domains) which have
write access to the /root directory should be kept limited.

In order to avoid SELinux denials related to /root/.lesshs* files,
the journalctl command will be executed with the --no-pager option.

---
diff --git a/selinux-policy/journalctl-and-similar/main.fmf b/selinux-policy/journalctl-and-similar/main.fmf
index 3a1cdcb..a5e9de2 100644
--- a/selinux-policy/journalctl-and-similar/main.fmf
+++ b/selinux-policy/journalctl-and-similar/main.fmf
@@ -30,9 +30,6 @@ tag:
   - NoRHEL4
   - NoRHEL5
   - NoRHEL6
-  - TIPfail
-  - TIPfail_Security
-  - TIPfail_systemd
   - failinfedora
   - targeted
 link:

diff --git a/selinux-policy/journalctl-and-similar/runtest.sh b/selinux-policy/journalctl-and-similar/runtest.sh
index ac96c64..39fde79 100755
--- a/selinux-policy/journalctl-and-similar/runtest.sh
+++ b/selinux-policy/journalctl-and-similar/runtest.sh
@@ -134,7 +134,7 @@ rlJournalStart
         USER_SECRET="S3kr3t${RANDOM}"
         rlRun "useradd -o -u 0 -g 0 -Z sysadm_u ${USER_NAME}"
         rlRun "echo ${USER_SECRET} | passwd --stdin ${USER_NAME}"
-        rlRun "./ssh.exp ${USER_NAME} ${USER_SECRET} localhost journalctl -l --pager"
+        rlRun "./ssh.exp ${USER_NAME} ${USER_SECRET} localhost journalctl -l --no-pager"
         rlRun "userdel -rfZ ${USER_NAME}"
         rlRun "setsebool ssh_sysadm_login off"
     rlPhaseEnd

                 reply	other threads:[~2026-09-11 13:20 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=178913285672.1.2561112394319586719.tests-selinux-23f0ff97146a@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