Chris PeBenito 29af4c
policy_module(chronyd, 1.1.0)
Chris PeBenito a51379
Chris PeBenito a51379
########################################
Chris PeBenito a51379
#
Chris PeBenito a51379
# Declarations
Chris PeBenito a51379
#
Chris PeBenito a51379
Chris PeBenito a51379
type chronyd_t;
Chris PeBenito a51379
type chronyd_exec_t;
Chris PeBenito a51379
init_daemon_domain(chronyd_t, chronyd_exec_t)
Chris PeBenito a51379
Chris PeBenito a51379
type chronyd_initrc_exec_t;
Chris PeBenito a51379
init_script_file(chronyd_initrc_exec_t)
Chris PeBenito a51379
Jeremy Solt dcbb33
type chronyd_keys_t;
Jeremy Solt dcbb33
files_type(chronyd_keys_t)
Jeremy Solt dcbb33
Chris PeBenito a51379
type chronyd_var_lib_t;
Chris PeBenito a51379
files_type(chronyd_var_lib_t)
Chris PeBenito a51379
Chris PeBenito a51379
type chronyd_var_log_t;
Chris PeBenito a51379
logging_log_file(chronyd_var_log_t)
Chris PeBenito a51379
Chris PeBenito a51379
type chronyd_var_run_t;
Chris PeBenito a51379
files_pid_file(chronyd_var_run_t)
Chris PeBenito a51379
Chris PeBenito a51379
########################################
Chris PeBenito a51379
#
Chris PeBenito a51379
# Local policy
Chris PeBenito a51379
#
Chris PeBenito a51379
Jeremy Solt dcbb33
allow chronyd_t self:capability { dac_override ipc_lock setuid setgid sys_resource sys_time };
Jeremy Solt dcbb33
allow chronyd_t self:process { getcap setcap setrlimit };
Jeremy Solt dcbb33
allow chronyd_t self:shm create_shm_perms;
Chris PeBenito a51379
allow chronyd_t self:udp_socket create_socket_perms;
Jeremy Solt dcbb33
allow chronyd_t self:unix_dgram_socket create_socket_perms;
Jeremy Solt dcbb33
Jeremy Solt dcbb33
allow chronyd_t chronyd_keys_t:file read_file_perms;
Chris PeBenito a51379
Chris PeBenito a51379
manage_files_pattern(chronyd_t, chronyd_var_lib_t, chronyd_var_lib_t)
Chris PeBenito a51379
manage_dirs_pattern(chronyd_t, chronyd_var_lib_t, chronyd_var_lib_t)
Jeremy Solt dcbb33
manage_sock_files_pattern(chronyd_t, chronyd_var_lib_t, chronyd_var_lib_t)
Chris PeBenito a51379
files_var_lib_filetrans(chronyd_t, chronyd_var_lib_t, { file dir })
Chris PeBenito a51379
Chris PeBenito a51379
manage_files_pattern(chronyd_t, chronyd_var_log_t, chronyd_var_log_t)
Chris PeBenito a51379
manage_dirs_pattern(chronyd_t, chronyd_var_log_t, chronyd_var_log_t)
Chris PeBenito a51379
logging_log_filetrans(chronyd_t, chronyd_var_log_t, { file dir })
Chris PeBenito a51379
Chris PeBenito a51379
manage_files_pattern(chronyd_t, chronyd_var_run_t, chronyd_var_run_t)
Chris PeBenito a51379
manage_dirs_pattern(chronyd_t, chronyd_var_run_t, chronyd_var_run_t)
Jeremy Solt dcbb33
files_pid_filetrans(chronyd_t, chronyd_var_run_t, file)
Chris PeBenito a51379
Chris PeBenito a51379
corenet_udp_bind_ntp_port(chronyd_t)
Chris PeBenito a51379
# bind to udp/323
Chris PeBenito a51379
corenet_udp_bind_chronyd_port(chronyd_t)
Chris PeBenito a51379
Chris PeBenito a51379
# real time clock option
Chris PeBenito a51379
dev_rw_realtime_clock(chronyd_t)
Chris PeBenito a51379
Chris PeBenito a51379
auth_use_nsswitch(chronyd_t)
Chris PeBenito a51379
Chris PeBenito a51379
logging_send_syslog_msg(chronyd_t)
Chris PeBenito a51379
Chris PeBenito a51379
miscfiles_read_localization(chronyd_t)
Jeremy Solt dcbb33
Jeremy Solt dcbb33
optional_policy(`
Jeremy Solt dcbb33
	gpsd_rw_shm(chronyd_t)
Jeremy Solt dcbb33
')