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

90 lines
2.0 KiB
Plaintext
Raw Normal View History

2005-05-05 21:18:27 +00:00
2005-12-09 16:38:39 +00:00
policy_module(clock,1.0.0)
2005-05-05 21:18:27 +00:00
########################################
#
# Declarations
#
type adjtime_t;
files_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;
2005-09-16 13:36:26 +00:00
allow hwclock_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
2005-05-05 21:18:27 +00:00
# Allow hwclock to store & retrieve correction factors.
allow hwclock_t adjtime_t:file { setattr ioctl read getattr lock write append };
kernel_read_kernel_sysctls(hwclock_t)
2005-07-08 20:44:57 +00:00
kernel_list_proc(hwclock_t)
kernel_read_proc_symlinks(hwclock_t)
2005-05-05 21:18:27 +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
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)
2005-06-10 01:01:13 +00:00
term_use_all_user_ttys(hwclock_t)
term_use_all_user_ptys(hwclock_t)
2005-05-05 21:18:27 +00:00
domain_use_wide_inherit_fd(hwclock_t)
2005-06-13 17:35:46 +00:00
init_use_fd(hwclock_t)
2006-02-02 21:08:12 +00:00
init_use_script_ptys(hwclock_t)
2005-05-05 21:18:27 +00:00
files_read_etc_files(hwclock_t)
# for when /usr is not mounted:
files_dontaudit_search_isid_type_dirs(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)
2005-11-08 22:00:30 +00:00
ifdef(`targeted_policy',`
2006-02-02 21:08:12 +00:00
term_dontaudit_use_unallocated_ttys(hwclock_t)
term_dontaudit_use_generic_ptys(hwclock_t)
files_dontaudit_read_root_files(hwclock_t)
2005-05-05 21:18:27 +00:00
')
optional_policy(`apm',`
apm_append_log(hwclock_t)
2006-02-02 21:08:12 +00:00
apm_rw_stream_sockets(hwclock_t)
')
optional_policy(`nscd',`
2006-02-02 21:08:12 +00:00
nscd_socket_use(hwclock_t)
2005-10-24 22:13:41 +00:00
')
optional_policy(`selinuxutil',`
seutil_sigchld_newrole(hwclock_t)
2005-05-05 21:18:27 +00:00
')
optional_policy(`udev',`
2005-06-13 17:35:46 +00:00
udev_read_db(hwclock_t)
2005-05-05 21:18:27 +00:00
')
optional_policy(`userdomain',`
2005-06-13 17:35:46 +00:00
userdom_dontaudit_use_unpriv_user_fd(hwclock_t)
')