Chris PeBenito 17de1b
## <summary>Policy for reading and setting the hardware clock.</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute hwclock in the clock domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`clock_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hwclock_t, hwclock_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	domtrans_pattern($1,hwclock_exec_t,hwclock_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute hwclock in the clock domain, and
Chris PeBenito 17de1b
##	allow the specified role the hwclock domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role to be allowed the clock domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`clock_run',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hwclock_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	clock_domtrans($1)
Chris PeBenito 17de1b
	role $2 types hwclock_t;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito ce6bf7
## <summary>
Chris PeBenito ce6bf7
## 	Execute hwclock in the caller domain.
Chris PeBenito ce6bf7
## </summary>
Chris PeBenito ce6bf7
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito ce6bf7
## 	The type of the process performing this action.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito ce6bf7
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`clock_exec',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type hwclock_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	can_exec($1,hwclock_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito ce6bf7
## <summary>
Chris PeBenito ce6bf7
##	Do not audit attempts to write clock drift adjustments.
Chris PeBenito ce6bf7
## </summary>
Chris PeBenito ce6bf7
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito ce6bf7
##	Domain to not audit.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito ce6bf7
## </param>
Chris PeBenito ce6bf7
#
Chris PeBenito ce6bf7
interface(`clock_dontaudit_write_adjtime',`
Chris PeBenito ce6bf7
	gen_require(`
Chris PeBenito ce6bf7
		type adjtime_t;
Chris PeBenito ce6bf7
	')
Chris PeBenito ce6bf7
Chris PeBenito ce6bf7
	dontaudit $1 adjtime_t:file write;
Chris PeBenito ce6bf7
')
Chris PeBenito ce6bf7
Chris PeBenito ce6bf7
########################################
Chris PeBenito ce6bf7
## <summary>
Chris PeBenito ce6bf7
##	Read and write clock drift adjustments.
Chris PeBenito ce6bf7
## </summary>
Chris PeBenito ce6bf7
## <param name="domain">
Chris PeBenito ce6bf7
##	<summary>
Chris PeBenito ce6bf7
##	Domain allowed access.
Chris PeBenito ce6bf7
##	</summary>
Chris PeBenito ce6bf7
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`clock_rw_adjtime',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type adjtime_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 adjtime_t:file rw_file_perms;
Chris PeBenito 17de1b
	files_list_etc($1)
Chris PeBenito 17de1b
')