selinux-policy/policy/modules/system/clock.if

101 lines
1.8 KiB
Plaintext
Raw Normal View History

2005-06-01 14:17:43 +00:00
## <summary>Policy for reading and setting the hardware clock.</summary>
2005-05-05 21:40:32 +00:00
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Execute hwclock in the clock domain.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-05-12 20:50:09 +00:00
#
interface(`clock_domtrans',`
2005-06-17 17:59:26 +00:00
gen_require(`
type hwclock_t, hwclock_exec_t;
')
2009-06-26 14:40:13 +00:00
domtrans_pattern($1, hwclock_exec_t, hwclock_t)
2005-05-12 20:50:09 +00:00
')
########################################
2005-08-11 17:46:39 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Execute hwclock in the clock domain, and
## allow the specified role the hwclock domain.
2005-08-11 17:46:39 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
## <param name="role">
## <summary>
## Role allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2006-09-06 22:07:25 +00:00
## <rolecap/>
#
interface(`clock_run',`
2005-06-17 17:59:26 +00:00
gen_require(`
type hwclock_t;
')
2005-06-13 17:35:46 +00:00
clock_domtrans($1)
role $2 types hwclock_t;
')
2005-06-07 22:36:07 +00:00
########################################
2006-08-28 02:46:20 +00:00
## <summary>
## Execute hwclock in the caller domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
2006-08-28 02:46:20 +00:00
## </param>
2005-05-12 20:50:09 +00:00
#
interface(`clock_exec',`
2005-06-17 17:59:26 +00:00
gen_require(`
type hwclock_exec_t;
')
2009-06-26 14:40:13 +00:00
can_exec($1, hwclock_exec_t)
2005-05-12 20:50:09 +00:00
')
2005-06-07 22:36:07 +00:00
########################################
2006-08-28 02:46:20 +00:00
## <summary>
## Do not audit attempts to write clock drift adjustments.
## </summary>
## <param name="domain">
## <summary>
2006-08-28 02:46:20 +00:00
## Domain to not audit.
## </summary>
2006-08-28 02:46:20 +00:00
## </param>
#
interface(`clock_dontaudit_write_adjtime',`
gen_require(`
type adjtime_t;
')
dontaudit $1 adjtime_t:file write;
')
########################################
## <summary>
## Read and write clock drift adjustments.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
2005-05-05 21:40:32 +00:00
#
interface(`clock_rw_adjtime',`
2005-06-17 17:59:26 +00:00
gen_require(`
type adjtime_t;
')
2005-06-08 13:41:05 +00:00
allow $1 adjtime_t:file rw_file_perms;
2005-06-17 17:59:26 +00:00
files_list_etc($1)
2005-05-05 21:40:32 +00:00
')