931d180
policy_module(thin, 1.0)
931d180
931d180
########################################
931d180
#
931d180
# Declarations
931d180
#
931d180
931d180
attribute thin_domain;
931d180
931d180
thin_domain_template(thin)
931d180
931d180
type thin_log_t;
931d180
logging_log_file(thin_log_t)
931d180
931d180
type thin_var_run_t;
931d180
files_pid_file(thin_var_run_t)
931d180
931d180
thin_domain_template(thin_aeolus_configserver)
931d180
931d180
type thin_aeolus_configserver_lib_t;
931d180
files_type(thin_aeolus_configserver_lib_t)
931d180
931d180
type thin_aeolus_configserver_log_t;
931d180
logging_log_file(thin_aeolus_configserver_log_t)
931d180
931d180
type thin_aeolus_configserver_var_run_t;
931d180
files_pid_file(thin_aeolus_configserver_var_run_t)
931d180
931d180
########################################
931d180
#
931d180
# thin_domain local policy
931d180
#
931d180
d1840a5
allow thin_domain self:process signal;
d1840a5
931d180
allow thin_domain self:fifo_file rw_fifo_file_perms;
931d180
allow thin_domain self:tcp_socket create_stream_socket_perms;
931d180
931d180
# we want to stay in a new thin domain if we call thin binary from a script
931d180
# # initrc_t@thin_test_exec_t->thin_test_t@thin_exec_t->thin_test_t
931d180
can_exec(thin_domain, thin_exec_t)
931d180
931d180
corecmd_exec_bin(thin_domain)
6c6e219
corecmd_exec_shell(thin_domain)
931d180
ac489b7
corenet_tcp_bind_generic_node(thin_domain)
ac489b7
931d180
dev_read_rand(thin_domain)
931d180
dev_read_urand(thin_domain)
931d180
931d180
931d180
auth_read_passwd(thin_domain)
931d180
931d180
miscfiles_read_certs(thin_domain)
931d180
931d180
931d180
fs_search_auto_mountpoints(thin_domain)
931d180
931d180
init_read_utmp(thin_domain)
931d180
931d180
kernel_read_kernel_sysctls(thin_domain)
931d180
931d180
optional_policy(`
931d180
	sysnet_read_config(thin_domain)
931d180
')
931d180
931d180
########################################
931d180
#
931d180
# thin local policy
931d180
#
931d180
931d180
allow thin_t self:capability { setuid kill setgid dac_override };
931d180
931d180
allow thin_t self:netlink_route_socket r_netlink_socket_perms;
931d180
allow thin_t self:udp_socket create_socket_perms;
931d180
allow thin_t self:unix_stream_socket create_stream_socket_perms;
931d180
931d180
manage_files_pattern(thin_t, thin_log_t, thin_log_t)
931d180
manage_dirs_pattern(thin_t, thin_log_t, thin_log_t)
931d180
logging_log_filetrans(thin_t, thin_log_t, { file dir })
931d180
931d180
manage_files_pattern(thin_t, thin_var_run_t, thin_var_run_t)
931d180
files_pid_filetrans(thin_t, thin_var_run_t, { file })
931d180
931d180
corenet_tcp_bind_ntop_port(thin_t)
931d180
corenet_tcp_connect_postgresql_port(thin_t)
931d180
931d180
931d180
#######################################
931d180
#
931d180
# thin aeolus configserver local policy
931d180
#
931d180
ac489b7
allow thin_aeolus_configserver_t self:capability { setuid setgid };
ac489b7
220d579
corenet_tcp_bind_tram_port(thin_aeolus_configserver_t)
220d579
931d180
manage_files_pattern(thin_aeolus_configserver_t, thin_aeolus_configserver_lib_t, thin_aeolus_configserver_lib_t)
931d180
manage_dirs_pattern(thin_aeolus_configserver_t, thin_aeolus_configserver_lib_t, thin_aeolus_configserver_lib_t)
931d180
files_var_lib_filetrans(thin_aeolus_configserver_t, thin_aeolus_configserver_lib_t, { file dir })
931d180
931d180
manage_files_pattern(thin_aeolus_configserver_t, thin_aeolus_configserver_log_t, thin_aeolus_configserver_log_t)
931d180
manage_dirs_pattern(thin_aeolus_configserver_t, thin_aeolus_configserver_log_t, thin_aeolus_configserver_log_t)
931d180
logging_log_filetrans(thin_aeolus_configserver_t, thin_aeolus_configserver_log_t, { file dir })
931d180
931d180
manage_files_pattern(thin_aeolus_configserver_t, thin_aeolus_configserver_var_run_t, thin_aeolus_configserver_var_run_t)
931d180
manage_dirs_pattern(thin_aeolus_configserver_t, thin_aeolus_configserver_var_run_t, thin_aeolus_configserver_var_run_t)
931d180
files_pid_filetrans(thin_aeolus_configserver_t, thin_aeolus_configserver_var_run_t, { dir file })