selinux-refpolicy/policy/modules/services/ntp.if

100 lines
2.0 KiB
Plaintext
Raw Normal View History

2005-09-05 16:47:19 +00:00
## <summary>Network time protocol daemon</summary>
2005-09-15 21:03:29 +00:00
########################################
## <summary>
## NTP stub interface. No access allowed.
## </summary>
2008-06-24 14:43:47 +00:00
## <param name="domain" unused="true">
## <summary>
2008-06-24 14:43:47 +00:00
## Domain allowed access.
## </summary>
2005-09-15 21:03:29 +00:00
## </param>
#
interface(`ntp_stub',`
2005-09-20 18:15:35 +00:00
gen_require(`
2005-09-15 21:03:29 +00:00
type ntpd_t;
')
')
2005-09-05 16:47:19 +00:00
########################################
## <summary>
## Execute ntp server in the ntpd domain.
## </summary>
## <param name="domain">
## <summary>
2005-09-05 16:47:19 +00:00
## The type of the process performing this action.
## </summary>
2005-09-05 16:47:19 +00:00
## </param>
#
interface(`ntp_domtrans',`
gen_require(`
type ntpd_t, ntpd_exec_t;
')
2007-03-23 23:24:59 +00:00
corecmd_search_bin($1)
domtrans_pattern($1, ntpd_exec_t, ntpd_t)
2005-09-05 16:47:19 +00:00
')
########################################
## <summary>
## Execute ntp server in the ntpd domain.
## </summary>
## <param name="domain">
## <summary>
2005-09-05 16:47:19 +00:00
## The type of the process performing this action.
## </summary>
2005-09-05 16:47:19 +00:00
## </param>
#
interface(`ntp_domtrans_ntpdate',`
gen_require(`
type ntpd_t, ntpdate_exec_t;
')
2007-03-23 23:24:59 +00:00
corecmd_search_bin($1)
domtrans_pattern($1, ntpdate_exec_t, ntpd_t)
2005-09-05 16:47:19 +00:00
')
2008-10-08 15:50:03 +00:00
########################################
## <summary>
## All of the rules required to administrate
## an ntp environment
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <param name="role">
## <summary>
## The role to be allowed to manage the ntp domain.
## </summary>
## </param>
## <rolecap/>
#
interface(`ntp_admin',`
gen_require(`
type ntpd_t, ntpd_tmp_t, ntpd_log_t;
2008-10-13 13:36:50 +00:00
type ntpd_key_t, ntpd_var_run_t;
2008-10-08 15:50:03 +00:00
type ntpd_initrc_exec_t;
')
allow $1 ntpd_t:process { ptrace signal_perms getattr };
ps_process_pattern($1, ntpd_t)
init_labeled_script_domtrans($1, ntpd_initrc_exec_t)
domain_system_change_exemption($1)
role_transition $2 ntpd_initrc_exec_t system_r;
allow $2 system_r;
admin_pattern($1, ntpd_key_t)
logging_list_logs($1)
admin_pattern($1, ntpd_log_t)
files_list_tmp($1)
admin_pattern($1, ntpd_tmp_t)
files_list_pids($1)
admin_pattern($1, ntpd_var_run_t)
')