Home | History | Annotate | Download | only in sepolicy
      1 #####################################
      2 # Common groupings of object classes.
      3 #
      4 define(`capability_class_set', `{ capability capability2 }')
      5 
      6 define(`devfile_class_set', `{ chr_file blk_file }')
      7 define(`notdevfile_class_set', `{ file lnk_file sock_file fifo_file }')
      8 define(`file_class_set', `{ devfile_class_set notdevfile_class_set }')
      9 define(`dir_file_class_set', `{ dir file_class_set }')
     10 
     11 define(`socket_class_set', `{ socket tcp_socket udp_socket rawip_socket netlink_socket packet_socket key_socket unix_stream_socket unix_dgram_socket appletalk_socket netlink_route_socket netlink_firewall_socket netlink_tcpdiag_socket netlink_nflog_socket netlink_xfrm_socket netlink_selinux_socket netlink_audit_socket netlink_ip6fw_socket netlink_dnrt_socket netlink_kobject_uevent_socket tun_socket }')
     12 define(`dgram_socket_class_set', `{ udp_socket unix_dgram_socket }')
     13 define(`stream_socket_class_set', `{ tcp_socket unix_stream_socket }')
     14 define(`unpriv_socket_class_set', `{ tcp_socket udp_socket unix_stream_socket unix_dgram_socket }')
     15 
     16 define(`ipc_class_set', `{ sem msgq shm ipc }')
     17 
     18 #####################################
     19 # Common groupings of permissions.
     20 #
     21 define(`x_file_perms', `{ getattr execute execute_no_trans }')
     22 define(`r_file_perms', `{ getattr open read ioctl lock }')
     23 define(`w_file_perms', `{ open append write }')
     24 define(`rx_file_perms', `{ r_file_perms x_file_perms }')
     25 define(`ra_file_perms', `{ r_file_perms append }')
     26 define(`rw_file_perms', `{ r_file_perms w_file_perms }')
     27 define(`rwx_file_perms', `{ rw_file_perms x_file_perms }')
     28 define(`link_file_perms', `{ getattr link unlink rename }')
     29 define(`create_file_perms', `{ create setattr rw_file_perms link_file_perms }')
     30 
     31 define(`r_dir_perms', `{ open getattr read search ioctl }')
     32 define(`w_dir_perms', `{ open search write add_name remove_name }')
     33 define(`ra_dir_perms', `{ r_dir_perms add_name write }')
     34 define(`rw_dir_perms', `{ r_dir_perms w_dir_perms }')
     35 define(`create_dir_perms', `{ create reparent rmdir setattr rw_dir_perms link_file_perms }')
     36 
     37 define(`r_ipc_perms', `{ getattr read associate unix_read }')
     38 define(`w_ipc_perms', `{ write unix_write }')
     39 define(`rw_ipc_perms', `{ r_ipc_perms w_ipc_perms }')
     40 define(`create_ipc_perms', `{ create setattr destroy rw_ipc_perms }')
     41 
     42 #####################################
     43 # Common socket permission sets.
     44 define(`rw_socket_perms', `{ ioctl read getattr write setattr append bind connect getopt setopt shutdown }')
     45 define(`create_socket_perms', `{ create rw_socket_perms }')
     46