diff options
Diffstat (limited to 'policy/modules/services/clockspeed.if')
-rw-r--r-- | policy/modules/services/clockspeed.if | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/policy/modules/services/clockspeed.if b/policy/modules/services/clockspeed.if new file mode 100644 index 00000000..9d4c8923 --- /dev/null +++ b/policy/modules/services/clockspeed.if @@ -0,0 +1,53 @@ +## <summary>Clockspeed simple network time protocol client</summary> + +######################################## +## <summary> +## Execute clockspeed utilities in the clockspeed_cli domain. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`clockspeed_domtrans_cli',` + gen_require(` + type clockspeed_cli_t, clockspeed_cli_exec_t; + ') + + domain_auto_trans($1, clockspeed_cli_exec_t, clockspeed_cli_t) + allow clockspeed_cli_t $1:fd use; + allow clockspeed_cli_t $1:fifo_file { read write }; + allow clockspeed_cli_t $1:process sigchld; +') + +######################################## +## <summary> +## Allow the specified role the clockspeed_cli domain. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +## <param name="role"> +## <summary> +## The role to be allowed the clockspeed_cli domain. +## </summary> +## </param> +## <param name="terminal"> +## <summary> +## The type of the terminal allow the clockspeed_cli domain to use. +## </summary> +## </param> +# +template(`clockspeed_run_cli',` + gen_require(` + type clockspeed_cli_t; + ') + + role $2 types clockspeed_cli_t; + clockspeed_domtrans_cli($1) + allow clockspeed_cli_t $3:chr_file { getattr read write ioctl }; + +') |