2010-03-29 13:19:40 +00:00
|
|
|
## <summary>Kernel Samepage Merging (KSM) Tuning Daemon</summary>
|
2010-03-24 14:29:39 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to run ksmtuned.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
2010-09-20 09:48:51 +00:00
|
|
|
## <summary>
|
2010-03-24 14:29:39 +00:00
|
|
|
## Domain allowed to transition.
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
2010-09-20 09:48:51 +00:00
|
|
|
## </summary>
|
2010-03-24 14:29:39 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ksmtuned_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type ksmtuned_t, ksmtuned_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
domtrans_pattern($1, ksmtuned_exec_t, ksmtuned_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute ksmtuned server in the ksmtuned domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:03:19 +00:00
|
|
|
## Domain allowed to transition.
|
2010-03-24 14:29:39 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`ksmtuned_initrc_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type ksmtuned_initrc_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
init_labeled_script_domtrans($1, ksmtuned_initrc_exec_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-03-29 13:19:40 +00:00
|
|
|
## All of the rules required to administrate
|
2010-03-24 14:29:39 +00:00
|
|
|
## an ksmtuned environment
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`ksmtuned_admin',`
|
|
|
|
gen_require(`
|
2010-09-20 10:09:09 +00:00
|
|
|
type ksmtuned_t, ksmtuned_var_run_t, ksmtuned_initrc_exec_t;
|
2010-03-24 14:29:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 ksmtuned_t:process { ptrace signal_perms };
|
2010-08-26 13:41:21 +00:00
|
|
|
ps_process_pattern($1, ksmtuned_t)
|
2010-03-29 13:19:40 +00:00
|
|
|
|
2010-03-24 14:29:39 +00:00
|
|
|
files_list_pids($1)
|
|
|
|
admin_pattern($1, ksmtuned_var_run_t)
|
|
|
|
|
|
|
|
# Allow ksmtuned_t to restart the apache service
|
|
|
|
ksmtuned_initrc_domtrans($1)
|
|
|
|
domain_system_change_exemption($1)
|
|
|
|
role_transition $2 ksmtuned_initrc_exec_t system_r;
|
|
|
|
allow $2 system_r;
|
|
|
|
')
|