2005-05-23 15:50:12 +00:00
|
|
|
## <summary>Policy for SELinux policy and userland applications.</summary>
|
2005-04-20 19:07:16 +00:00
|
|
|
|
2005-05-02 18:18:45 +00:00
|
|
|
#######################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute checkpolicy in the checkpolicy domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_domtrans_checkpolicy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type checkpolicy_t, checkpolicy_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_bin($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
domtrans_pattern($1, checkpolicy_exec_t, checkpolicy_t)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute checkpolicy in the checkpolicy domain, and
|
|
|
|
## allow the specified role the checkpolicy domain,
|
|
|
|
## and use the caller's terminal.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-19 21:06:06 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_run_checkpolicy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type checkpolicy_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-02-02 21:08:12 +00:00
|
|
|
seutil_domtrans_checkpolicy($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types checkpolicy_t;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute checkpolicy in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_exec_checkpolicy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type checkpolicy_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_bin($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
can_exec($1, checkpolicy_exec_t)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute load_policy in the load_policy domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_domtrans_loadpolicy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type load_policy_t, load_policy_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
domtrans_pattern($1, load_policy_exec_t, load_policy_t)
|
2010-08-30 15:37:02 +00:00
|
|
|
|
|
|
|
ifdef(`hide_broken_symptoms', `
|
|
|
|
dontaudit load_policy_t $1:socket_class_set { read write };
|
|
|
|
')
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute load_policy in the load_policy domain, and
|
|
|
|
## allow the specified role the load_policy domain,
|
|
|
|
## and use the caller's terminal.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-19 21:06:06 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_run_loadpolicy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type load_policy_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-02-02 21:08:12 +00:00
|
|
|
seutil_domtrans_loadpolicy($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types load_policy_t;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute load_policy in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_exec_loadpolicy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type load_policy_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
can_exec($1, load_policy_exec_t)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read the load_policy program file.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_read_loadpolicy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type load_policy_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 load_policy_exec_t:file read_file_perms;
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2008-11-05 16:10:46 +00:00
|
|
|
## Execute newrole in the newole domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_domtrans_newrole',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type newrole_t, newrole_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_bin($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
domtrans_pattern($1, newrole_exec_t, newrole_t)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute newrole in the newrole domain, and
|
|
|
|
## allow the specified role the newrole domain,
|
|
|
|
## and use the caller's terminal.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-19 21:06:06 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_run_newrole',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type newrole_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-14 20:48:34 +00:00
|
|
|
seutil_domtrans_newrole($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types newrole_t;
|
2007-11-28 19:06:07 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
auth_run_upd_passwd(newrole_t, $2)
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute newrole in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_exec_newrole',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type newrole_t, newrole_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_bin($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
can_exec($1, newrole_exec_t)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Do not audit the caller attempts to send
|
|
|
|
## a signal to newrole.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`seutil_dontaudit_signal_newrole',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type newrole_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 newrole_t:process signal;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Send a SIGCHLD signal to newrole.
|
|
|
|
## </summary>
|
2010-03-03 19:16:22 +00:00
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Allow the specified domain to send a SIGCHLD
|
|
|
|
## signal to newrole. This signal is automatically
|
|
|
|
## sent from a process that is terminating to
|
|
|
|
## its parent. This may be needed by domains
|
|
|
|
## that are executed from newrole.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
2006-05-10 18:09:08 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2010-03-03 19:16:22 +00:00
|
|
|
## <infoflow type="write" weight="1"/>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-29 14:26:41 +00:00
|
|
|
interface(`seutil_sigchld_newrole',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type newrole_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 newrole_t:process sigchld;
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Inherit and use newrole file descriptors.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-02 21:01:31 +00:00
|
|
|
#
|
2006-02-20 21:33:25 +00:00
|
|
|
interface(`seutil_use_newrole_fds',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type newrole_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 newrole_t:fd use;
|
2005-05-02 21:01:31 +00:00
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to inherit and use
|
|
|
|
## newrole file descriptors.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_dontaudit_use_newrole_fds',`
|
|
|
|
gen_require(`
|
|
|
|
type newrole_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 newrole_t:fd use;
|
|
|
|
')
|
|
|
|
|
2005-05-02 18:18:45 +00:00
|
|
|
#######################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2007-05-11 17:10:43 +00:00
|
|
|
## Execute restorecon in the restorecon domain. (Deprecated)
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_domtrans_restorecon',`
|
2007-05-11 17:10:43 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated, please use seutil_domtrans_setfiles() instead.')
|
|
|
|
seutil_domtrans_setfiles($1)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute restorecon in the restorecon domain, and
|
|
|
|
## allow the specified role the restorecon domain,
|
2007-05-11 17:10:43 +00:00
|
|
|
## and use the caller's terminal. (Deprecated)
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-19 21:06:06 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_run_restorecon',`
|
2007-05-11 17:10:43 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated, please use seutil_run_setfiles() instead.')
|
2008-11-05 16:10:46 +00:00
|
|
|
seutil_run_setfiles($1,$2)
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2007-05-11 17:10:43 +00:00
|
|
|
## Execute restorecon in the caller domain. (Deprecated)
|
2006-05-10 18:09:08 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_exec_restorecon',`
|
2007-05-11 17:10:43 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated, please use seutil_exec_setfiles() instead.')
|
|
|
|
seutil_exec_setfiles($1)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute restorecond in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`seutil_exec_restorecond',`
|
|
|
|
gen_require(`
|
|
|
|
type restorecond_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
can_exec($1, restorecond_exec_t)
|
|
|
|
')
|
|
|
|
|
2005-05-18 16:03:54 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute run_init in the run_init domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-18 16:03:54 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_domtrans_runinit',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type run_init_t, run_init_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
domtrans_pattern($1, run_init_exec_t, run_init_t)
|
2005-05-18 16:03:54 +00:00
|
|
|
')
|
|
|
|
|
2006-02-21 15:57:49 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute init scripts in the run_init domain.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Execute init scripts in the run_init domain.
|
|
|
|
## This is used for the Gentoo integrated run_init.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-21 15:57:49 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_init_script_domtrans_runinit',`
|
|
|
|
gen_require(`
|
|
|
|
type run_init_t;
|
|
|
|
')
|
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
init_script_file_domtrans($1, run_init_t)
|
2006-02-21 15:57:49 +00:00
|
|
|
|
|
|
|
allow run_init_t $1:fd use;
|
|
|
|
allow run_init_t $1:fifo_file rw_file_perms;
|
|
|
|
allow run_init_t $1:process sigchld;
|
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute run_init in the run_init domain, and
|
|
|
|
## allow the specified role the run_init domain,
|
|
|
|
## and use the caller's terminal.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-19 21:06:06 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_run_runinit',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type run_init_t;
|
2006-01-19 14:17:26 +00:00
|
|
|
role system_r;
|
2005-06-17 17:59:26 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
auth_run_chk_passwd(run_init_t, $2)
|
2005-06-14 20:48:34 +00:00
|
|
|
seutil_domtrans_runinit($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types run_init_t;
|
2008-11-05 16:10:46 +00:00
|
|
|
|
2006-01-19 14:17:26 +00:00
|
|
|
allow $2 system_r;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2006-02-21 15:57:49 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute init scripts in the run_init domain, and
|
|
|
|
## allow the specified role the run_init domain,
|
|
|
|
## and use the caller's terminal.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Execute init scripts in the run_init domain, and
|
|
|
|
## allow the specified role the run_init domain,
|
|
|
|
## and use the caller's terminal.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## This is used for the Gentoo integrated run_init.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-21 15:57:49 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-21 15:57:49 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_init_script_run_runinit',`
|
|
|
|
gen_require(`
|
|
|
|
type run_init_t;
|
|
|
|
role system_r;
|
|
|
|
')
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
auth_run_chk_passwd(run_init_t, $2)
|
2006-02-21 15:57:49 +00:00
|
|
|
seutil_init_script_domtrans_runinit($1)
|
|
|
|
role $2 types run_init_t;
|
2008-11-05 16:10:46 +00:00
|
|
|
|
2006-02-21 15:57:49 +00:00
|
|
|
allow $2 system_r;
|
|
|
|
')
|
|
|
|
|
2005-05-18 16:03:54 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Inherit and use run_init file descriptors.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-18 16:03:54 +00:00
|
|
|
#
|
2006-02-20 21:33:25 +00:00
|
|
|
interface(`seutil_use_runinit_fds',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type run_init_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 run_init_t:fd use;
|
2005-05-18 16:03:54 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute setfiles in the setfiles domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_domtrans_setfiles',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type setfiles_t, setfiles_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
domtrans_pattern($1, setfiles_exec_t, setfiles_t)
|
2010-08-30 15:15:53 +00:00
|
|
|
|
|
|
|
ifdef(`hide_broken_symptoms', `
|
2010-08-30 15:37:02 +00:00
|
|
|
dontaudit setfiles_t $1:socket_class_set { read write };
|
2010-08-30 15:15:53 +00:00
|
|
|
')
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute setfiles in the setfiles domain, and
|
|
|
|
## allow the specified role the setfiles domain,
|
|
|
|
## and use the caller's terminal.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-19 21:06:06 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_run_setfiles',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type setfiles_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-14 20:48:34 +00:00
|
|
|
seutil_domtrans_setfiles($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types setfiles_t;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute setfiles in the setfiles domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_domtrans_setfiles_mac',`
|
|
|
|
gen_require(`
|
|
|
|
type setfiles_mac_t, setfiles_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
domtrans_pattern($1, setfiles_exec_t, setfiles_mac_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute setfiles in the setfiles_mac domain, and
|
|
|
|
## allow the specified role the setfiles_mac domain,
|
|
|
|
## and use the caller's terminal.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## The role to be allowed the setfiles_mac domain.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`seutil_run_setfiles_mac',`
|
|
|
|
gen_require(`
|
|
|
|
type setfiles_mac_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
seutil_domtrans_setfiles_mac($1)
|
|
|
|
role $2 types setfiles_mac_t;
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute setfiles in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-02 18:18:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_exec_setfiles',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type setfiles_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_usr($1)
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
can_exec($1, setfiles_exec_t)
|
2005-05-02 18:18:45 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-07-11 19:02:50 +00:00
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search the SELinux
|
|
|
|
## configuration directory (/etc/selinux).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_dontaudit_search_config',`
|
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t;
|
|
|
|
')
|
|
|
|
|
2008-11-04 14:37:05 +00:00
|
|
|
dontaudit $1 selinux_config_t:dir search_dir_perms;
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-09-16 13:36:26 +00:00
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read the SELinux
|
|
|
|
## userland configuration (/etc/selinux).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-09-16 13:36:26 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-16 13:36:26 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_dontaudit_read_config',`
|
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t;
|
|
|
|
')
|
|
|
|
|
2008-11-04 14:37:05 +00:00
|
|
|
dontaudit $1 selinux_config_t:dir search_dir_perms;
|
|
|
|
dontaudit $1 selinux_config_t:file read_file_perms;
|
2005-09-16 13:36:26 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Read the general SELinux configuration files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_read_config',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 selinux_config_t:dir list_dir_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
read_files_pattern($1, selinux_config_t, selinux_config_t)
|
|
|
|
read_lnk_files_pattern($1, selinux_config_t, selinux_config_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2006-10-25 20:48:04 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the general SELinux configuration files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`seutil_rw_config',`
|
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
|
|
|
allow $1 selinux_config_t:dir list_dir_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
rw_files_pattern($1, selinux_config_t, selinux_config_t)
|
2006-10-25 20:48:04 +00:00
|
|
|
')
|
|
|
|
|
2006-03-23 19:19:38 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete
|
2007-11-16 15:39:55 +00:00
|
|
|
## the general selinux configuration files. (Deprecated)
|
2006-03-23 19:19:38 +00:00
|
|
|
## </summary>
|
2007-11-16 15:39:55 +00:00
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Create, read, write, and delete
|
|
|
|
## the general selinux configuration files.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## This interface has been deprecated, please
|
|
|
|
## use the seutil_manage_config() interface instead.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
2006-03-23 19:19:38 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-03-23 19:19:38 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2006-03-23 19:19:38 +00:00
|
|
|
#
|
|
|
|
interface(`seutil_manage_selinux_config',`
|
2008-12-03 18:33:19 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated. Please use seutil_manage_config() instead.')
|
2007-11-16 15:39:55 +00:00
|
|
|
seutil_manage_config($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete
|
|
|
|
## the general selinux configuration files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`seutil_manage_config',`
|
2006-03-23 19:19:38 +00:00
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2010-08-26 13:41:21 +00:00
|
|
|
manage_dirs_pattern($1, selinux_config_t, selinux_config_t)
|
2009-06-26 14:40:13 +00:00
|
|
|
manage_files_pattern($1, selinux_config_t, selinux_config_t)
|
|
|
|
read_lnk_files_pattern($1, selinux_config_t, selinux_config_t)
|
2006-03-23 19:19:38 +00:00
|
|
|
')
|
|
|
|
|
2006-10-27 13:55:35 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete
|
|
|
|
## the general selinux configuration files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`seutil_manage_config_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
|
|
|
allow $1 selinux_config_t:dir manage_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-06-29 20:53:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search the policy directory with default_context files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-29 20:53:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_search_default_contexts',`
|
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, default_context_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
search_dirs_pattern($1, selinux_config_t, default_context_t)
|
2005-06-29 20:53:53 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Read the default_contexts files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_read_default_contexts',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, default_context_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2006-08-18 14:01:48 +00:00
|
|
|
allow $1 selinux_config_t:dir search_dir_perms;
|
|
|
|
allow $1 default_context_t:dir list_dir_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
read_files_pattern($1, default_context_t, default_context_t)
|
2006-08-18 14:01:48 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete the default_contexts files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_manage_default_contexts',`
|
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, default_context_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
|
|
|
allow $1 selinux_config_t:dir search_dir_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
manage_files_pattern($1, default_context_t, default_context_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 18:59:01 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Read the file_contexts files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-04-28 18:59:01 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`seutil_read_file_contexts',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
2006-12-12 20:08:08 +00:00
|
|
|
type selinux_config_t, default_context_t, file_context_t;
|
2005-06-17 17:59:26 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 { selinux_config_t default_context_t }:dir search_dir_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
read_files_pattern($1, file_context_t, file_context_t)
|
2005-04-28 18:59:01 +00:00
|
|
|
')
|
|
|
|
|
2008-10-09 14:01:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read the file_contexts files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain to not audit.
|
2008-10-09 14:01:53 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`seutil_dontaudit_read_file_contexts',`
|
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, default_context_t, file_context_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 { selinux_config_t default_context_t file_context_t }:dir search_dir_perms;
|
|
|
|
dontaudit $1 file_context_t:file read_file_perms;
|
|
|
|
')
|
|
|
|
|
2006-02-16 19:32:13 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the file_contexts files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_rw_file_contexts',`
|
|
|
|
gen_require(`
|
2008-05-15 13:10:34 +00:00
|
|
|
type selinux_config_t, file_context_t, default_context_t;
|
2006-02-16 19:32:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 { selinux_config_t default_context_t }:dir search_dir_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
rw_files_pattern($1, file_context_t, file_context_t)
|
2006-02-16 19:32:13 +00:00
|
|
|
')
|
|
|
|
|
2006-03-29 19:18:00 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete the file_contexts files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2006-03-29 19:18:00 +00:00
|
|
|
#
|
|
|
|
interface(`seutil_manage_file_contexts',`
|
|
|
|
gen_require(`
|
2008-05-15 13:10:34 +00:00
|
|
|
type selinux_config_t, file_context_t, default_context_t;
|
2006-03-29 19:18:00 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2006-08-18 14:01:48 +00:00
|
|
|
allow $1 { selinux_config_t default_context_t }:dir search_dir_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
manage_files_pattern($1, file_context_t, file_context_t)
|
2006-03-29 19:18:00 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Read the SELinux binary policy.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_read_bin_policy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, policy_config_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 selinux_config_t:dir search_dir_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
read_files_pattern($1, policy_config_t, policy_config_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create the SELinux binary policy.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_create_bin_policy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
2005-10-24 15:10:03 +00:00
|
|
|
# attribute can_write_binary_policy;
|
2005-06-17 17:59:26 +00:00
|
|
|
type selinux_config_t, policy_config_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 selinux_config_t:dir search_dir_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
create_files_pattern($1, policy_config_t, policy_config_t)
|
|
|
|
write_files_pattern($1, policy_config_t, policy_config_t)
|
2005-10-24 15:10:03 +00:00
|
|
|
# typeattribute $1 can_write_binary_policy;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-25 20:58:21 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allow the caller to relabel a file to the binary policy type.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-25 20:58:21 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_relabelto_bin_policy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute can_relabelto_binary_policy;
|
|
|
|
type policy_config_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 policy_config_t:file relabelto;
|
|
|
|
typeattribute $1 can_relabelto_binary_policy;
|
2005-05-25 20:58:21 +00:00
|
|
|
')
|
|
|
|
|
2005-05-18 13:21:28 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete the SELinux
|
|
|
|
## binary policy.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-18 13:21:28 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_manage_bin_policy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute can_write_binary_policy;
|
|
|
|
type selinux_config_t, policy_config_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 selinux_config_t:dir search_dir_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
manage_files_pattern($1, policy_config_t, policy_config_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 can_write_binary_policy;
|
2005-05-18 13:21:28 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Read SELinux policy source files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-18 13:21:28 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_read_src_policy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, policy_src_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
list_dirs_pattern($1, selinux_config_t, policy_src_t)
|
|
|
|
read_files_pattern($1, policy_src_t, policy_src_t)
|
2005-05-18 13:21:28 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete SELinux
|
|
|
|
## policy source files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-18 13:21:28 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`seutil_manage_src_policy',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, policy_src_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 selinux_config_t:dir search_dir_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
manage_dirs_pattern($1, policy_src_t, policy_src_t)
|
|
|
|
manage_files_pattern($1, policy_src_t, policy_src_t)
|
2005-05-18 13:21:28 +00:00
|
|
|
')
|
2006-02-22 21:21:26 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to run semanage.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to transition.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_domtrans_semanage',`
|
|
|
|
gen_require(`
|
|
|
|
type semanage_t, semanage_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_bin($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
domtrans_pattern($1, semanage_exec_t, semanage_t)
|
2010-08-30 15:37:02 +00:00
|
|
|
|
|
|
|
ifdef(`hide_broken_symptoms', `
|
|
|
|
dontaudit semanage_t $1:socket_class_set { read write };
|
|
|
|
')
|
2006-02-22 21:21:26 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to run setsebool.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to transition.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_domtrans_setsebool',`
|
|
|
|
gen_require(`
|
|
|
|
type setsebool_t, setsebool_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_usr($1)
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
domtrans_pattern($1, setsebool_exec_t, setsebool_t)
|
|
|
|
')
|
|
|
|
|
2006-02-22 21:21:26 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute semanage in the semanage domain, and
|
|
|
|
## allow the specified role the semanage domain,
|
|
|
|
## and use the caller's terminal.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-22 21:21:26 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-22 21:21:26 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2006-02-22 21:21:26 +00:00
|
|
|
#
|
|
|
|
interface(`seutil_run_semanage',`
|
|
|
|
gen_require(`
|
|
|
|
type semanage_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
seutil_domtrans_semanage($1)
|
2008-11-05 16:10:46 +00:00
|
|
|
seutil_run_setfiles(semanage_t, $2)
|
|
|
|
seutil_run_loadpolicy(semanage_t, $2)
|
2006-02-22 21:21:26 +00:00
|
|
|
role $2 types semanage_t;
|
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute setsebool in the semanage domain, and
|
|
|
|
## allow the specified role the semanage domain,
|
|
|
|
## and use the caller's terminal.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## The role to be allowed the setsebool domain.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`seutil_run_setsebool',`
|
|
|
|
gen_require(`
|
|
|
|
type semanage_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
seutil_domtrans_setsebool($1)
|
|
|
|
role $2 types setsebool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Full management of the semanage
|
|
|
|
## module store.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_read_module_store',`
|
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, semanage_store_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
|
|
|
list_dirs_pattern($1, selinux_config_t, semanage_store_t)
|
|
|
|
read_files_pattern($1, semanage_store_t, semanage_store_t)
|
|
|
|
')
|
|
|
|
|
2006-02-22 21:21:26 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Full management of the semanage
|
|
|
|
## module store.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_manage_module_store',`
|
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, semanage_store_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
manage_dirs_pattern($1, selinux_config_t, semanage_store_t)
|
|
|
|
manage_files_pattern($1, semanage_store_t, semanage_store_t)
|
|
|
|
filetrans_pattern($1, selinux_config_t, semanage_store_t, dir)
|
2006-02-22 21:21:26 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Get read lock on module store
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-22 21:21:26 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_get_semanage_read_lock',`
|
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, semanage_read_lock_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
rw_files_pattern($1, selinux_config_t, semanage_read_lock_t)
|
2006-02-22 21:21:26 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Get trans lock on module store
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2006-05-10 18:09:08 +00:00
|
|
|
## Domain allowed access.
|
2006-02-22 21:21:26 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_get_semanage_trans_lock',`
|
|
|
|
gen_require(`
|
|
|
|
type selinux_config_t, semanage_trans_lock_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2009-06-26 14:40:13 +00:00
|
|
|
rw_files_pattern($1, selinux_config_t, semanage_trans_lock_t)
|
2006-02-22 21:21:26 +00:00
|
|
|
')
|
2007-11-16 14:58:17 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## SELinux-enabled program access for
|
|
|
|
## libselinux-linked programs.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## SELinux-enabled programs are typically
|
|
|
|
## linked to the libselinux library. This
|
|
|
|
## interface will allow access required for
|
|
|
|
## the libselinux constructor to function.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_libselinux_linked',`
|
|
|
|
selinux_get_fs_mount($1)
|
|
|
|
seutil_read_config($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit SELinux-enabled program access for
|
|
|
|
## libselinux-linked programs.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## SELinux-enabled programs are typically
|
|
|
|
## linked to the libselinux library. This
|
|
|
|
## interface will dontaudit access required for
|
|
|
|
## the libselinux constructor to function.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## Generally this should not be used on anything
|
|
|
|
## but simple SELinux-enabled programs that do not
|
|
|
|
## rely on data initialized by the libselinux
|
|
|
|
## constructor.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain to not audit.
|
2007-11-16 14:58:17 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_dontaudit_libselinux_linked',`
|
|
|
|
selinux_dontaudit_get_fs_mount($1)
|
|
|
|
seutil_dontaudit_read_config($1)
|
|
|
|
')
|
2010-08-26 13:41:21 +00:00
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## All rules necessary to run semanage command
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_semanage_policy',`
|
|
|
|
gen_require(`
|
|
|
|
type semanage_tmp_t;
|
|
|
|
type policy_config_t;
|
|
|
|
')
|
|
|
|
allow $1 self:capability { dac_override sys_resource };
|
|
|
|
dontaudit $1 self:capability sys_tty_config;
|
|
|
|
allow $1 self:process signal;
|
|
|
|
allow $1 self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
allow $1 self:unix_dgram_socket create_socket_perms;
|
|
|
|
logging_send_audit_msgs($1)
|
|
|
|
|
|
|
|
# Running genhomedircon requires this for finding all users
|
|
|
|
auth_use_nsswitch($1)
|
|
|
|
|
|
|
|
allow $1 policy_config_t:file { read write };
|
|
|
|
|
|
|
|
allow $1 semanage_tmp_t:dir manage_dir_perms;
|
|
|
|
allow $1 semanage_tmp_t:file manage_file_perms;
|
|
|
|
files_tmp_filetrans($1, semanage_tmp_t, { file dir })
|
|
|
|
|
|
|
|
kernel_read_system_state($1)
|
|
|
|
kernel_read_kernel_sysctls($1)
|
|
|
|
|
|
|
|
corecmd_exec_bin($1)
|
|
|
|
corecmd_exec_shell($1)
|
|
|
|
|
|
|
|
dev_read_urand($1)
|
|
|
|
|
|
|
|
domain_use_interactive_fds($1)
|
|
|
|
|
|
|
|
files_read_etc_files($1)
|
|
|
|
files_read_etc_runtime_files($1)
|
|
|
|
files_read_usr_files($1)
|
|
|
|
files_list_pids($1)
|
|
|
|
fs_list_inotifyfs($1)
|
|
|
|
fs_getattr_all_fs($1)
|
|
|
|
|
|
|
|
mls_file_write_all_levels($1)
|
|
|
|
mls_file_read_all_levels($1)
|
|
|
|
|
|
|
|
selinux_getattr_fs($1)
|
|
|
|
selinux_validate_context($1)
|
|
|
|
selinux_get_enforce_mode($1)
|
|
|
|
|
|
|
|
term_use_all_terms($1)
|
|
|
|
|
|
|
|
locallogin_use_fds($1)
|
|
|
|
|
|
|
|
logging_send_syslog_msg($1)
|
|
|
|
|
|
|
|
miscfiles_read_localization($1)
|
|
|
|
|
|
|
|
seutil_search_default_contexts($1)
|
|
|
|
seutil_domtrans_loadpolicy($1)
|
|
|
|
seutil_read_config($1)
|
|
|
|
seutil_manage_bin_policy($1)
|
|
|
|
seutil_use_newrole_fds($1)
|
|
|
|
seutil_manage_module_store($1)
|
|
|
|
seutil_get_semanage_trans_lock($1)
|
|
|
|
seutil_get_semanage_read_lock($1)
|
|
|
|
|
|
|
|
userdom_dontaudit_write_user_home_content_files($1)
|
|
|
|
|
|
|
|
')
|
|
|
|
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## All rules necessary to run setfiles command
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`seutil_setfiles',`
|
|
|
|
|
|
|
|
allow $1 self:capability { dac_override dac_read_search fowner };
|
|
|
|
dontaudit $1 self:capability sys_tty_config;
|
|
|
|
allow $1 self:fifo_file rw_file_perms;
|
|
|
|
dontaudit $1 self:dir relabelfrom;
|
|
|
|
dontaudit $1 self:file relabelfrom;
|
|
|
|
dontaudit $1 self:lnk_file relabelfrom;
|
|
|
|
|
|
|
|
|
|
|
|
allow $1 { policy_src_t policy_config_t file_context_t default_context_t }:dir list_dir_perms;
|
|
|
|
allow $1 { policy_src_t policy_config_t file_context_t default_context_t }:file read_file_perms;
|
|
|
|
allow $1 { policy_src_t policy_config_t file_context_t default_context_t }:lnk_file { read_lnk_file_perms ioctl lock };
|
|
|
|
|
|
|
|
logging_send_audit_msgs($1)
|
|
|
|
|
|
|
|
kernel_read_system_state($1)
|
|
|
|
kernel_relabelfrom_unlabeled_dirs($1)
|
|
|
|
kernel_relabelfrom_unlabeled_files($1)
|
|
|
|
kernel_relabelfrom_unlabeled_symlinks($1)
|
|
|
|
kernel_relabelfrom_unlabeled_pipes($1)
|
|
|
|
kernel_relabelfrom_unlabeled_sockets($1)
|
|
|
|
kernel_use_fds($1)
|
|
|
|
kernel_rw_pipes($1)
|
|
|
|
kernel_rw_unix_dgram_sockets($1)
|
|
|
|
kernel_dontaudit_list_all_proc($1)
|
|
|
|
kernel_read_all_sysctls($1)
|
|
|
|
kernel_read_network_state_symlinks($1)
|
|
|
|
|
|
|
|
dev_relabel_all_dev_nodes($1)
|
|
|
|
|
|
|
|
domain_use_interactive_fds($1)
|
|
|
|
domain_read_all_domains_state($1)
|
|
|
|
|
|
|
|
files_read_etc_runtime_files($1)
|
|
|
|
files_read_etc_files($1)
|
|
|
|
files_list_all($1)
|
|
|
|
files_relabel_all_files($1)
|
|
|
|
files_list_isid_type_dirs($1)
|
|
|
|
files_read_isid_type_files($1)
|
|
|
|
files_dontaudit_read_all_symlinks($1)
|
|
|
|
|
|
|
|
fs_getattr_xattr_fs($1)
|
|
|
|
fs_list_all($1)
|
|
|
|
fs_getattr_all_files($1)
|
|
|
|
fs_search_auto_mountpoints($1)
|
|
|
|
fs_relabelfrom_noxattr_fs($1)
|
|
|
|
|
|
|
|
mls_file_read_all_levels($1)
|
|
|
|
mls_file_write_all_levels($1)
|
|
|
|
mls_file_upgrade($1)
|
|
|
|
mls_file_downgrade($1)
|
|
|
|
|
|
|
|
selinux_validate_context($1)
|
|
|
|
selinux_compute_access_vector($1)
|
|
|
|
selinux_compute_create_context($1)
|
|
|
|
selinux_compute_relabel_context($1)
|
|
|
|
selinux_compute_user_contexts($1)
|
|
|
|
|
|
|
|
term_use_all_terms($1)
|
|
|
|
|
|
|
|
# this is to satisfy the assertion:
|
|
|
|
auth_relabelto_shadow($1)
|
|
|
|
|
|
|
|
init_use_fds($1)
|
|
|
|
init_use_script_fds($1)
|
|
|
|
init_use_script_ptys($1)
|
|
|
|
init_exec_script_files($1)
|
|
|
|
|
|
|
|
logging_send_syslog_msg($1)
|
|
|
|
|
|
|
|
miscfiles_read_localization($1)
|
|
|
|
|
|
|
|
seutil_libselinux_linked($1)
|
|
|
|
|
|
|
|
userdom_use_all_users_fds($1)
|
|
|
|
# for config files in a home directory
|
|
|
|
userdom_read_user_home_content_files($1)
|
|
|
|
|
|
|
|
ifdef(`distro_debian',`
|
|
|
|
# udev tmpfs is populated with static device nodes
|
|
|
|
# and then relabeled afterwards; thus
|
|
|
|
# /dev/console has the tmpfs type
|
|
|
|
fs_rw_tmpfs_chr_files($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
ifdef(`distro_redhat',`
|
|
|
|
fs_rw_tmpfs_chr_files($1)
|
|
|
|
fs_rw_tmpfs_blk_files($1)
|
|
|
|
fs_relabel_tmpfs_blk_file($1)
|
|
|
|
fs_relabel_tmpfs_chr_file($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
ifdef(`distro_ubuntu',`
|
|
|
|
optional_policy(`
|
|
|
|
unconfined_domain($1)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
hotplug_use_fds($1)
|
|
|
|
')
|
|
|
|
')
|