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

165 lines
3.2 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>
## Domain allowed to transition.
## </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
')
2010-01-07 14:00:39 +00:00
########################################
## <summary>
## Execute ntp in the ntp domain, and
## allow the specified role the ntp domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
2010-01-07 14:00:39 +00:00
## </summary>
## </param>
## <param name="role">
## <summary>
## Role allowed access.
## </summary>
## </param>
## <rolecap/>
#
interface(`ntp_run',`
gen_require(`
type ntpd_t;
')
ntp_domtrans($1)
role $2 types ntpd_t;
')
2005-09-05 16:47:19 +00:00
########################################
## <summary>
## Execute ntp server in the ntpd domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </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
2009-06-02 14:28:40 +00:00
########################################
2010-01-07 14:00:39 +00:00
## <summary>
## Execute ntp server in the ntpd domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
2010-01-07 14:00:39 +00:00
## </summary>
## </param>
#
interface(`ntp_initrc_domtrans',`
gen_require(`
type ntpd_initrc_exec_t;
')
init_labeled_script_domtrans($1, ntpd_initrc_exec_t)
')
########################################
## <summary>
2009-06-26 14:40:13 +00:00
## Read and write ntpd shared memory.
2009-06-02 14:28:40 +00:00
## </summary>
## <param name="domain">
2009-06-26 14:40:13 +00:00
## <summary>
## Domain allowed access.
2009-06-26 14:40:13 +00:00
## </summary>
2009-06-02 14:28:40 +00:00
## </param>
#
2010-01-07 14:00:39 +00:00
interface(`ntp_rw_shm',`
2009-06-26 14:40:13 +00:00
gen_require(`
type ntpd_t, ntpd_tmpfs_t;
')
2009-06-02 14:28:40 +00:00
2009-06-26 14:40:13 +00:00
allow $1 ntpd_t:shm rw_shm_perms;
list_dirs_pattern($1, ntpd_tmpfs_t, ntpd_tmpfs_t)
rw_files_pattern($1, ntpd_tmpfs_t, ntpd_tmpfs_t)
read_lnk_files_pattern($1, ntpd_tmpfs_t, ntpd_tmpfs_t)
fs_search_tmpfs($1)
2009-06-02 14:28:40 +00:00
')
2008-10-08 15:50:03 +00:00
########################################
## <summary>
2010-01-07 14:00:39 +00:00
## All of the rules required to administrate
2008-10-08 15:50:03 +00:00
## 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;
Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Replace type and attributes statements by comma delimiters where possible. Syntax error. Squash me with 959aa527a5394d23b994ecf75347d2445106d0c4 Replace type and attributes statements by comma delimiters where possible. Syntax error. Squach me with 779a708452142d6e4ac2ba2a158f724782a03291 Replace type and attributes statements by comma delimiters where possible. Syntax error. Squash me with 89180ea115794aadddaa9b356ab1dfcdc9ff102
2010-09-20 10:09:09 +00:00
type ntpd_key_t, ntpd_var_run_t, ntpd_initrc_exec_t;
2008-10-08 15:50:03 +00:00
')
allow $1 ntpd_t:process { ptrace signal_perms };
2008-10-08 15:50:03 +00:00
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)
')