From 6a7df58b3df1e210e69ef18065d23e8ba8ee43b7 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Sat, 26 May 2018 15:04:57 -0400 Subject: [PATCH] PolicyCapability: Use newly exported sepol_polcap_getname() function in libsepol 2.8. --- .travis.yml | 2 +- README.md | 2 +- setools/policyrep/polcap.pxi | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index b4d8c11..1c4d617 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ before_install: - sudo apt-get update -qq install: - - SELINUX_USERSPACE_VERSION=libsepol-2.7 + - SELINUX_USERSPACE_VERSION=libsepol-2.8 # Download current SELinux userspace tools and libraries - git clone https://github.com/SELinuxProject/selinux.git selinux-src -b ${SELINUX_USERSPACE_VERSION} diff --git a/README.md b/README.md index eee08ab..aaf6235 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ To run SETools command line tools, the following packages are required: * NetworkX 2.0+ * setuptools * libselinux -* libsepol 2.7+ +* libsepol 2.8+ To run SETools graphical tools, the following packages are also required: * PyQt5 diff --git a/setools/policyrep/polcap.pxi b/setools/policyrep/polcap.pxi index fdcf331..9abde8a 100644 --- a/setools/policyrep/polcap.pxi +++ b/setools/policyrep/polcap.pxi @@ -18,9 +18,6 @@ # . # -POLCAP_NAMES = ("network_peer_controls", "open_perms", "extended_socket_class", - "always_check_network", "cgroup_seclabel", "nnp_nosuid_transition") - cdef class PolicyCapability(PolicySymbol): @@ -33,7 +30,7 @@ cdef class PolicyCapability(PolicySymbol): """Factory function for creating PolicyCapability objects.""" r = PolicyCapability() r.policy = policy - r.name = POLCAP_NAMES[bit] + r.name = intern(sepol.sepol_polcap_getname(bit)) return r def __str__(self):