aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorStephen Smalley <sds@tycho.nsa.gov>2015-06-04 16:22:17 -0400
committerPaul Moore <pmoore@redhat.com>2015-06-04 16:22:17 -0400
commit42a9699a9fa179c0054ea3cf5ad3cc67104a6162 (patch)
tree051b8495510c6e68dc8c10445673aed319df3c03 /security
parent8e01472078763ebc1eaea089a1adab75dd982ccd (diff)
selinux: Remove unused permission definitions
Remove unused permission definitions from SELinux. Many of these were only ever used in pre-mainline versions of SELinux, prior to Linux 2.6.0. Some of them were used in the legacy network or compat_net=1 checks that were disabled by default in Linux 2.6.18 and fully removed in Linux 2.6.30. Permissions never used in mainline Linux: file swapon filesystem transition tcp_socket { connectto newconn acceptfrom } node enforce_dest unix_stream_socket { newconn acceptfrom } Legacy network checks, removed in 2.6.30: socket { recv_msg send_msg } node { tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send dccp_recv dccp_send } netif { tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send dccp_recv dccp_send } Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/include/classmap.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h
index 1d8b924cc134..5a4eef59aeff 100644
--- a/security/selinux/include/classmap.h
+++ b/security/selinux/include/classmap.h
@@ -2,12 +2,12 @@
2 "getattr", "setattr", "lock", "relabelfrom", "relabelto", "append" 2 "getattr", "setattr", "lock", "relabelfrom", "relabelto", "append"
3 3
4#define COMMON_FILE_PERMS COMMON_FILE_SOCK_PERMS, "unlink", "link", \ 4#define COMMON_FILE_PERMS COMMON_FILE_SOCK_PERMS, "unlink", "link", \
5 "rename", "execute", "swapon", "quotaon", "mounton", "audit_access", \ 5 "rename", "execute", "quotaon", "mounton", "audit_access", \
6 "open", "execmod" 6 "open", "execmod"
7 7
8#define COMMON_SOCK_PERMS COMMON_FILE_SOCK_PERMS, "bind", "connect", \ 8#define COMMON_SOCK_PERMS COMMON_FILE_SOCK_PERMS, "bind", "connect", \
9 "listen", "accept", "getopt", "setopt", "shutdown", "recvfrom", \ 9 "listen", "accept", "getopt", "setopt", "shutdown", "recvfrom", \
10 "sendto", "recv_msg", "send_msg", "name_bind" 10 "sendto", "name_bind"
11 11
12#define COMMON_IPC_PERMS "create", "destroy", "getattr", "setattr", "read", \ 12#define COMMON_IPC_PERMS "create", "destroy", "getattr", "setattr", "read", \
13 "write", "associate", "unix_read", "unix_write" 13 "write", "associate", "unix_read", "unix_write"
@@ -44,7 +44,7 @@ struct security_class_mapping secclass_map[] = {
44 "audit_control", "setfcap", NULL } }, 44 "audit_control", "setfcap", NULL } },
45 { "filesystem", 45 { "filesystem",
46 { "mount", "remount", "unmount", "getattr", 46 { "mount", "remount", "unmount", "getattr",
47 "relabelfrom", "relabelto", "transition", "associate", "quotamod", 47 "relabelfrom", "relabelto", "associate", "quotamod",
48 "quotaget", NULL } }, 48 "quotaget", NULL } },
49 { "file", 49 { "file",
50 { COMMON_FILE_PERMS, 50 { COMMON_FILE_PERMS,
@@ -67,7 +67,7 @@ struct security_class_mapping secclass_map[] = {
67 { COMMON_SOCK_PERMS, NULL } }, 67 { COMMON_SOCK_PERMS, NULL } },
68 { "tcp_socket", 68 { "tcp_socket",
69 { COMMON_SOCK_PERMS, 69 { COMMON_SOCK_PERMS,
70 "connectto", "newconn", "acceptfrom", "node_bind", "name_connect", 70 "node_bind", "name_connect",
71 NULL } }, 71 NULL } },
72 { "udp_socket", 72 { "udp_socket",
73 { COMMON_SOCK_PERMS, 73 { COMMON_SOCK_PERMS,
@@ -76,13 +76,9 @@ struct security_class_mapping secclass_map[] = {
76 { COMMON_SOCK_PERMS, 76 { COMMON_SOCK_PERMS,
77 "node_bind", NULL } }, 77 "node_bind", NULL } },
78 { "node", 78 { "node",
79 { "tcp_recv", "tcp_send", "udp_recv", "udp_send", 79 { "recvfrom", "sendto", NULL } },
80 "rawip_recv", "rawip_send", "enforce_dest",
81 "dccp_recv", "dccp_send", "recvfrom", "sendto", NULL } },
82 { "netif", 80 { "netif",
83 { "tcp_recv", "tcp_send", "udp_recv", "udp_send", 81 { "ingress", "egress", NULL } },
84 "rawip_recv", "rawip_send", "dccp_recv", "dccp_send",
85 "ingress", "egress", NULL } },
86 { "netlink_socket", 82 { "netlink_socket",
87 { COMMON_SOCK_PERMS, NULL } }, 83 { COMMON_SOCK_PERMS, NULL } },
88 { "packet_socket", 84 { "packet_socket",
@@ -90,11 +86,9 @@ struct security_class_mapping secclass_map[] = {
90 { "key_socket", 86 { "key_socket",
91 { COMMON_SOCK_PERMS, NULL } }, 87 { COMMON_SOCK_PERMS, NULL } },
92 { "unix_stream_socket", 88 { "unix_stream_socket",
93 { COMMON_SOCK_PERMS, "connectto", "newconn", "acceptfrom", NULL 89 { COMMON_SOCK_PERMS, "connectto", NULL } },
94 } },
95 { "unix_dgram_socket", 90 { "unix_dgram_socket",
96 { COMMON_SOCK_PERMS, NULL 91 { COMMON_SOCK_PERMS, NULL } },
97 } },
98 { "sem", 92 { "sem",
99 { COMMON_IPC_PERMS, NULL } }, 93 { COMMON_IPC_PERMS, NULL } },
100 { "msg", { "send", "receive", NULL } }, 94 { "msg", { "send", "receive", NULL } },