policy: check for module_request support for key_socket
PATCH v2 1/1 policy: check for module_request support for key_socket
E.g. RHEL-5 has key_socket class in the policy, but not the system::module_request permission.
Signed-off-by Ondrej Mosnacek <[email protected]>
--- policy/Makefile | 2 ++ tests/Makefile | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-)
Change in v2: update also tests/Makefile for consistency
policy/Makefile +2 -0
@@ -94,8 +94,10 @@ TARGETS+=test_notify.te endif ifeq ($(shell grep -q key_socket $(POLDEV)/include/support/all_perms.spt && echo true),true) +ifeq ($(shell grep -q module_request $(POLDEV)/include/support/all_perms.spt && echo true),true) TARGETS += test_key_socket.te endif +endif ifeq (x$(DISTRO),$(filter x$(DISTRO),xRHEL4 xRHEL5 xRHEL6)) TARGETS:=$(filter-out test_overlayfs.te test_mqueue.te test_ibpkey.te, $(TARGETS))
tests/Makefile +5 -1
@@ -52,9 +52,13 @@ ifeq ($(shell grep -q all_key_perms $(POLDEV)/include/support/all_perms.spt && e SUBDIRS += keys endif -ifeq ($(shell grep -q key_socket $(POLDEV)/include/support/all_perms.spt && test -e $(INCLUDEDIR)/keyutils.h && echo true),true) +ifeq ($(shell grep -q key_socket $(POLDEV)/include/support/all_perms.spt && echo true),true) +ifeq ($(shell grep -q module_request $(POLDEV)/include/support/all_perms.spt && echo true),true) +ifeq ($(shell test -e $(INCLUDEDIR)/keyutils.h && echo true),true) SUBDIRS += key_socket endif +endif +endif ifeq ($(shell grep "^SELINUX_INFINIBAND_ENDPORT_TEST=" infiniband_endport/ibendport_test.conf | cut -d'=' -f 2),1) SUBDIRS += infiniband_endport
Signature · 1 line
2.23.0