2008-12-10 19:38:10 +00:00
|
|
|
policy_module(uptime, 1.4.0)
|
2006-04-12 17:41:09 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type uptimed_t;
|
|
|
|
type uptimed_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_daemon_domain(uptimed_t, uptimed_exec_t)
|
2006-04-12 17:41:09 +00:00
|
|
|
|
|
|
|
type uptimed_etc_t alias etc_uptimed_t;
|
|
|
|
files_config_file(uptimed_etc_t)
|
|
|
|
|
|
|
|
type uptimed_spool_t;
|
|
|
|
files_type(uptimed_spool_t)
|
|
|
|
|
|
|
|
type uptimed_var_run_t;
|
|
|
|
files_pid_file(uptimed_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
dontaudit uptimed_t self:capability sys_tty_config;
|
|
|
|
allow uptimed_t self:process signal_perms;
|
2008-10-16 16:09:20 +00:00
|
|
|
allow uptimed_t self:fifo_file write_file_perms;
|
2006-04-12 17:41:09 +00:00
|
|
|
|
2008-10-16 16:09:20 +00:00
|
|
|
allow uptimed_t uptimed_etc_t:file read_file_perms;
|
2006-04-12 17:41:09 +00:00
|
|
|
files_search_etc(uptimed_t)
|
|
|
|
|
|
|
|
allow uptimed_t uptimed_spool_t:file manage_file_perms;
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(uptimed_t, uptimed_var_run_t, uptimed_var_run_t)
|
|
|
|
files_pid_filetrans(uptimed_t, uptimed_var_run_t, file)
|
2006-04-12 17:41:09 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(uptimed_t, uptimed_spool_t, uptimed_spool_t)
|
|
|
|
manage_files_pattern(uptimed_t, uptimed_spool_t, uptimed_spool_t)
|
|
|
|
files_spool_filetrans(uptimed_t, uptimed_spool_t, { dir file })
|
2006-04-12 17:41:09 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(uptimed_t)
|
|
|
|
kernel_read_kernel_sysctls(uptimed_t)
|
|
|
|
|
|
|
|
corecmd_exec_shell(uptimed_t)
|
|
|
|
|
|
|
|
dev_read_sysfs(uptimed_t)
|
|
|
|
|
|
|
|
domain_use_interactive_fds(uptimed_t)
|
|
|
|
|
|
|
|
files_read_etc_runtime_files(uptimed_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(uptimed_t)
|
|
|
|
fs_search_auto_mountpoints(uptimed_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(uptimed_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(uptimed_t)
|
|
|
|
|
|
|
|
userdom_dontaudit_use_unpriv_user_fds(uptimed_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_search_user_home_dirs(uptimed_t)
|
2006-04-12 17:41:09 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
mta_send_mail(uptimed_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
seutil_sigchld_newrole(uptimed_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
udev_read_db(uptimed_t)
|
|
|
|
')
|