Skip to contentSkip to conversation

libsepol: Add always_check_packets policy capability

PATCH New Chris PeBenito 1 participant 1 message May 30, 2012 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libsepol: Add always_check_packets policy capability

Currently the packet class in SELinux is not checked if there are no SECMARK rules in the security or mangle netfilter tables. Some systems prefer that packets are always checked, for example, to protect the system should the netfilter rules fail to load or if the nefilter rules were maliciously flushed.

Add the always_check_packets policy capability which, when enabled, treats SECMARK as enabled, even if there are no netfilter SECMARK rules.

---
 libsepol/include/sepol/policydb/polcaps.h |    1 +
 libsepol/src/polcaps.c                    |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
libsepol/include/sepol/policydb/polcaps.h +1 -0
index 40c0a48..c4a05c6 100644
@@ -5,6 +5,7 @@
 enum {
 	POLICYDB_CAPABILITY_NETPEER,
 	POLICYDB_CAPABILITY_OPENPERM,
+	POLICYDB_CAPABILITY_ALWAYSPACKET,
 	__POLICYDB_CAPABILITY_MAX
 };
 #define POLICYDB_CAPABILITY_MAX (__POLICYDB_CAPABILITY_MAX - 1)
libsepol/src/polcaps.c +1 -0
index 71970b1..2667081 100644
@@ -8,6 +8,7 @@
 static const char *polcap_names[] = {
 	"network_peer_controls",	/* POLICYDB_CAPABILITY_NETPEER */
 	"open_perms",			/* POLICYDB_CAPABILITY_OPENPERM */
+	"always_check_packets",		/* POLICYDB_CAPABILITY_ALWAYSPACKET */
 	NULL
 };
 
Signature · 7 lines
1.7.8.6


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.