diff mbox series

selinux testsuite: Do not build SCTP unless kernel support

Message ID 20190411123103.23485-1-richard_c_haines@btinternet.com (mailing list archive)
State Accepted
Headers show
Series selinux testsuite: Do not build SCTP unless kernel support | expand

Commit Message

Richard Haines April 11, 2019, 12:31 p.m. UTC
Do not build/run SCTP tests unless the kernel is 4.20.17 or
greater as they support SELinux SCTP.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
---
 tests/Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Paul Moore April 17, 2019, 4:01 p.m. UTC | #1
On Thu, Apr 11, 2019 at 8:31 AM Richard Haines
<richard_c_haines@btinternet.com> wrote:
>
> Do not build/run SCTP tests unless the kernel is 4.20.17 or
> greater as they support SELinux SCTP.
>
> Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
> ---
>  tests/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/Makefile b/tests/Makefile
> index fb6de5c..1bd643e 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -24,8 +24,10 @@ SUBDIRS += extended_socket_class
>  endif
>
>  ifeq ($(shell grep -q corenet_sctp_bind_all_nodes $(POLDEV)/include/kernel/corenetwork.if && grep -q 1 /sys/fs/selinux/policy_capabilities/extended_socket_class && echo true),true)
> +ifneq ($(shell ./kvercmp $$(uname -r) 4.20.17),-1)

Technically we shipped the SELinux/SCTP support before v4.20.17, but
v4.20 does have some important fixes so I think this is okay.

Merged, thanks.

>  SUBDIRS += sctp
>  endif
> +endif
>
>  ifeq ($(shell grep -q netlink_iscsi_socket $(POLDEV)/include/support/all_perms.spt && echo true),true)
>  SUBDIRS += netlink_socket
> --
> 2.20.1
diff mbox series

Patch

diff --git a/tests/Makefile b/tests/Makefile
index fb6de5c..1bd643e 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -24,8 +24,10 @@  SUBDIRS += extended_socket_class
 endif
 
 ifeq ($(shell grep -q corenet_sctp_bind_all_nodes $(POLDEV)/include/kernel/corenetwork.if && grep -q 1 /sys/fs/selinux/policy_capabilities/extended_socket_class && echo true),true)
+ifneq ($(shell ./kvercmp $$(uname -r) 4.20.17),-1)
 SUBDIRS += sctp
 endif
+endif
 
 ifeq ($(shell grep -q netlink_iscsi_socket $(POLDEV)/include/support/all_perms.spt && echo true),true)
 SUBDIRS += netlink_socket