|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
2274f9 |
policy_module(clock,1.0)
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
2274f9 |
########################################
|
|
Chris PeBenito |
2274f9 |
#
|
|
Chris PeBenito |
2274f9 |
# Declarations
|
|
Chris PeBenito |
2274f9 |
#
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
2274f9 |
type adjtime_t;
|
|
Chris PeBenito |
8fd367 |
files_type(adjtime_t)
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
2274f9 |
type hwclock_t;
|
|
Chris PeBenito |
2274f9 |
type hwclock_exec_t;
|
|
Chris PeBenito |
c9428d |
init_system_domain(hwclock_t,hwclock_exec_t)
|
|
Chris PeBenito |
2274f9 |
role system_r types hwclock_t;
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
2274f9 |
########################################
|
|
Chris PeBenito |
2274f9 |
#
|
|
Chris PeBenito |
2274f9 |
# Local policy
|
|
Chris PeBenito |
2274f9 |
#
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
dd8229 |
allow hwclock_t self:process signal_perms;
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
2274f9 |
# Give hwclock the capabilities it requires. dac_override is a surprise,
|
|
Chris PeBenito |
2274f9 |
# but hwclock does require it.
|
|
Chris PeBenito |
2274f9 |
allow hwclock_t self:capability { dac_override sys_rawio sys_time sys_tty_config };
|
|
Chris PeBenito |
2274f9 |
dontaudit hwclock_t self:capability sys_tty_config;
|
|
Chris PeBenito |
a08248 |
allow hwclock_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
2274f9 |
# Allow hwclock to store & retrieve correction factors.
|
|
Chris PeBenito |
2274f9 |
allow hwclock_t adjtime_t:file { setattr ioctl read getattr lock write append };
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
2274f9 |
kernel_read_kernel_sysctl(hwclock_t)
|
|
Chris PeBenito |
a42ca7 |
kernel_list_proc(hwclock_t)
|
|
Chris PeBenito |
a42ca7 |
kernel_read_proc_symlinks(hwclock_t)
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
d35c62 |
dev_read_sysfs(hwclock_t)
|
|
Karl MacMillan |
f0c985 |
dev_rw_realtime_clock(hwclock_t)
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_xattr_fs(hwclock_t)
|
|
Chris PeBenito |
ab940a |
fs_search_auto_mountpoints(hwclock_t)
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
0fd9dc |
term_dontaudit_use_console(hwclock_t)
|
|
Chris PeBenito |
0fd9dc |
term_use_unallocated_tty(hwclock_t)
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ttys(hwclock_t)
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ptys(hwclock_t)
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
d35c62 |
domain_use_wide_inherit_fd(hwclock_t)
|
|
Chris PeBenito |
d35c62 |
|
|
Chris PeBenito |
c9428d |
init_use_fd(hwclock_t)
|
|
Chris PeBenito |
c9428d |
init_use_script_pty(hwclock_t)
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
139520 |
files_list_etc(hwclock_t)
|
|
Chris PeBenito |
3b857e |
# for when /usr is not mounted:
|
|
Chris PeBenito |
c9428d |
files_dontaudit_search_isid_type_dir(hwclock_t)
|
|
Chris PeBenito |
d490eb |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so(hwclock_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs(hwclock_t)
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(hwclock_t)
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
2274f9 |
miscfiles_read_localization(hwclock_t)
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
254bbc |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
0fd9dc |
term_dontaudit_use_unallocated_tty(hwclock_t)
|
|
Chris PeBenito |
31908b |
term_dontaudit_use_generic_pty(hwclock_t)
|
|
Chris PeBenito |
c9428d |
files_dontaudit_read_root_file(hwclock_t)
|
|
Chris PeBenito |
2274f9 |
')
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
4483ee |
optional_policy(`apm.te',`
|
|
Chris PeBenito |
4483ee |
apm_append_log(hwclock_t)
|
|
Chris PeBenito |
4483ee |
apm_rw_stream_socket(hwclock_t)
|
|
Chris PeBenito |
4483ee |
')
|
|
Chris PeBenito |
4483ee |
|
|
Chris PeBenito |
ae9e27 |
optional_policy(`selinuxutil.te',`
|
|
Chris PeBenito |
8fd367 |
seutil_sigchld_newrole(hwclock_t)
|
|
Chris PeBenito |
2274f9 |
')
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
2274f9 |
optional_policy(`udev.te', `
|
|
Chris PeBenito |
c9428d |
udev_read_db(hwclock_t)
|
|
Chris PeBenito |
2274f9 |
')
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
daa0e0 |
optional_policy(`userdomain.te',`
|
|
Chris PeBenito |
c9428d |
userdom_dontaudit_use_unpriv_user_fd(hwclock_t)
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
2274f9 |
ifdef(`TODO',`
|
|
Chris PeBenito |
2274f9 |
optional_policy(`rhgb.te', `
|
|
Chris PeBenito |
ab940a |
rhgb_domain(hwclock_t)
|
|
Chris PeBenito |
2274f9 |
')
|
|
Chris PeBenito |
2274f9 |
|
|
Chris PeBenito |
2274f9 |
optional_policy(`gnome-pty-helper.te', `allow hwclock_t sysadm_gph_t:fd use;')
|
|
Chris PeBenito |
2274f9 |
') dnl end TODO
|