public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: modify daemons_use_tty in tests which use systemd-run
@ 2026-09-11 13:20 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:20 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 92d69db177b8e058cf7bbb3437864c48b6181d4a
Author : Milos Malik <mmalik@redhat.com>
Date : 2023-03-21T11:38:38+01:00
Stats : +4/-0 in 2 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/92d69db177b8e058cf7bbb3437864c48b6181d4a?branch=pr775-checkpolicy-revdeps
Log:
modify daemons_use_tty in tests which use systemd-run
In order to allow a running systemd service to print an output onto
console, the daemons_use_tty boolean needs to be enabled. Otherwise
the following error message appears:
Failed to start transient service unit: Connection reset by peer
The daemons_use_tty boolean is disabled by default.
---
diff --git a/selinux-policy/systemd-creds/runtest.sh b/selinux-policy/systemd-creds/runtest.sh
index 212b1a5..227e890 100755
--- a/selinux-policy/systemd-creds/runtest.sh
+++ b/selinux-policy/systemd-creds/runtest.sh
@@ -56,6 +56,7 @@ rlJournalStart
rlPhaseEnd
rlPhaseStartTest "a systemd service loading credentials"
+ rlRun "setsebool daemons_use_tty on"
rlRun "echo hello > /foo"
rlRun "ls -alZ /foo"
rlRun "systemd-creds encrypt /foo /bar"
@@ -66,6 +67,7 @@ rlJournalStart
rlRun "systemctl status dmesg.service" 0-255
rlRun "rm -f /foo /bar"
rlRun "systemd-run -P --wait -p LoadCredential=abc:/etc/hosts systemd-creds cat abc"
+ rlRun "setsebool daemons_use_tty off"
rlPhaseEnd
rlPhaseStartCleanup
diff --git a/selinux-policy/systemd-run-and-similar/runtest.sh b/selinux-policy/systemd-run-and-similar/runtest.sh
index 82990ab..0b0fbd2 100755
--- a/selinux-policy/systemd-run-and-similar/runtest.sh
+++ b/selinux-policy/systemd-run-and-similar/runtest.sh
@@ -37,6 +37,7 @@ rlJournalStart
rlAssertRpm ${PACKAGE}
rlAssertRpm ${PACKAGE}-targeted
rlAssertRpm systemd
+ rlRun "setsebool daemons_use_tty on"
rlSESetEnforce
rlSEStatus
@@ -76,6 +77,7 @@ rlJournalStart
rlPhaseStartCleanup
sleep 2
rlSECheckAVC
+ rlRun "setsebool daemons_use_tty off"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:20 [tests/selinux] pr775-checkpolicy-revdeps: modify daemons_use_tty in tests which use systemd-run Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox