Path: blob/master/security/selinux/include/classmap.h
10817 views
#define COMMON_FILE_SOCK_PERMS "ioctl", "read", "write", "create", \1"getattr", "setattr", "lock", "relabelfrom", "relabelto", "append"23#define COMMON_FILE_PERMS COMMON_FILE_SOCK_PERMS, "unlink", "link", \4"rename", "execute", "swapon", "quotaon", "mounton", "audit_access", \5"open", "execmod"67#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"1011#define COMMON_IPC_PERMS "create", "destroy", "getattr", "setattr", "read", \12"write", "associate", "unix_read", "unix_write"1314/*15* Note: The name for any socket class should be suffixed by "socket",16* and doesn't contain more than one substr of "socket".17*/18struct security_class_mapping secclass_map[] = {19{ "security",20{ "compute_av", "compute_create", "compute_member",21"check_context", "load_policy", "compute_relabel",22"compute_user", "setenforce", "setbool", "setsecparam",23"setcheckreqprot", "read_policy", NULL } },24{ "process",25{ "fork", "transition", "sigchld", "sigkill",26"sigstop", "signull", "signal", "ptrace", "getsched", "setsched",27"getsession", "getpgid", "setpgid", "getcap", "setcap", "share",28"getattr", "setexec", "setfscreate", "noatsecure", "siginh",29"setrlimit", "rlimitinh", "dyntransition", "setcurrent",30"execmem", "execstack", "execheap", "setkeycreate",31"setsockcreate", NULL } },32{ "system",33{ "ipc_info", "syslog_read", "syslog_mod",34"syslog_console", "module_request", NULL } },35{ "capability",36{ "chown", "dac_override", "dac_read_search",37"fowner", "fsetid", "kill", "setgid", "setuid", "setpcap",38"linux_immutable", "net_bind_service", "net_broadcast",39"net_admin", "net_raw", "ipc_lock", "ipc_owner", "sys_module",40"sys_rawio", "sys_chroot", "sys_ptrace", "sys_pacct", "sys_admin",41"sys_boot", "sys_nice", "sys_resource", "sys_time",42"sys_tty_config", "mknod", "lease", "audit_write",43"audit_control", "setfcap", NULL } },44{ "filesystem",45{ "mount", "remount", "unmount", "getattr",46"relabelfrom", "relabelto", "transition", "associate", "quotamod",47"quotaget", NULL } },48{ "file",49{ COMMON_FILE_PERMS,50"execute_no_trans", "entrypoint", NULL } },51{ "dir",52{ COMMON_FILE_PERMS, "add_name", "remove_name",53"reparent", "search", "rmdir", NULL } },54{ "fd", { "use", NULL } },55{ "lnk_file",56{ COMMON_FILE_PERMS, NULL } },57{ "chr_file",58{ COMMON_FILE_PERMS, NULL } },59{ "blk_file",60{ COMMON_FILE_PERMS, NULL } },61{ "sock_file",62{ COMMON_FILE_PERMS, NULL } },63{ "fifo_file",64{ COMMON_FILE_PERMS, NULL } },65{ "socket",66{ COMMON_SOCK_PERMS, NULL } },67{ "tcp_socket",68{ COMMON_SOCK_PERMS,69"connectto", "newconn", "acceptfrom", "node_bind", "name_connect",70NULL } },71{ "udp_socket",72{ COMMON_SOCK_PERMS,73"node_bind", NULL } },74{ "rawip_socket",75{ COMMON_SOCK_PERMS,76"node_bind", NULL } },77{ "node",78{ "tcp_recv", "tcp_send", "udp_recv", "udp_send",79"rawip_recv", "rawip_send", "enforce_dest",80"dccp_recv", "dccp_send", "recvfrom", "sendto", NULL } },81{ "netif",82{ "tcp_recv", "tcp_send", "udp_recv", "udp_send",83"rawip_recv", "rawip_send", "dccp_recv", "dccp_send",84"ingress", "egress", NULL } },85{ "netlink_socket",86{ COMMON_SOCK_PERMS, NULL } },87{ "packet_socket",88{ COMMON_SOCK_PERMS, NULL } },89{ "key_socket",90{ COMMON_SOCK_PERMS, NULL } },91{ "unix_stream_socket",92{ COMMON_SOCK_PERMS, "connectto", "newconn", "acceptfrom", NULL93} },94{ "unix_dgram_socket",95{ COMMON_SOCK_PERMS, NULL96} },97{ "sem",98{ COMMON_IPC_PERMS, NULL } },99{ "msg", { "send", "receive", NULL } },100{ "msgq",101{ COMMON_IPC_PERMS, "enqueue", NULL } },102{ "shm",103{ COMMON_IPC_PERMS, "lock", NULL } },104{ "ipc",105{ COMMON_IPC_PERMS, NULL } },106{ "netlink_route_socket",107{ COMMON_SOCK_PERMS,108"nlmsg_read", "nlmsg_write", NULL } },109{ "netlink_firewall_socket",110{ COMMON_SOCK_PERMS,111"nlmsg_read", "nlmsg_write", NULL } },112{ "netlink_tcpdiag_socket",113{ COMMON_SOCK_PERMS,114"nlmsg_read", "nlmsg_write", NULL } },115{ "netlink_nflog_socket",116{ COMMON_SOCK_PERMS, NULL } },117{ "netlink_xfrm_socket",118{ COMMON_SOCK_PERMS,119"nlmsg_read", "nlmsg_write", NULL } },120{ "netlink_selinux_socket",121{ COMMON_SOCK_PERMS, NULL } },122{ "netlink_audit_socket",123{ COMMON_SOCK_PERMS,124"nlmsg_read", "nlmsg_write", "nlmsg_relay", "nlmsg_readpriv",125"nlmsg_tty_audit", NULL } },126{ "netlink_ip6fw_socket",127{ COMMON_SOCK_PERMS,128"nlmsg_read", "nlmsg_write", NULL } },129{ "netlink_dnrt_socket",130{ COMMON_SOCK_PERMS, NULL } },131{ "association",132{ "sendto", "recvfrom", "setcontext", "polmatch", NULL } },133{ "netlink_kobject_uevent_socket",134{ COMMON_SOCK_PERMS, NULL } },135{ "appletalk_socket",136{ COMMON_SOCK_PERMS, NULL } },137{ "packet",138{ "send", "recv", "relabelto", "forward_in", "forward_out", NULL } },139{ "key",140{ "view", "read", "write", "search", "link", "setattr", "create",141NULL } },142{ "dccp_socket",143{ COMMON_SOCK_PERMS,144"node_bind", "name_connect", NULL } },145{ "memprotect", { "mmap_zero", NULL } },146{ "peer", { "recv", NULL } },147{ "capability2", { "mac_override", "mac_admin", "syslog", NULL } },148{ "kernel_service", { "use_as_override", "create_files_as", NULL } },149{ "tun_socket",150{ COMMON_SOCK_PERMS, NULL } },151{ NULL }152};153154155