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: delete the test user and the base.cil file
Date: Fri, 11 Sep 2026 13:18:40 GMT [thread overview]
Message-ID: <178913272051.1.15112439785648670682.tests-selinux-5ff9ff4d44d7@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 5ff9ff4d44d78c6c11de5f5291bd4311aa40339f
Author : Milos Malik <mmalik@redhat.com>
Date : 2021-01-08T10:44:56+01:00
Stats : +3/-1 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/5ff9ff4d44d78c6c11de5f5291bd4311aa40339f?branch=pr775-checkpolicy-revdeps
Log:
delete the test user and the base.cil file
Repeated run of the TC in the same location revealed 2 issues:
the test user (toor) and the base.cil (modified policy module) file
were not deleted, which lead to unnecessary failures.
Both issues should be fixed now.
---
diff --git a/selinux-policy/perf_event-and-related/runtest.sh b/selinux-policy/perf_event-and-related/runtest.sh
index d71422f..a971635 100755
--- a/selinux-policy/perf_event-and-related/runtest.sh
+++ b/selinux-policy/perf_event-and-related/runtest.sh
@@ -41,6 +41,7 @@ rlJournalStart
rlAssertRpm ${PACKAGE}-targeted
rlAssertRpm perf
+ rlRun "rm -f base.cil"
rlRun "semodule -c -E base"
if grep -q perf_event base.cil ; then
rlLog "current SELinux policy already defines the perf_event class"
@@ -74,6 +75,7 @@ rlJournalStart
rlRun "grep -i permit /etc/ssh/sshd_config"
rlFileBackup /etc/ssh/sshd_config
rlRun "sed -i 's/^.*PermitRootLogin.*$/PermitRootLogin yes/' /etc/ssh/sshd_config"
+ rlRun "sed -i 's/^.*PasswordAuthentication.*$/PasswordAuthentication yes/' /etc/ssh/sshd_config"
rlRun "service sshd restart"
rlRun "setsebool ssh_sysadm_login on"
USER_NAME="toor"
@@ -81,7 +83,7 @@ rlJournalStart
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}/sysadm_r ${USER_SECRET} localhost perf record -o /dev/null echo test"
- rlRun "userdel -Z ${USER_NAME}"
+ rlRun "userdel -rfZ ${USER_NAME}"
rlRun "setsebool ssh_sysadm_login off"
rlFileRestore
rlRun "service sshd restart"
reply other threads:[~2026-09-11 13:18 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=178913272051.1.15112439785648670682.tests-selinux-5ff9ff4d44d7@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