selinux-policy/refpolicy/policy/modules/system/clock.te

98 lines
2.2 KiB
Plaintext
Raw Normal View History

2005-05-05 21:18:27 +00:00
policy_module(clock,1.0)
########################################
#
# Declarations
#
type adjtime_t;
2005-06-13 17:35:46 +00:00
files_file_type(adjtime_t)
2005-05-05 21:18:27 +00:00
type hwclock_t;
type hwclock_exec_t;
2005-06-13 17:35:46 +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
#
2005-06-09 14:50:48 +00:00
allow hwclock_t self:process signal_perms;
2005-05-05 21:18:27 +00:00
# Give hwclock the capabilities it requires. dac_override is a surprise,
# but hwclock does require it.
allow hwclock_t self:capability { dac_override sys_rawio sys_time sys_tty_config };
dontaudit hwclock_t self:capability sys_tty_config;
# Allow hwclock to store & retrieve correction factors.
allow hwclock_t adjtime_t:file { setattr ioctl read getattr lock write append };
kernel_read_kernel_sysctl(hwclock_t)
kernel_read_hardware_state(hwclock_t)
2005-06-13 16:22:32 +00:00
dev_rw_realtime_clock(hwclock_t)
2005-05-05 21:18:27 +00:00
2005-06-10 01:01:13 +00:00
fs_getattr_xattr_fs(hwclock_t)
2005-05-05 21:18:27 +00:00
2005-06-10 01:01:13 +00:00
term_dontaudit_use_console(hwclock_t)
term_use_unallocated_tty(hwclock_t)
term_use_all_user_ttys(hwclock_t)
term_use_all_user_ptys(hwclock_t)
2005-05-05 21:18:27 +00:00
2005-06-13 17:35:46 +00:00
init_use_fd(hwclock_t)
init_use_script_pty(hwclock_t)
2005-05-05 21:18:27 +00:00
2005-06-13 17:35:46 +00:00
domain_use_wide_inherit_fd(hwclock_t)
2005-05-05 21:18:27 +00:00
2005-06-13 17:35:46 +00:00
files_read_generic_etc_files_directory(hwclock_t)
# for when /usr is not mounted:
2005-06-13 17:35:46 +00:00
files_dontaudit_search_isid_type_dir(hwclock_t)
2005-05-26 20:38:45 +00:00
2005-06-13 17:35:46 +00:00
libs_use_ld_so(hwclock_t)
libs_use_shared_libs(hwclock_t)
2005-05-05 21:18:27 +00:00
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)
ifdef(`targeted_policy', `
2005-06-10 01:01:13 +00:00
term_dontaudit_use_unallocated_tty(hwclock_t)
term_dontaudit_use_generic_pty(hwclock_t)
2005-06-13 17:35:46 +00:00
files_dontaudit_read_root_file(hwclock_t)
2005-05-05 21:18:27 +00:00
')
optional_policy(`selinux.te',`
selinux_newrole_sigchld(hwclock_t)
2005-05-05 21:18:27 +00:00
')
optional_policy(`udev.te', `
2005-06-13 17:35:46 +00:00
udev_read_db(hwclock_t)
2005-05-05 21:18:27 +00:00
')
optional_policy(`userdomain.te',`
2005-06-13 17:35:46 +00:00
userdom_dontaudit_use_unpriv_user_fd(hwclock_t)
')
2005-05-05 21:18:27 +00:00
ifdef(`TODO',`
allow hwclock_t proc_t:dir r_dir_perms;
allow hwclock_t proc_t:lnk_file read;
optional_policy(`rhgb.te', `
allow hwclock_t rhgb_t:process sigchld;
allow hwclock_t rhgb_t:fd use;
2005-06-09 14:50:48 +00:00
allow hwclock_t rhgb_t:fifo_file rw_file_perms;
2005-05-05 21:18:27 +00:00
')
allow hwclock_t autofs_t:dir { search getattr };
optional_policy(`gnome-pty-helper.te', `allow hwclock_t sysadm_gph_t:fd use;')
optional_policy(`apmd.te', `
domain_auto_trans(apmd_t, hwclock_exec_t, hwclock_t)
')
') dnl end TODO