global_macros 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #####################################
  2. # Common groupings of object classes.
  3. #
  4. define(`capability_class_set', `{ capability capability2 cap_userns cap2_userns }')
  5. define(`global_capability_class_set', `{ capability cap_userns }')
  6. define(`global_capability2_class_set', `{ capability2 cap2_userns }')
  7. define(`devfile_class_set', `{ chr_file blk_file }')
  8. define(`notdevfile_class_set', `{ file lnk_file sock_file fifo_file }')
  9. define(`file_class_set', `{ devfile_class_set notdevfile_class_set }')
  10. define(`dir_file_class_set', `{ dir file_class_set }')
  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_tcpdiag_socket netlink_nflog_socket netlink_xfrm_socket netlink_selinux_socket netlink_audit_socket netlink_dnrt_socket netlink_kobject_uevent_socket tun_socket netlink_iscsi_socket netlink_fib_lookup_socket netlink_connector_socket netlink_netfilter_socket netlink_generic_socket netlink_scsitransport_socket netlink_rdma_socket netlink_crypto_socket sctp_socket icmp_socket ax25_socket ipx_socket netrom_socket atmpvc_socket x25_socket rose_socket decnet_socket atmsvc_socket rds_socket irda_socket pppox_socket llc_socket can_socket tipc_socket bluetooth_socket iucv_socket rxrpc_socket isdn_socket phonet_socket ieee802154_socket caif_socket alg_socket nfc_socket vsock_socket kcm_socket qipcrtr_socket smc_socket xdp_socket }')
  12. define(`dgram_socket_class_set', `{ udp_socket unix_dgram_socket }')
  13. define(`stream_socket_class_set', `{ tcp_socket unix_stream_socket sctp_socket }')
  14. define(`unpriv_socket_class_set', `{ tcp_socket udp_socket unix_stream_socket unix_dgram_socket sctp_socket }')
  15. define(`network_socket_class_set', `{ icmp_socket rawip_socket tcp_socket udp_socket }')
  16. define(`ipc_class_set', `{ sem msgq shm ipc }')
  17. #####################################
  18. # Common groupings of permissions.
  19. #
  20. define(`x_file_perms', `{ getattr execute execute_no_trans map }')
  21. define(`r_file_perms', `{ getattr open read ioctl lock map }')
  22. define(`w_file_perms', `{ open append write lock map }')
  23. define(`rx_file_perms', `{ r_file_perms x_file_perms }')
  24. define(`ra_file_perms', `{ r_file_perms append }')
  25. define(`rw_file_perms', `{ r_file_perms w_file_perms }')
  26. define(`rwx_file_perms', `{ rw_file_perms x_file_perms }')
  27. define(`create_file_perms', `{ create rename setattr unlink rw_file_perms }')
  28. define(`r_dir_perms', `{ open getattr read search ioctl lock }')
  29. define(`w_dir_perms', `{ open search write add_name remove_name lock }')
  30. define(`ra_dir_perms', `{ r_dir_perms add_name write }')
  31. define(`rw_dir_perms', `{ r_dir_perms w_dir_perms }')
  32. define(`create_dir_perms', `{ create reparent rename rmdir setattr rw_dir_perms }')
  33. define(`r_ipc_perms', `{ getattr read associate unix_read }')
  34. define(`w_ipc_perms', `{ write unix_write }')
  35. define(`rw_ipc_perms', `{ r_ipc_perms w_ipc_perms }')
  36. define(`create_ipc_perms', `{ create setattr destroy rw_ipc_perms }')
  37. #####################################
  38. # Common socket permission sets.
  39. define(`rw_socket_perms', `{ ioctl read getattr write setattr lock append bind connect getopt setopt shutdown map }')
  40. define(`rw_socket_perms_no_ioctl', `{ read getattr write setattr lock append bind connect getopt setopt shutdown map }')
  41. define(`create_socket_perms', `{ create rw_socket_perms }')
  42. define(`create_socket_perms_no_ioctl', `{ create rw_socket_perms_no_ioctl }')
  43. define(`rw_stream_socket_perms', `{ rw_socket_perms listen accept }')
  44. define(`create_stream_socket_perms', `{ create rw_stream_socket_perms }')