Blob Blame History Raw

policy_module(ktalk,1.4.0)

########################################
#
# Declarations
#

type ktalkd_t;
type ktalkd_exec_t;
inetd_udp_service_domain(ktalkd_t,ktalkd_exec_t)
role system_r types ktalkd_t;

type ktalkd_log_t;
logging_log_file(ktalkd_log_t)

type ktalkd_tmp_t;
files_tmp_file(ktalkd_tmp_t)

type ktalkd_var_run_t;
files_pid_file(ktalkd_var_run_t)

########################################
#
# Local policy
#

allow ktalkd_t self:process signal_perms;
allow ktalkd_t self:fifo_file rw_fifo_file_perms;
allow ktalkd_t self:tcp_socket connected_stream_socket_perms;
allow ktalkd_t self:udp_socket create_socket_perms;
# for identd
# cjp: this should probably only be inetd_child rules?
allow ktalkd_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
allow ktalkd_t self:capability { setuid setgid };
files_search_home(ktalkd_t)
optional_policy(`
	kerberos_use(ktalkd_t)
')
#end for identd

allow ktalkd_t ktalkd_log_t:file manage_file_perms;
logging_log_filetrans(ktalkd_t,ktalkd_log_t,file)

manage_dirs_pattern(ktalkd_t,ktalkd_tmp_t,ktalkd_tmp_t)
manage_files_pattern(ktalkd_t,ktalkd_tmp_t,ktalkd_tmp_t)
files_tmp_filetrans(ktalkd_t, ktalkd_tmp_t, { file dir })

manage_files_pattern(ktalkd_t,ktalkd_var_run_t,ktalkd_var_run_t)
files_pid_filetrans(ktalkd_t,ktalkd_var_run_t,file)

kernel_read_kernel_sysctls(ktalkd_t)
kernel_read_system_state(ktalkd_t)
kernel_read_network_state(ktalkd_t)

corenet_non_ipsec_sendrecv(ktalkd_t)
corenet_tcp_sendrecv_all_if(ktalkd_t)
corenet_udp_sendrecv_all_if(ktalkd_t)
corenet_tcp_sendrecv_all_nodes(ktalkd_t)
corenet_udp_sendrecv_all_nodes(ktalkd_t)
corenet_tcp_sendrecv_all_ports(ktalkd_t)
corenet_udp_sendrecv_all_ports(ktalkd_t)

dev_read_urand(ktalkd_t)

fs_getattr_xattr_fs(ktalkd_t)

files_read_etc_files(ktalkd_t)

init_read_utmp(ktalkd_t)

libs_use_ld_so(ktalkd_t)
libs_use_shared_libs(ktalkd_t)
logging_send_syslog_msg(ktalkd_t)

miscfiles_read_localization(ktalkd_t)

sysnet_read_config(ktalkd_t)

ifdef(`targeted_policy',`
	term_dontaudit_use_generic_ptys(ktalkd_t)
	term_dontaudit_use_unallocated_ttys(ktalkd_t)
')

optional_policy(`
	nis_use_ypbind(ktalkd_t)
')

optional_policy(`
	nscd_socket_use(ktalkd_t)
')