owncloud.te 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. policy_module(owncloud, 0.0.7)
  2. require {
  3. type httpd_sys_content_t;
  4. type etc_t;
  5. }
  6. ########################################
  7. #
  8. # Declarations
  9. #
  10. attribute_role owncloud_roles;
  11. type owncloud_t;
  12. type owncloud_exec_t;
  13. init_system_domain(owncloud_t, owncloud_exec_t)
  14. allow owncloud_t self:netlink_route_socket { bind create getattr nlmsg_read read write };
  15. allow owncloud_t self:tcp_socket { connect create getattr getopt read setopt shutdown write };
  16. allow owncloud_t self:udp_socket { connect create getattr read write setopt };
  17. allow owncloud_t self:unix_stream_socket { connect create read write };
  18. allow owncloud_t self:fifo_file { getattr ioctl read };
  19. corecmd_exec_bin(owncloud_t)
  20. corecmd_exec_shell(owncloud_t)
  21. files_read_etc_files(owncloud_t)
  22. files_manage_generic_tmp_dirs(owncloud_t)
  23. files_search_pids(owncloud_t)
  24. files_search_var(owncloud_t)
  25. corenet_tcp_connect_http_port(owncloud_t)
  26. corenet_tcp_connect_ldap_port(owncloud_t)
  27. apache_manage_sys_content(owncloud_t)
  28. allow owncloud_t httpd_sys_content_t:file map;
  29. miscfiles_read_localization(owncloud_t)
  30. miscfiles_read_all_certs(owncloud_t)
  31. mysql_stream_connect(owncloud_t)
  32. sysnet_read_config(owncloud_t)
  33. allow owncloud_t etc_t:file map;
  34. files_manage_generic_tmp_files(owncloud_t)
  35. kernel_read_system_state(owncloud_t)
  36. kernel_read_kernel_sysctls(owncloud_t)
  37. optional_policy(`
  38. cron_system_entry(owncloud_t, owncloud_exec_t)
  39. ')