Chris PeBenito 4e656a
Chris PeBenito 4e656a
policy_module(uptime,1.0.0)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
########################################
Chris PeBenito 4e656a
#
Chris PeBenito 4e656a
# Declarations
Chris PeBenito 4e656a
#
Chris PeBenito 4e656a
Chris PeBenito 4e656a
type uptimed_t;
Chris PeBenito 4e656a
type uptimed_exec_t;
Chris PeBenito 4e656a
init_daemon_domain(uptimed_t,uptimed_exec_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
type uptimed_etc_t alias etc_uptimed_t;
Chris PeBenito 4e656a
files_config_file(uptimed_etc_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
type uptimed_spool_t;
Chris PeBenito 4e656a
files_type(uptimed_spool_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
type uptimed_var_run_t;
Chris PeBenito 4e656a
files_pid_file(uptimed_var_run_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
########################################
Chris PeBenito 4e656a
#
Chris PeBenito 4e656a
# Local policy
Chris PeBenito 4e656a
#
Chris PeBenito 4e656a
Chris PeBenito 4e656a
dontaudit uptimed_t self:capability sys_tty_config;
Chris PeBenito 4e656a
allow uptimed_t self:process signal_perms;
Chris PeBenito 4e656a
allow uptimed_t self:fifo_file { getattr write };
Chris PeBenito 4e656a
Chris PeBenito 4e656a
allow uptimed_t uptimed_etc_t:file { getattr read };
Chris PeBenito 4e656a
files_search_etc(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
allow uptimed_t uptimed_spool_t:file manage_file_perms;
Chris PeBenito 4e656a
Chris PeBenito 4e656a
allow uptimed_t uptimed_var_run_t:file manage_file_perms;
Chris PeBenito 4e656a
allow uptimed_t uptimed_var_run_t:dir rw_dir_perms;
Chris PeBenito 4e656a
files_pid_filetrans(uptimed_t,uptimed_var_run_t,file)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
allow uptimed_t uptimed_spool_t:dir manage_dir_perms;
Chris PeBenito 4e656a
allow uptimed_t uptimed_spool_t:file manage_file_perms;
Chris PeBenito 4e656a
files_spool_filetrans(uptimed_t,uptimed_spool_t,{ dir file })
Chris PeBenito 4e656a
Chris PeBenito 4e656a
kernel_read_system_state(uptimed_t)
Chris PeBenito 4e656a
kernel_read_kernel_sysctls(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
corecmd_exec_shell(uptimed_t)
Chris PeBenito 4e656a
corecmd_search_sbin(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
dev_read_sysfs(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
domain_use_interactive_fds(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
files_read_etc_runtime_files(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
fs_getattr_all_fs(uptimed_t)
Chris PeBenito 4e656a
fs_search_auto_mountpoints(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
term_dontaudit_use_console(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
init_use_fds(uptimed_t)
Chris PeBenito 4e656a
init_use_script_ptys(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
libs_use_ld_so(uptimed_t)
Chris PeBenito 4e656a
libs_use_shared_libs(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
logging_send_syslog_msg(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
miscfiles_read_localization(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
userdom_dontaudit_use_unpriv_user_fds(uptimed_t)
Chris PeBenito 4e656a
userdom_dontaudit_search_sysadm_home_dirs(uptimed_t)
Chris PeBenito 4e656a
Chris PeBenito 4e656a
ifdef(`targeted_policy',`
Chris PeBenito 4e656a
	term_dontaudit_use_unallocated_ttys(uptimed_t)
Chris PeBenito 4e656a
	term_dontaudit_use_generic_ptys(uptimed_t)
Chris PeBenito 4e656a
	files_dontaudit_read_root_files(uptimed_t)
Chris PeBenito 4e656a
')
Chris PeBenito 4e656a
Chris PeBenito 4e656a
optional_policy(`
Chris PeBenito 4e656a
	mta_send_mail(uptimed_t)
Chris PeBenito 4e656a
')
Chris PeBenito 4e656a
Chris PeBenito 4e656a
optional_policy(`
Chris PeBenito 4e656a
	seutil_sigchld_newrole(uptimed_t)
Chris PeBenito 4e656a
')
Chris PeBenito 4e656a
Chris PeBenito 4e656a
optional_policy(`
Chris PeBenito 4e656a
	udev_read_db(uptimed_t)
Chris PeBenito 4e656a
')