owncloud.te 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. policy_module(owncloud, 0.0.6)
  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. corecmd_exec_bin(owncloud_t)
  19. corecmd_exec_shell(owncloud_t)
  20. files_read_etc_files(owncloud_t)
  21. files_manage_generic_tmp_dirs(owncloud_t)
  22. files_search_pids(owncloud_t)
  23. files_search_var(owncloud_t)
  24. corenet_tcp_connect_http_port(owncloud_t)
  25. corenet_tcp_connect_ldap_port(owncloud_t)
  26. apache_manage_sys_content(owncloud_t)
  27. allow owncloud_t httpd_sys_content_t:file map;
  28. miscfiles_read_localization(owncloud_t)
  29. mysql_stream_connect(owncloud_t)
  30. sysnet_read_config(owncloud_t)
  31. allow owncloud_t etc_t:file map;
  32. files_manage_generic_tmp_files(owncloud_t)
  33. optional_policy(`
  34. cron_system_entry(owncloud_t, owncloud_exec_t)
  35. ')