Chris PeBenito b2b38c
# Copyright (C) 2005 Tresys Technology, LLC
Chris PeBenito b2b38c
Chris PeBenito daa0e0
########################################
Chris PeBenito daa0e0
## <interface name="clock_transition">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute hwclock in the clock domain.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito 075c4f
#
Chris PeBenito 075c4f
define(`clock_transition',`
Chris PeBenito 075c4f
requires_block_template(`$0'_depend)
Chris PeBenito 075c4f
allow $1 hwclock_exec_t:file { getattr read execute };
Chris PeBenito 075c4f
allow $1 hwclock_t:process transition;
Chris PeBenito 075c4f
type_transition $1 hwclock_exec_t:file hwclock_t;
Chris PeBenito 075c4f
dontaudit $1 hwclock_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 075c4f
')
Chris PeBenito 075c4f
Chris PeBenito 075c4f
define(`clock_transition_depend',`
Chris PeBenito 075c4f
type hwclock_t, hwclock_exec_t;
Chris PeBenito 075c4f
class file { getattr read execute };
Chris PeBenito 075c4f
class process { transition noatsecure siginh rlimitinh };
Chris PeBenito 075c4f
')
Chris PeBenito 075c4f
Chris PeBenito daa0e0
########################################
Chris PeBenito daa0e0
## <interface name="clock_transition_add_role_use_terminal">
Chris PeBenito daa0e0
##	<description>
Chris PeBenito daa0e0
##		Execute hwclock in the clock domain, and
Chris PeBenito daa0e0
##		allow the specified role the hwclock domain.
Chris PeBenito daa0e0
##	</description>
Chris PeBenito daa0e0
##	<parameter name="domain">
Chris PeBenito daa0e0
##		The type of the process performing this action.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="role">
Chris PeBenito daa0e0
##		The role to be allowed the clock domain.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<parameter name="terminal">
Chris PeBenito daa0e0
##		The type of the terminal allow the clock domain to use.
Chris PeBenito daa0e0
##	</parameter>
Chris PeBenito daa0e0
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito daa0e0
#
Chris PeBenito daa0e0
define(`clock_transition_add_role_use_terminal',`
Chris PeBenito daa0e0
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
clock_transition($1)
Chris PeBenito daa0e0
role $2 types hwclock_t;
Chris PeBenito daa0e0
allow hwclock_t $3:chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
define(`clock_transition_add_role_use_terminal_depend',`
Chris PeBenito daa0e0
type hwclock_t;
Chris PeBenito daa0e0
class chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito 075c4f
#######################################
Chris PeBenito 075c4f
#
Chris PeBenito 075c4f
# clock_execute(domain)
Chris PeBenito 075c4f
#
Chris PeBenito 075c4f
define(`clock_execute',`
Chris PeBenito 075c4f
requires_block_template(`$0'_depend)
Chris PeBenito 075c4f
allow $1 hwclock_exec_t:file { getattr read execute execute_no_trans };
Chris PeBenito 075c4f
')
Chris PeBenito 075c4f
Chris PeBenito 075c4f
define(`clock_execute_depend',`
Chris PeBenito 075c4f
type hwclock_exec_t;
Chris PeBenito 075c4f
class file { getattr read execute execute_no_trans };
Chris PeBenito 075c4f
')
Chris PeBenito 075c4f
Chris PeBenito 075c4f
#######################################
Chris PeBenito 075c4f
#
Chris PeBenito b2b38c
# clock_modify_drift_records(domain)
Chris PeBenito b2b38c
#
Chris PeBenito b2b38c
define(`clock_modify_drift_records',`
Chris PeBenito b2b38c
requires_block_template(`$0'_depend)
Chris PeBenito b2b38c
allow $1 adjtime_t:file { getattr read write ioctl lock append };
Chris PeBenito 3ec805
files_read_general_system_config_directory($1)
Chris PeBenito b2b38c
')
Chris PeBenito b2b38c
Chris PeBenito b2b38c
define(`clock_modify_drift_records_depend',`
Chris PeBenito b2b38c
type adjtime_t;
Chris PeBenito b2b38c
class file { getattr read write ioctl lock append };
Chris PeBenito b2b38c
')