public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] ima_selinux: Fix requirements
@ 2025-12-08 14:13 Petr Vorel
  2025-12-16  9:55 ` Andrea Cervesato via ltp
  2025-12-17 14:07 ` Petr Vorel
  0 siblings, 2 replies; 3+ messages in thread
From: Petr Vorel @ 2025-12-08 14:13 UTC (permalink / raw)
  To: ltp; +Cc: selinux, linux-integrity

"measure func=CRITICAL_DATA label=selinux" in selinux.policy LTP example
policy is a subset of "measure func=CRITICAL_DATA" loaded by
ima_policy=critical_data kernel command line option.

Therefore ima_selinux.sh require only one of them, not both.

Reported-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Thanks Mimi!

Kind regards,
Petr

 testcases/kernel/security/integrity/ima/tests/ima_selinux.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/testcases/kernel/security/integrity/ima/tests/ima_selinux.sh b/testcases/kernel/security/integrity/ima/tests/ima_selinux.sh
index 1a0de21efd..e64a7739f9 100755
--- a/testcases/kernel/security/integrity/ima/tests/ima_selinux.sh
+++ b/testcases/kernel/security/integrity/ima/tests/ima_selinux.sh
@@ -18,13 +18,12 @@ TST_SETUP="setup"
 TST_MIN_KVER="5.12"
 
 REQUIRED_POLICY_CONTENT='selinux.policy'
+REQUIRED_BUILTIN_POLICY='critical_data'
 
 setup()
 {
 	SELINUX_DIR=$(tst_get_selinux_dir)
 	[ "$SELINUX_DIR" ] || tst_brk TCONF "SELinux is not enabled"
-
-	require_ima_policy_cmdline "critical_data"
 }
 
 # Format of the measured SELinux state data.
-- 
2.51.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-17 14:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-08 14:13 [LTP] [PATCH] ima_selinux: Fix requirements Petr Vorel
2025-12-16  9:55 ` Andrea Cervesato via ltp
2025-12-17 14:07 ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox