2008-12-10 19:38:10 +00:00
|
|
|
policy_module(clock, 1.6.0)
|
2005-05-05 21:18:27 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type adjtime_t;
|
2005-06-29 14:26:41 +00:00
|
|
|
files_type(adjtime_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
|
|
|
|
type hwclock_t;
|
|
|
|
type hwclock_exec_t;
|
2009-06-26 14:40:13 +00:00
|
|
|
init_system_domain(hwclock_t, hwclock_exec_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
role system_r types hwclock_t;
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
# Give hwclock the capabilities it requires. dac_override is a surprise,
|
|
|
|
# but hwclock does require it.
|
2006-12-12 20:08:08 +00:00
|
|
|
allow hwclock_t self:capability { dac_override sys_rawio sys_time sys_tty_config };
|
2005-05-05 21:18:27 +00:00
|
|
|
dontaudit hwclock_t self:capability sys_tty_config;
|
2006-07-07 14:51:08 +00:00
|
|
|
allow hwclock_t self:process signal_perms;
|
2008-10-16 16:09:20 +00:00
|
|
|
allow hwclock_t self:fifo_file rw_fifo_file_perms;
|
2005-05-05 21:18:27 +00:00
|
|
|
|
|
|
|
# Allow hwclock to store & retrieve correction factors.
|
2006-07-07 14:51:08 +00:00
|
|
|
allow hwclock_t adjtime_t:file { rw_file_perms setattr };
|
2005-05-05 21:18:27 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(hwclock_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
kernel_read_system_state(hwclock_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
|
2006-12-04 20:10:56 +00:00
|
|
|
corecmd_exec_bin(hwclock_t)
|
|
|
|
corecmd_exec_shell(hwclock_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
2005-06-16 20:33:51 +00:00
|
|
|
dev_read_sysfs(hwclock_t)
|
2005-06-13 16:22:32 +00:00
|
|
|
dev_rw_realtime_clock(hwclock_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
|
2009-08-05 13:52:34 +00:00
|
|
|
files_read_etc_files(hwclock_t)
|
|
|
|
# for when /usr is not mounted:
|
|
|
|
files_dontaudit_search_isid_type_dirs(hwclock_t)
|
|
|
|
|
2005-06-10 01:01:13 +00:00
|
|
|
fs_getattr_xattr_fs(hwclock_t)
|
2005-06-27 16:30:55 +00:00
|
|
|
fs_search_auto_mountpoints(hwclock_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
|
2005-06-10 01:01:13 +00:00
|
|
|
term_dontaudit_use_console(hwclock_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
term_use_unallocated_ttys(hwclock_t)
|
2010-02-11 19:20:10 +00:00
|
|
|
term_use_all_ttys(hwclock_t)
|
|
|
|
term_use_all_ptys(hwclock_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(hwclock_t)
|
2005-06-16 20:33:51 +00:00
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
init_use_fds(hwclock_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
init_use_script_ptys(hwclock_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
|
2007-06-12 18:46:14 +00:00
|
|
|
logging_send_audit_msgs(hwclock_t)
|
2005-06-13 17:35:46 +00:00
|
|
|
logging_send_syslog_msg(hwclock_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
|
|
|
|
miscfiles_read_localization(hwclock_t)
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-10 18:11:46 +00:00
|
|
|
apm_append_log(hwclock_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
apm_rw_stream_sockets(hwclock_t)
|
2005-10-10 18:11:46 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-02-02 21:08:12 +00:00
|
|
|
nscd_socket_use(hwclock_t)
|
2005-10-24 22:13:41 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-06-29 14:26:41 +00:00
|
|
|
seutil_sigchld_newrole(hwclock_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-06-13 17:35:46 +00:00
|
|
|
udev_read_db(hwclock_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(hwclock_t)
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|