1 #define COMMON_FILE_SOCK_PERMS "ioctl", "read", "write", "create", \
2 "getattr", "setattr", "lock", "relabelfrom", "relabelto", "append"
4 #define COMMON_FILE_PERMS COMMON_FILE_SOCK_PERMS, "unlink", "link", \
5 "rename", "execute", "quotaon", "mounton", "audit_access", \
8 #define COMMON_SOCK_PERMS COMMON_FILE_SOCK_PERMS, "bind", "connect", \
9 "listen", "accept", "getopt", "setopt", "shutdown", "recvfrom", \
12 #define COMMON_IPC_PERMS "create", "destroy", "getattr", "setattr", "read", \
13 "write", "associate", "unix_read", "unix_write"
16 * Note: The name for any socket class should be suffixed by "socket",
17 * and doesn't contain more than one substr of "socket".
19 struct security_class_mapping secclass_map[] = {
21 { "compute_av", "compute_create", "compute_member",
22 "check_context", "load_policy", "compute_relabel",
23 "compute_user", "setenforce", "setbool", "setsecparam",
24 "setcheckreqprot", "read_policy", NULL } },
26 { "fork", "transition", "sigchld", "sigkill",
27 "sigstop", "signull", "signal", "ptrace", "getsched", "setsched",
28 "getsession", "getpgid", "setpgid", "getcap", "setcap", "share",
29 "getattr", "setexec", "setfscreate", "noatsecure", "siginh",
30 "setrlimit", "rlimitinh", "dyntransition", "setcurrent",
31 "execmem", "execstack", "execheap", "setkeycreate",
32 "setsockcreate", NULL } },
34 { "ipc_info", "syslog_read", "syslog_mod",
35 "syslog_console", "module_request", NULL } },
37 { "chown", "dac_override", "dac_read_search",
38 "fowner", "fsetid", "kill", "setgid", "setuid", "setpcap",
39 "linux_immutable", "net_bind_service", "net_broadcast",
40 "net_admin", "net_raw", "ipc_lock", "ipc_owner", "sys_module",
41 "sys_rawio", "sys_chroot", "sys_ptrace", "sys_pacct", "sys_admin",
42 "sys_boot", "sys_nice", "sys_resource", "sys_time",
43 "sys_tty_config", "mknod", "lease", "audit_write",
44 "audit_control", "setfcap", NULL } },
46 { "mount", "remount", "unmount", "getattr",
47 "relabelfrom", "relabelto", "associate", "quotamod",
51 "execute_no_trans", "entrypoint", NULL } },
53 { COMMON_FILE_PERMS, "add_name", "remove_name",
54 "reparent", "search", "rmdir", NULL } },
55 { "fd", { "use", NULL } },
57 { COMMON_FILE_PERMS, NULL } },
59 { COMMON_FILE_PERMS, NULL } },
61 { COMMON_FILE_PERMS, NULL } },
63 { COMMON_FILE_PERMS, NULL } },
65 { COMMON_FILE_PERMS, NULL } },
67 { COMMON_SOCK_PERMS, NULL } },
70 "node_bind", "name_connect",
74 "node_bind", NULL } },
77 "node_bind", NULL } },
79 { "recvfrom", "sendto", NULL } },
81 { "ingress", "egress", NULL } },
83 { COMMON_SOCK_PERMS, NULL } },
85 { COMMON_SOCK_PERMS, NULL } },
87 { COMMON_SOCK_PERMS, NULL } },
88 { "unix_stream_socket",
89 { COMMON_SOCK_PERMS, "connectto", NULL } },
90 { "unix_dgram_socket",
91 { COMMON_SOCK_PERMS, NULL } },
93 { COMMON_IPC_PERMS, NULL } },
94 { "msg", { "send", "receive", NULL } },
96 { COMMON_IPC_PERMS, "enqueue", NULL } },
98 { COMMON_IPC_PERMS, "lock", NULL } },
100 { COMMON_IPC_PERMS, NULL } },
101 { "netlink_route_socket",
103 "nlmsg_read", "nlmsg_write", NULL } },
104 { "netlink_tcpdiag_socket",
106 "nlmsg_read", "nlmsg_write", NULL } },
107 { "netlink_nflog_socket",
108 { COMMON_SOCK_PERMS, NULL } },
109 { "netlink_xfrm_socket",
111 "nlmsg_read", "nlmsg_write", NULL } },
112 { "netlink_selinux_socket",
113 { COMMON_SOCK_PERMS, NULL } },
114 { "netlink_iscsi_socket",
115 { COMMON_SOCK_PERMS, NULL } },
116 { "netlink_audit_socket",
118 "nlmsg_read", "nlmsg_write", "nlmsg_relay", "nlmsg_readpriv",
119 "nlmsg_tty_audit", NULL } },
120 { "netlink_fib_lookup_socket",
121 { COMMON_SOCK_PERMS, NULL } },
122 { "netlink_connector_socket",
123 { COMMON_SOCK_PERMS, NULL } },
124 { "netlink_netfilter_socket",
125 { COMMON_SOCK_PERMS, NULL } },
126 { "netlink_dnrt_socket",
127 { COMMON_SOCK_PERMS, NULL } },
129 { "sendto", "recvfrom", "setcontext", "polmatch", NULL } },
130 { "netlink_kobject_uevent_socket",
131 { COMMON_SOCK_PERMS, NULL } },
132 { "netlink_generic_socket",
133 { COMMON_SOCK_PERMS, NULL } },
134 { "netlink_scsitransport_socket",
135 { COMMON_SOCK_PERMS, NULL } },
136 { "netlink_rdma_socket",
137 { COMMON_SOCK_PERMS, NULL } },
138 { "netlink_crypto_socket",
139 { COMMON_SOCK_PERMS, NULL } },
140 { "appletalk_socket",
141 { COMMON_SOCK_PERMS, NULL } },
143 { "send", "recv", "relabelto", "forward_in", "forward_out", NULL } },
145 { "view", "read", "write", "search", "link", "setattr", "create",
149 "node_bind", "name_connect", NULL } },
150 { "memprotect", { "mmap_zero", NULL } },
151 { "peer", { "recv", NULL } },
153 { "mac_override", "mac_admin", "syslog", "wake_alarm", "block_suspend",
154 "audit_read", NULL } },
155 { "kernel_service", { "use_as_override", "create_files_as", NULL } },
157 { COMMON_SOCK_PERMS, "attach_queue", NULL } },
158 { "binder", { "impersonate", "call", "set_context_mgr", "transfer",