public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: Can libsepol handle users declared in modules?
@ 2026-09-11 13:20 Petr Lautrbach
0 siblings, 0 replies; only message in thread
From: Petr Lautrbach @ 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 : 31f776e00a01428b7808357eef2347f1fa43028d
Author : Petr Lautrbach <plautrba@redhat.com>
Date : 2022-10-21T15:33:30+02:00
Stats : +49/-0 in 3 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/31f776e00a01428b7808357eef2347f1fa43028d?branch=pr775-checkpolicy-revdeps
Log:
Can libsepol handle users declared in modules?
https://bugzilla.redhat.com/show_bug.cgi?id=2136212
---
diff --git a/libsepol/user-declaration-in-module/foo.te b/libsepol/user-declaration-in-module/foo.te
new file mode 100644
index 0000000..74ee9c9
--- /dev/null
+++ b/libsepol/user-declaration-in-module/foo.te
@@ -0,0 +1,8 @@
+module foo 0.0.1;
+require {
+ role staff_r;
+ sensitivity s0;
+ category c0;
+ category c1023;
+}
+user foo_u roles staff_r level s0 range s0 - s0:c0.c1023;
diff --git a/libsepol/user-declaration-in-module/main.fmf b/libsepol/user-declaration-in-module/main.fmf
new file mode 100644
index 0000000..73aad74
--- /dev/null
+++ b/libsepol/user-declaration-in-module/main.fmf
@@ -0,0 +1,12 @@
+summary: Can libsepol handle users declared in modules?
+test: ./test.sh
+framework: beakerlib
+component:
+ - libsepol
+require:
+ - libsepol-devel
+ - selinux-policy-devel
+tier: 1
+enabled: true
+link:
+ - https://bugzilla.redhat.com/show_bug.cgi?id=2136212
diff --git a/libsepol/user-declaration-in-module/test.sh b/libsepol/user-declaration-in-module/test.sh
new file mode 100755
index 0000000..90ab796
--- /dev/null
+++ b/libsepol/user-declaration-in-module/test.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# SPDX-License-Identifier: GPLv2
+# Copyright (c) 2022 Red Hat, Inc.
+# Author: Petr Lautrbach <plautrba@redhat.com>
+
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+rlJournalStart
+ rlPhaseStartSetup
+ rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
+ rlRun "cp foo.te $tmp"
+ rlRun "pushd $tmp"
+ rlRun "set -o pipefail"
+ rlAssertRpm "libsepol"
+ rlAssertRpm "selinux-policy-devel"
+ rlPhaseEnd
+
+ rlPhaseStartTest
+ rlRun "make -f /usr/share/selinux/devel/Makefile foo.pp" 0 "Build a module with user declaration"
+ rlRun "semodule -i foo.pp" 0
+ rlPhaseEnd
+
+ rlPhaseStartCleanup
+ rlRun "semodule -r foo" 0
+ rlRun "popd"
+ rlRun "rm -r $tmp" 0 "Remove tmp directory"
+ rlPhaseEnd
+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: Can libsepol handle users declared in modules? Petr Lautrbach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox