
policy_module(ksm, 1.0.0)

########################################
#
# KSM personal declarations.
#

type ksm_initrc_exec_t;
init_script_file(ksm_initrc_exec_t)

########################################
#
# KSMTuneD personal declarations.
#

type ksmtuned_t;
type ksmtuned_exec_t;
init_daemon_domain(ksmtuned_t, ksmtuned_exec_t)

type ksmtuned_initrc_exec_t;
init_script_file(ksmtuned_initrc_exec_t)

type ksmtuned_var_run_t;
files_pid_file(ksmtuned_var_run_t)

permissive ksmtuned_t;

########################################
#
# KSM personal policy.
#

########################################
#
# KSMTuneD personal policy.
#

allow ksmtuned_t self:fifo_file rw_fifo_file_perms;

manage_files_pattern(ksmtuned_t, ksmtuned_var_run_t, ksmtuned_var_run_t)
files_pid_filetrans(ksmtuned_t, ksmtuned_var_run_t, file)

corecmd_exec_bin(ksmtuned_t)

dev_rw_sysfs(ksmtuned_t)

domain_read_all_domains_state(ksmtuned_t)

files_read_etc_files(ksmtuned_t)

kernel_read_system_state(ksmtuned_t)

miscfiles_read_localization(ksmtuned_t)
