public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: policycoreutils/semanage-login: test range of added login
@ 2026-09-11 13:17 Petr Lautrbach
0 siblings, 0 replies; only message in thread
From: Petr Lautrbach @ 2026-09-11 13:17 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 2e70fcdec80ddba975f9750e023053134e264dd8
Author : Petr Lautrbach <plautrba@redhat.com>
Date : 2019-09-03T17:47:03+02:00
Stats : +10/-0 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/2e70fcdec80ddba975f9750e023053134e264dd8?branch=pr775-checkpolicy-revdeps
Log:
policycoreutils/semanage-login: test range of added login
When a new login mapping is added, default range should be same as the range of
used SELinux user.
Covers: https://bugzilla.redhat.com/show_bug.cgi?id=1312283
---
diff --git a/policycoreutils/semanage-login/runtest.sh b/policycoreutils/semanage-login/runtest.sh
index daf074c..a69d21a 100755
--- a/policycoreutils/semanage-login/runtest.sh
+++ b/policycoreutils/semanage-login/runtest.sh
@@ -60,6 +60,16 @@ rlJournalStart
rlRun "userdel -rf xyz"
rlPhaseEnd
+ rlPhaseStartTest "SELinux range of added login should be same as the user's range"
+ rlRun "useradd zyx"
+ rlRun "semanage login -a -s staff_u zyx"
+ loginrange=$(semanage login -l | grep zyx | awk '{print $3}')
+ userrange=$(semanage user -l | grep staff_u | awk '{print $4}')
+ rlAssertEquals "Is zyx login SELinux range same as staff_u SELinux user range" "$loginrange" "$userrange"
+ rlRun "semanage login -d -s staff_u zyx"
+ rlRun "userdel -rf zyx"
+ rlPhaseEnd
+
rlPhaseStartCleanup
rlPhaseEnd
rlJournalPrintText
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:17 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:17 [tests/selinux] pr775-checkpolicy-revdeps: policycoreutils/semanage-login: test range of added login Petr Lautrbach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox