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", "swapon", "quotaon", "mounton"
7 #define COMMON_SOCK_PERMS COMMON_FILE_SOCK_PERMS, "bind", "connect", \
8 "listen", "accept", "getopt", "setopt", "shutdown", "recvfrom", \
9 "sendto", "recv_msg", "send_msg", "name_bind"
11 #define COMMON_IPC_PERMS "create", "destroy", "getattr", "setattr", "read", \
12 "write", "associate", "unix_read", "unix_write"
14 struct security_class_mapping secclass_map
[] = {
16 { "compute_av", "compute_create", "compute_member",
17 "check_context", "load_policy", "compute_relabel",
18 "compute_user", "setenforce", "setbool", "setsecparam",
19 "setcheckreqprot", NULL
} },
21 { "fork", "transition", "sigchld", "sigkill",
22 "sigstop", "signull", "signal", "ptrace", "getsched", "setsched",
23 "getsession", "getpgid", "setpgid", "getcap", "setcap", "share",
24 "getattr", "setexec", "setfscreate", "noatsecure", "siginh",
25 "setrlimit", "rlimitinh", "dyntransition", "setcurrent",
26 "execmem", "execstack", "execheap", "setkeycreate",
27 "setsockcreate", NULL
} },
29 { "ipc_info", "syslog_read", "syslog_mod",
30 "syslog_console", "module_request", NULL
} },
32 { "chown", "dac_override", "dac_read_search",
33 "fowner", "fsetid", "kill", "setgid", "setuid", "setpcap",
34 "linux_immutable", "net_bind_service", "net_broadcast",
35 "net_admin", "net_raw", "ipc_lock", "ipc_owner", "sys_module",
36 "sys_rawio", "sys_chroot", "sys_ptrace", "sys_pacct", "sys_admin",
37 "sys_boot", "sys_nice", "sys_resource", "sys_time",
38 "sys_tty_config", "mknod", "lease", "audit_write",
39 "audit_control", "setfcap", NULL
} },
41 { "mount", "remount", "unmount", "getattr",
42 "relabelfrom", "relabelto", "transition", "associate", "quotamod",
46 "execute_no_trans", "entrypoint", "execmod", "open", NULL
} },
48 { COMMON_FILE_PERMS
, "add_name", "remove_name",
49 "reparent", "search", "rmdir", "open", NULL
} },
50 { "fd", { "use", NULL
} },
52 { COMMON_FILE_PERMS
, NULL
} },
55 "execute_no_trans", "entrypoint", "execmod", "open", NULL
} },
57 { COMMON_FILE_PERMS
, "open", NULL
} },
59 { COMMON_FILE_PERMS
, "open", NULL
} },
61 { COMMON_FILE_PERMS
, "open", NULL
} },
63 { COMMON_SOCK_PERMS
, NULL
} },
66 "connectto", "newconn", "acceptfrom", "node_bind", "name_connect",
70 "node_bind", NULL
} },
73 "node_bind", NULL
} },
75 { "tcp_recv", "tcp_send", "udp_recv", "udp_send",
76 "rawip_recv", "rawip_send", "enforce_dest",
77 "dccp_recv", "dccp_send", "recvfrom", "sendto", NULL
} },
79 { "tcp_recv", "tcp_send", "udp_recv", "udp_send",
80 "rawip_recv", "rawip_send", "dccp_recv", "dccp_send",
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", "newconn", "acceptfrom", NULL
91 { "unix_dgram_socket",
92 { COMMON_SOCK_PERMS
, NULL
95 { COMMON_IPC_PERMS
, NULL
} },
96 { "msg", { "send", "receive", NULL
} },
98 { COMMON_IPC_PERMS
, "enqueue", NULL
} },
100 { COMMON_IPC_PERMS
, "lock", NULL
} },
102 { COMMON_IPC_PERMS
, NULL
} },
103 { "netlink_route_socket",
105 "nlmsg_read", "nlmsg_write", NULL
} },
106 { "netlink_firewall_socket",
108 "nlmsg_read", "nlmsg_write", NULL
} },
109 { "netlink_tcpdiag_socket",
111 "nlmsg_read", "nlmsg_write", NULL
} },
112 { "netlink_nflog_socket",
113 { COMMON_SOCK_PERMS
, NULL
} },
114 { "netlink_xfrm_socket",
116 "nlmsg_read", "nlmsg_write", NULL
} },
117 { "netlink_selinux_socket",
118 { COMMON_SOCK_PERMS
, NULL
} },
119 { "netlink_audit_socket",
121 "nlmsg_read", "nlmsg_write", "nlmsg_relay", "nlmsg_readpriv",
122 "nlmsg_tty_audit", NULL
} },
123 { "netlink_ip6fw_socket",
125 "nlmsg_read", "nlmsg_write", 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 { "appletalk_socket",
133 { COMMON_SOCK_PERMS
, NULL
} },
135 { "send", "recv", "relabelto", "flow_in", "flow_out",
136 "forward_in", "forward_out", NULL
} },
138 { "view", "read", "write", "search", "link", "setattr", "create",
142 "node_bind", "name_connect", NULL
} },
143 { "memprotect", { "mmap_zero", NULL
} },
144 { "peer", { "recv", NULL
} },
145 { "capability2", { "mac_override", "mac_admin", NULL
} },
146 { "kernel_service", { "use_as_override", "create_files_as", NULL
} },
148 { COMMON_SOCK_PERMS
, NULL
} },