2005-05-05 21:18:27 +00:00
|
|
|
|
|
|
|
policy_module(clock,1.0)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type adjtime_t;
|
|
|
|
files_make_file(adjtime_t)
|
|
|
|
|
|
|
|
type hwclock_t;
|
|
|
|
type hwclock_exec_t;
|
2005-05-13 20:21:50 +00:00
|
|
|
init_make_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
|
|
|
|
|
|
|
init_use_file_descriptors(hwclock_t)
|
|
|
|
init_script_use_pseudoterminal(hwclock_t)
|
|
|
|
|
|
|
|
domain_use_widely_inheritable_file_descriptors(hwclock_t)
|
|
|
|
|
2005-05-26 20:38:45 +00:00
|
|
|
files_read_general_system_config_directory(hwclock_t)
|
2005-05-31 21:25:45 +00:00
|
|
|
# for when /usr is not mounted:
|
|
|
|
files_ignore_search_isid_type_dir(hwclock_t)
|
2005-05-26 20:38:45 +00:00
|
|
|
|
2005-05-05 21:18:27 +00:00
|
|
|
libraries_use_dynamic_loader(hwclock_t)
|
2005-05-17 15:32:52 +00:00
|
|
|
libraries_use_shared_libraries(hwclock_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
|
|
|
|
logging_send_system_log_message(hwclock_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(hwclock_t)
|
|
|
|
|
2005-06-07 18:45:47 +00:00
|
|
|
ifdef(`targeted_policy', `
|
2005-06-10 01:01:13 +00:00
|
|
|
term_dontaudit_use_unallocated_tty(hwclock_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
terminal_ignore_use_general_pseudoterminal(hwclock_t)
|
|
|
|
files_ignore_read_rootfs_file(hwclock_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`selinux.te',`
|
2005-06-03 12:25:14 +00:00
|
|
|
selinux_newrole_sigchld(hwclock_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`udev.te', `
|
2005-06-03 12:25:14 +00:00
|
|
|
udev_read_database(hwclock_t)
|
2005-05-05 21:18:27 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
optional_policy(`userdomain.te',`
|
2005-06-03 12:25:14 +00:00
|
|
|
userdomain_ignore_use_all_unprivileged_users_file_descriptors(hwclock_t)
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
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
|