selinux-testsuite: fix tun_tap checks
PATCH 1/1 selinux-testsuite: fix tun_tap checks
The attach_queue permission was introduced later than the tun_socket class itself. So check for that instead of the class, since the policy fails to build without it.
Fixes 4e0f6d5a52d2 ("selinux-testsuite: Add TUN/TAP driver tests")
Signed-off-by Ondrej Mosnacek <[email protected]>
--- policy/Makefile | 2 +- tests/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
policy/Makefile +1 -1
@@ -101,7 +101,7 @@ ifeq ($(shell grep -q module_load $(POLDEV)/include/support/all_perms.spt && ech TARGETS+=test_module_load.te endif -ifeq ($(shell grep -q tun_socket $(POLDEV)/include/support/all_perms.spt && echo true),true) +ifeq ($(shell grep -q attach_queue $(POLDEV)/include/support/all_perms.spt && echo true),true) TARGETS += test_tun_tap.te endif
tests/Makefile +1 -1
@@ -79,7 +79,7 @@ SUBDIRS+=module_load endif endif -ifeq ($(shell grep -q tun_socket $(POLDEV)/include/support/all_perms.spt && echo true),true) +ifeq ($(shell grep -q attach_queue $(POLDEV)/include/support/all_perms.spt && echo true),true) SUBDIRS += tun_tap endif
Signature · 1 line
2.23.0
Quoted 6 lines · Ondrej Mosnacek
The
attach_queuepermission was introduced later than thetun_socketclass itself. So check for that instead of the class, since the policy fails to build without it.Fixes 4e0f6d5a52d2 ("selinux-testsuite: Add TUN/TAP driver tests")Signed-off-by Ondrej Mosnacek <[email protected]>
Acked-by Stephen Smalley <[email protected]>
Quoted 32 lines
--- policy/Makefile | 2 +- tests/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)policy/Makefile +1
-1@@ -101,7 +101,7 @@ ifeq ($(shell grep -q module_load $(POLDEV)/include/support/all_perms.spt && ech TARGETS+=test_module_load.te endif -ifeq ($(shell grep -q tun_socket $(POLDEV)/include/support/all_perms.spt && echo true),true) +ifeq ($(shell grep -q attach_queue $(POLDEV)/include/support/all_perms.spt && echo true),true) TARGETS += test_tun_tap.te endiftests/Makefile +1
-1@@ -79,7 +79,7 @@ SUBDIRS+=module_load endif endif -ifeq ($(shell grep -q tun_socket $(POLDEV)/include/support/all_perms.spt && echo true),true) +ifeq ($(shell grep -q attach_queue $(POLDEV)/include/support/all_perms.spt && echo true),true) SUBDIRS += tun_tap endif
Stephen Smalley
AppliedQuoted 6 lines · Ondrej Mosnacek
The
attach_queuepermission was introduced later than thetun_socketclass itself. So check for that instead of the class, since the policy fails to build without it.Fixes 4e0f6d5a52d2 ("selinux-testsuite: Add TUN/TAP driver tests")Signed-off-by Ondrej Mosnacek <[email protected]>
Thanks, applied.
Quoted 32 lines
--- policy/Makefile | 2 +- tests/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)policy/Makefile +1
-1@@ -101,7 +101,7 @@ ifeq ($(shell grep -q module_load $(POLDEV)/include/support/all_perms.spt && ech TARGETS+=test_module_load.te endif -ifeq ($(shell grep -q tun_socket $(POLDEV)/include/support/all_perms.spt && echo true),true) +ifeq ($(shell grep -q attach_queue $(POLDEV)/include/support/all_perms.spt && echo true),true) TARGETS += test_tun_tap.te endiftests/Makefile +1
-1@@ -79,7 +79,7 @@ SUBDIRS+=module_load endif endif -ifeq ($(shell grep -q tun_socket $(POLDEV)/include/support/all_perms.spt && echo true),true) +ifeq ($(shell grep -q attach_queue $(POLDEV)/include/support/all_perms.spt && echo true),true) SUBDIRS += tun_tap endif