Skip to contentSkip to conversation

selinux: drop unused packet flow permissions

PATCH In review Eric Paris 3 participants 3 messages Feb 23, 2011 SELinux security module

lore
Share & tools
lore

Eric Paris

author
#0 lore raw

PATCH 1/1 selinux: drop unused packet flow permissions

These permissions are not used and can be dropped in the kernel definitions.

---

 security/selinux/include/classmap.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
security/selinux/include/classmap.h +1 -2
index e9a8eb7..fffd855 100644
@@ -132,8 +132,7 @@ struct security_class_mapping secclass_map[] = {
 	{ "appletalk_socket",
 	  { COMMON_SOCK_PERMS, NULL } },
 	{ "packet",
-	  { "send", "recv", "relabelto", "flow_in", "flow_out",
-	    "forward_in", "forward_out", NULL } },
+	  { "send", "recv", "relabelto", "forward_in", "forward_out", NULL } },
 	{ "key",
 	  { "view", "read", "write", "search", "link", "setattr", "create",
 	    NULL } },

--
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.

#1 lore raw
Quoted 15 lines · Eric Paris

These permissions are not used and can be dropped in the kernel definitions.

---

 security/selinux/include/classmap.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
security/selinux/include/classmap.h +0 -0
index e9a8eb7..fffd855 100644

security/selinux/include/classmap.h struct security_class_mapping secclass_map[] = { · line 138

Quoted 9 lines
security/selinux/include/classmap.h +1 -2
@@ -132,8 +132,7 @@ struct security_class_mapping secclass_map[] = {
 	{ "appletalk_socket",
 	  { COMMON_SOCK_PERMS, NULL } },
 	{ "packet",
-	  { "send", "recv", "relabelto", "flow_in", "flow_out",
-	    "forward_in", "forward_out", NULL } },
+	  { "send", "recv", "relabelto", "forward_in", "forward_out", NULL } },
 	{ "key",
 	  { "view", "read", "write", "search", "link", "setattr", "create",
 	    NULL } },

I'm concerned about this. Won't this break refpolicy? I can't keep two sets of object class definitions around for systems that still have the flow_in and flow_out perms.

Signature · 8 lines
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

--
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.
#2 lore raw
Quoted 21 lines · Christopher J. PeBenito
Quoted 20 lines · Eric Paris

These permissions are not used and can be dropped in the kernel definitions.

---

 security/selinux/include/classmap.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
security/selinux/include/classmap.h +0 -2
index e9a8eb7..fffd855 100644
@@ -132,8 +132,7 @@ struct security_class_mapping secclass_map[] = {
 	{ "appletalk_socket",
 	  { COMMON_SOCK_PERMS, NULL } },
 	{ "packet",
-	  { "send", "recv", "relabelto", "flow_in", "flow_out",
-	    "forward_in", "forward_out", NULL } },
Quoted 8 lines

security/selinux/include/classmap.h struct security_class_mapping secclass_map[] = { · line 138

Quoted 4 lines
security/selinux/include/classmap.h +1 -0
+	  { "send", "recv", "relabelto", "forward_in", "forward_out", NULL } },
 	{ "key",
 	  { "view", "read", "write", "search", "link", "setattr", "create",
 	    NULL } },

I'm concerned about this. Won't this break refpolicy? I can't keep two sets of object class definitions around for systems that still have the flow_in and flow_out perms.

This just removes the entries in the kernel table so that the kernel does not try to look up these permission strings in the policy. As the kernel is now dynamically mapping class/perm values, we don't need to keep placeholders in its tables for obsolete permissions that are not in use within the kernel (no hook function in the current kernel uses these permissions). But we will keep the definitions in refpolicy for older kernels that predate the dynamic class/perm mappings.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
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.