Skip to contentSkip to conversation

selinux-testsuite: add lockdown tests

RFC PATCH Superseded Stephen Smalley 1 participant 1 message Nov 27, 2019 SELinux security module

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH v3 1/1 selinux-testsuite: add lockdown tests

Test all permissions associated with the lockdown class.

---
v3 fixes a mismerge that broke v2 build.

 policy/Makefile         |  4 +++
 policy/test_lockdown.te | 54 +++++++++++++++++++++++++++++++++++++++++
 tests/Makefile          |  4 +++
 tests/lockdown/Makefile |  2 ++
 tests/lockdown/test     | 42 ++++++++++++++++++++++++++++++++
 5 files changed, 106 insertions(+)
 create mode 100644 policy/test_lockdown.te
 create mode 100644 tests/lockdown/Makefile
 create mode 100755 tests/lockdown/test
policy/Makefile +4 -0
index 87b2856ae1ca..dc637793aa86 100644
@@ -101,6 +101,10 @@ ifeq ($(shell grep -q module_load $(POLDEV)/include/support/all_perms.spt && ech
 TARGETS+=test_module_load.te
 endif
 
+ifeq ($(shell grep -q lockdown $(POLDEV)/include/support/all_perms.spt && echo true),true)
+TARGETS += test_lockdown.te
+endif
+
 ifeq (x$(DISTRO),$(filter x$(DISTRO),xRHEL4 xRHEL5 xRHEL6))
 TARGETS:=$(filter-out test_overlayfs.te test_mqueue.te test_ibpkey.te, $(TARGETS))
 endif
policy/test_lockdown.te new file +54 -0

54 lines not on this page · raw message

tests/Makefile +4 -0
index 1cdb1ac33875..096bbb472c51 100644
@@ -78,6 +78,10 @@ SUBDIRS+=module_load
 endif
 endif
 
+ifeq ($(shell grep -q lockdown $(POLDEV)/include/support/all_perms.spt && echo true),true)
+SUBDIRS += lockdown
+endif
+
 ifeq ($(DISTRO),RHEL4)
     SUBDIRS:=$(filter-out bounds dyntrace dyntrans inet_socket mmap nnp_nosuid overlay unix_socket, $(SUBDIRS))
 endif
tests/lockdown/Makefile new file +2 -0
new file mode 100644
index 000000000000..e7c006f270c5
@@ -0,0 +1,2 @@
+all:
+clean:
tests/lockdown/test new file +42 -0

42 lines not on this page · raw message

Signature · 1 line
2.23.0