selinux/gonic/gonic.te
2023-08-17 23:59:54 +02:00

48 lines
1.1 KiB
Text

policy_module(gonic, 1.0.0)
require {
type httpd_user_ra_content_t;
type var_t;
}
########################################
#
# Declarations
#
type gonic_t;
type gonic_exec_t;
init_daemon_domain(gonic_t, gonic_exec_t)
type gonic_file_t;
files_type(gonic_file_t)
#permissive gonic_t;
########################################
#
# gonic local policy
#
allow gonic_t self:capability { setgid setuid };
allow gonic_t self:fifo_file rw_fifo_file_perms;
allow gonic_t self:unix_stream_socket create_stream_socket_perms;
domain_use_interactive_fds(gonic_t)
files_read_etc_files(gonic_t)
miscfiles_read_localization(gonic_t)
sysnet_dns_name_resolve(gonic_t)
corenet_tcp_bind_generic_node(gonic_t)
corenet_tcp_bind_generic_port(gonic_t)
manage_files_pattern(gonic_exec_t, gonic_file_t, gonic_file_t)
manage_files_pattern(gonic_t, gonic_file_t, gonic_file_t)
allow gonic_t gonic_file_t:dir { getattr rmdir };
allow gonic_t gonic_file_t:file map;
allow gonic_t self:tcp_socket { accept listen };
allow gonic_t httpd_user_ra_content_t:file {read map getattr open};
allow gonic_t httpd_user_ra_content_t:dir { getattr search open read};
allow gonic_t var_t:file map;