2005-10-14 20:00:07 +00:00
|
|
|
## <summary>Point to Point Protocol daemon creates links in ppp networks</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Use PPP file discriptors.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-14 20:00:07 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-14 20:00:07 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-03-02 23:41:11 +00:00
|
|
|
interface(`ppp_use_fds',`
|
2005-10-14 20:00:07 +00:00
|
|
|
gen_require(`
|
|
|
|
type pppd_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 pppd_t:fd use;
|
|
|
|
')
|
|
|
|
|
2005-11-08 22:00:30 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to inherit
|
|
|
|
## and use PPP file discriptors.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-03-02 23:41:11 +00:00
|
|
|
interface(`ppp_dontaudit_use_fds',`
|
2005-11-08 22:00:30 +00:00
|
|
|
gen_require(`
|
|
|
|
type pppd_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 pppd_t:fd use;
|
|
|
|
')
|
|
|
|
|
2005-10-14 20:00:07 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2005-12-05 17:11:14 +00:00
|
|
|
## Send a SIGCHLD signal to PPP.
|
2005-10-14 20:00:07 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-14 20:00:07 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-14 20:00:07 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ppp_sigchld',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_t;
|
|
|
|
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 pppd_t:process sigchld;
|
|
|
|
')
|
|
|
|
|
2009-07-20 19:41:19 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Send ppp a kill signal
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
#
|
|
|
|
interface(`ppp_kill',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 pppd_t:process sigkill;
|
|
|
|
')
|
|
|
|
|
2005-10-14 20:00:07 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Send a generic signal to PPP.
|
2005-10-14 20:00:07 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-14 20:00:07 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-14 20:00:07 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ppp_signal',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 pppd_t:process signal;
|
|
|
|
')
|
|
|
|
|
2008-09-11 13:35:06 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Send a generic signull to PPP.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ppp_signull',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 pppd_t:process signull;
|
|
|
|
')
|
|
|
|
|
2005-10-14 20:00:07 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute domain in the ppp domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:03:19 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-14 20:00:07 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ppp_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_t, pppd_exec_t;
|
|
|
|
')
|
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
domtrans_pattern($1, pppd_exec_t, pppd_t)
|
2005-10-14 20:00:07 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Conditionally execute ppp daemon on behalf of a user or staff type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:03:19 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-14 20:00:07 +00:00
|
|
|
## </param>
|
2008-05-15 13:10:34 +00:00
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## The role to allow the ppp domain.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-10-14 20:00:07 +00:00
|
|
|
#
|
|
|
|
interface(`ppp_run_cond',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
role $2 types pppd_t;
|
|
|
|
|
|
|
|
tunable_policy(`pppd_for_user',`
|
|
|
|
ppp_domtrans($1)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Unconditionally execute ppp daemon on behalf of a user or staff type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:03:19 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-14 20:00:07 +00:00
|
|
|
## </param>
|
2008-05-15 13:10:34 +00:00
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## The role to allow the ppp domain.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-10-14 20:00:07 +00:00
|
|
|
#
|
|
|
|
interface(`ppp_run',`
|
|
|
|
gen_require(`
|
2010-01-15 20:46:07 +00:00
|
|
|
type pppd_t, pptp_t;
|
2005-10-14 20:00:07 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
ppp_domtrans($1)
|
|
|
|
role $2 types pppd_t;
|
2010-01-15 20:46:07 +00:00
|
|
|
role $2 types pptp_t;
|
2010-04-05 18:38:30 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
ddclient_run(pppd_t, $2)
|
|
|
|
')
|
2005-10-14 20:00:07 +00:00
|
|
|
')
|
2006-05-05 18:51:42 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute domain in the ppp caller.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ppp_exec',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_exec_t;
|
|
|
|
')
|
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2006-05-05 18:51:42 +00:00
|
|
|
can_exec($1, pppd_exec_t)
|
|
|
|
')
|
|
|
|
|
2007-11-15 20:10:26 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read ppp configuration files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ppp_read_config',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_etc_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
read_files_pattern($1, pppd_etc_t, pppd_etc_t)
|
|
|
|
files_search_etc($1)
|
|
|
|
')
|
|
|
|
|
2006-05-05 18:51:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read PPP-writable configuration files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ppp_read_rw_config',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_etc_t, pppd_etc_rw_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 pppd_etc_t:dir list_dir_perms;
|
2008-10-20 16:10:42 +00:00
|
|
|
allow $1 pppd_etc_rw_t:file read_file_perms;
|
2006-05-05 18:51:42 +00:00
|
|
|
files_search_etc($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read PPP secrets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ppp_read_secrets',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_etc_t, pppd_secret_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 pppd_etc_t:dir list_dir_perms;
|
2008-10-20 16:10:42 +00:00
|
|
|
allow $1 pppd_secret_t:file read_file_perms;
|
2006-05-05 18:51:42 +00:00
|
|
|
files_search_etc($1)
|
|
|
|
')
|
|
|
|
|
2006-09-22 17:14:35 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read PPP pid files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ppp_read_pid_files',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_var_run_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 pppd_var_run_t:file read_file_perms;
|
2006-09-22 17:14:35 +00:00
|
|
|
')
|
|
|
|
|
2006-05-05 18:51:42 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete PPP pid files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ppp_manage_pid_files',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_var_run_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 pppd_var_run_t:file manage_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete PPP pid files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ppp_pid_filetrans',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_var_run_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
files_pid_filetrans($1, pppd_var_run_t, file)
|
2006-05-05 18:51:42 +00:00
|
|
|
')
|
2008-02-07 16:37:47 +00:00
|
|
|
|
2009-07-20 19:41:19 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute ppp server in the ntpd domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:03:19 +00:00
|
|
|
## Domain allowed to transition.
|
2009-07-20 19:41:19 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ppp_initrc_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_initrc_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
init_labeled_script_domtrans($1, pppd_initrc_exec_t)
|
|
|
|
')
|
|
|
|
|
2008-02-07 16:37:47 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-04-05 18:38:30 +00:00
|
|
|
## All of the rules required to administrate
|
2008-02-07 16:37:47 +00:00
|
|
|
## an ppp environment
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`ppp_admin',`
|
|
|
|
gen_require(`
|
|
|
|
type pppd_t, pppd_tmp_t, pppd_log_t, pppd_lock_t;
|
2008-05-15 13:10:34 +00:00
|
|
|
type pppd_etc_t, pppd_secret_t;
|
|
|
|
type pppd_etc_rw_t, pppd_var_run_t;
|
2008-02-07 16:37:47 +00:00
|
|
|
|
|
|
|
type pptp_t, pptp_log_t, pptp_var_run_t;
|
2009-07-20 19:41:19 +00:00
|
|
|
type pppd_initrc_exec_t;
|
2008-02-07 16:37:47 +00:00
|
|
|
')
|
|
|
|
|
2010-09-15 11:37:04 +00:00
|
|
|
allow $1 pppd_t:process { ptrace signal_perms };
|
2008-02-07 16:37:47 +00:00
|
|
|
ps_process_pattern($1, pppd_t)
|
2008-10-17 15:52:39 +00:00
|
|
|
|
2009-07-20 19:41:19 +00:00
|
|
|
ppp_initrc_domtrans($1)
|
|
|
|
domain_system_change_exemption($1)
|
|
|
|
role_transition $2 pppd_initrc_exec_t system_r;
|
|
|
|
allow $2 system_r;
|
|
|
|
|
2008-02-07 16:37:47 +00:00
|
|
|
files_list_tmp($1)
|
2009-07-20 19:41:19 +00:00
|
|
|
admin_pattern($1, pppd_tmp_t)
|
2008-02-07 16:37:47 +00:00
|
|
|
|
|
|
|
logging_list_logs($1)
|
2009-07-20 19:41:19 +00:00
|
|
|
admin_pattern($1, pppd_log_t)
|
2008-02-07 16:37:47 +00:00
|
|
|
|
2009-07-20 19:41:19 +00:00
|
|
|
admin_pattern($1, pppd_lock_t)
|
2008-02-07 16:37:47 +00:00
|
|
|
|
|
|
|
files_list_etc($1)
|
2009-07-20 19:41:19 +00:00
|
|
|
admin_pattern($1, pppd_etc_t)
|
2008-02-07 16:37:47 +00:00
|
|
|
|
2009-07-20 19:41:19 +00:00
|
|
|
admin_pattern($1, pppd_etc_rw_t)
|
2008-02-07 16:37:47 +00:00
|
|
|
|
2009-07-20 19:41:19 +00:00
|
|
|
admin_pattern($1, pppd_secret_t)
|
2008-02-07 16:37:47 +00:00
|
|
|
|
|
|
|
files_list_pids($1)
|
2009-07-20 19:41:19 +00:00
|
|
|
admin_pattern($1, pppd_var_run_t)
|
2008-02-07 16:37:47 +00:00
|
|
|
|
2010-09-15 11:37:04 +00:00
|
|
|
allow $1 pptp_t:process { ptrace signal_perms };
|
2008-02-07 16:37:47 +00:00
|
|
|
ps_process_pattern($1, pptp_t)
|
|
|
|
|
2009-07-20 19:41:19 +00:00
|
|
|
admin_pattern($1, pptp_log_t)
|
2008-02-07 16:37:47 +00:00
|
|
|
|
2009-07-20 19:41:19 +00:00
|
|
|
admin_pattern($1, pptp_var_run_t)
|
2008-02-07 16:37:47 +00:00
|
|
|
')
|