2005-05-23 15:48:45 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Core policy for shells, and generic programs
|
|
|
|
## in /bin, /sbin, /usr/bin, and /usr/sbin.
|
2005-05-23 15:48:45 +00:00
|
|
|
## </summary>
|
2005-08-30 14:41:52 +00:00
|
|
|
## <required val="true">
|
|
|
|
## Contains the base bin and sbin directory types
|
|
|
|
## which need to be searched for the kernel to
|
|
|
|
## run init.
|
|
|
|
## </required>
|
2005-04-20 19:07:16 +00:00
|
|
|
|
2006-04-19 21:43:02 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make the specified type usable for files
|
|
|
|
## that are exectuables, such as binary programs.
|
|
|
|
## This does not include shared libraries.
|
|
|
|
## </summary>
|
|
|
|
## <param name="type">
|
|
|
|
## <summary>
|
|
|
|
## Type to be used for files.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_executable_file',`
|
|
|
|
gen_require(`
|
|
|
|
attribute exec_type;
|
|
|
|
')
|
|
|
|
|
|
|
|
typeattribute $1 exec_type;
|
|
|
|
|
|
|
|
files_type($1)
|
|
|
|
')
|
|
|
|
|
2005-11-14 20:26:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2007-10-02 16:04:50 +00:00
|
|
|
## Create a aliased type to generic bin files. (Deprecated)
|
2005-11-14 20:26:41 +00:00
|
|
|
## </summary>
|
2005-11-15 18:47:20 +00:00
|
|
|
## <desc>
|
|
|
|
## <p>
|
2007-10-02 16:04:50 +00:00
|
|
|
## Create a aliased type to generic bin files. (Deprecated)
|
2005-11-15 18:47:20 +00:00
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## This is added to support targeted policy. Its
|
|
|
|
## use should be limited. It has no effect
|
|
|
|
## on the strict policy.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
2005-11-14 20:26:41 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-14 20:26:41 +00:00
|
|
|
## Alias type for bin_t.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-14 20:26:41 +00:00
|
|
|
## </param>
|
2006-05-10 18:09:08 +00:00
|
|
|
#
|
2005-11-14 20:26:41 +00:00
|
|
|
interface(`corecmd_bin_alias',`
|
2007-10-02 16:04:50 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated.')
|
2005-11-14 20:26:41 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 18:59:51 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make general progams in bin an entrypoint for
|
|
|
|
## the specified domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## The domain for which bin_t is an entrypoint.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-05-10 18:09:08 +00:00
|
|
|
#
|
2006-03-24 18:59:51 +00:00
|
|
|
interface(`corecmd_bin_entry_type',`
|
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
2009-06-26 14:40:13 +00:00
|
|
|
domain_entry_file($1, bin_t)
|
2006-03-24 18:59:51 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make general progams in sbin an entrypoint for
|
2007-03-23 23:24:59 +00:00
|
|
|
## the specified domain. (Deprecated)
|
2006-03-24 18:59:51 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## The domain for which sbin programs are an entrypoint.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-05-10 18:09:08 +00:00
|
|
|
#
|
2006-03-24 18:59:51 +00:00
|
|
|
interface(`corecmd_sbin_entry_type',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_bin_entry_type($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_bin_entry_type() instead.')
|
2006-03-24 18:59:51 +00:00
|
|
|
')
|
|
|
|
|
2005-08-11 17:46:39 +00:00
|
|
|
########################################
|
2005-06-27 18:37:33 +00:00
|
|
|
## <summary>
|
|
|
|
## Make the shell an entrypoint for the specified domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-27 18:37:33 +00:00
|
|
|
## The domain for which the shell is an entrypoint.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 18:37:33 +00:00
|
|
|
## </param>
|
2006-05-10 18:09:08 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corecmd_shell_entry_type',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type shell_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
domain_entry_file($1, shell_exec_t)
|
2005-04-28 19:50:58 +00:00
|
|
|
')
|
|
|
|
|
2005-05-12 20:50:09 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Search the contents of bin directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corecmd_search_bin',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
search_dirs_pattern($1, bin_t, bin_t)
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search the contents of bin directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain to not audit.
|
2007-03-23 23:24:59 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_dontaudit_search_bin',`
|
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 bin_t:dir search_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-05-12 20:50:09 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## List the contents of bin directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corecmd_list_bin',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, bin_t, bin_t)
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-09-29 19:03:51 +00:00
|
|
|
## Do not audit attempts to write bin directories.
|
2007-03-23 23:24:59 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain to not audit.
|
2007-03-23 23:24:59 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_dontaudit_write_bin_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 bin_t:dir write;
|
|
|
|
')
|
|
|
|
|
2010-09-29 19:03:51 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to write bin files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_dontaudit_write_bin_files',`
|
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 bin_t:file write;
|
|
|
|
')
|
|
|
|
|
2005-06-27 20:59:28 +00:00
|
|
|
########################################
|
2005-06-27 18:37:33 +00:00
|
|
|
## <summary>
|
|
|
|
## Get the attributes of files in bin directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 18:37:33 +00:00
|
|
|
## </param>
|
2005-07-11 19:02:50 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`corecmd_getattr_bin_files',`
|
2005-06-27 18:37:33 +00:00
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_files_pattern($1, bin_t, bin_t)
|
2005-06-27 18:37:33 +00:00
|
|
|
')
|
|
|
|
|
2008-05-15 13:10:34 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of files in bin directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_dontaudit_getattr_bin_files',`
|
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 bin_t:dir search_dir_perms;
|
|
|
|
dontaudit $1 bin_t:file getattr_file_perms;
|
|
|
|
')
|
|
|
|
|
2005-07-11 19:02:50 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read files in bin directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`corecmd_read_bin_files',`
|
2005-07-11 19:02:50 +00:00
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, bin_t, bin_t)
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
2005-06-27 20:59:28 +00:00
|
|
|
########################################
|
2005-06-27 18:37:33 +00:00
|
|
|
## <summary>
|
|
|
|
## Read symbolic links in bin directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 18:37:33 +00:00
|
|
|
## </param>
|
2005-07-11 19:02:50 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`corecmd_read_bin_symlinks',`
|
2005-06-27 18:37:33 +00:00
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, bin_t, bin_t)
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read pipes in bin directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`corecmd_read_bin_pipes',`
|
2005-07-11 19:02:50 +00:00
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_fifo_files_pattern($1, bin_t, bin_t)
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read named sockets in bin directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`corecmd_read_bin_sockets',`
|
2005-07-11 19:02:50 +00:00
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
2005-06-27 18:37:33 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_sock_files_pattern($1, bin_t, bin_t)
|
2005-06-27 18:37:33 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Execute generic programs in bin directories,
|
|
|
|
## in the caller domain.
|
|
|
|
## </summary>
|
2010-02-26 13:58:32 +00:00
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Allow the specified domain to execute generic programs
|
|
|
|
## in system bin directories (/bin, /sbin, /usr/bin,
|
|
|
|
## /usr/sbin) a without domain transition.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## Typically, this interface should be used when the domain
|
|
|
|
## executes general system progams within the privileges
|
|
|
|
## of the source domain. Some examples of these programs
|
|
|
|
## are ls, cp, sed, python, and tar. This does not include
|
|
|
|
## shells, such as bash.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## Related interface:
|
|
|
|
## </p>
|
|
|
|
## <ul>
|
|
|
|
## <li>corecmd_exec_shell()</li>
|
|
|
|
## </ul>
|
|
|
|
## </desc>
|
2006-05-10 18:09:08 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corecmd_exec_bin',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, bin_t, bin_t)
|
|
|
|
list_dirs_pattern($1, bin_t, bin_t)
|
|
|
|
can_exec($1, bin_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2006-01-11 23:20:28 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete bin files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-11 23:20:28 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-11 23:20:28 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_manage_bin_files',`
|
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, bin_t, bin_t)
|
2006-01-11 23:20:28 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel to and from the bin type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-11 23:20:28 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-11 23:20:28 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_relabel_bin_files',`
|
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
relabel_files_pattern($1, bin_t, bin_t)
|
2006-01-11 23:20:28 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Mmap a bin file as executable.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-11 23:20:28 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-11 23:20:28 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_mmap_bin_files',`
|
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
2008-10-20 16:10:42 +00:00
|
|
|
mmap_files_pattern($1, bin_t, bin_t)
|
2006-01-11 23:20:28 +00:00
|
|
|
')
|
|
|
|
|
2005-07-13 18:29:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a file in a bin directory
|
2006-01-18 16:40:04 +00:00
|
|
|
## in the specified domain but do not
|
|
|
|
## do it automatically. This is an explicit
|
|
|
|
## transition, requiring the caller to use setexeccon().
|
2005-07-13 18:29:08 +00:00
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Execute a file in a bin directory
|
|
|
|
## in the specified domain. This allows
|
|
|
|
## the specified domain to execute any file
|
|
|
|
## on these filesystems in the specified
|
|
|
|
## domain. This is not suggested.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## No interprocess communication (signals, pipes,
|
|
|
|
## etc.) is provided by this interface since
|
|
|
|
## the domains are not owned by this module.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## This interface was added to handle
|
2006-01-18 16:40:04 +00:00
|
|
|
## the userhelper policy.
|
2005-07-13 18:29:08 +00:00
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-13 18:29:08 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="target_domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-13 18:29:08 +00:00
|
|
|
## The type of the new process.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-13 18:29:08 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-01-18 16:40:04 +00:00
|
|
|
interface(`corecmd_bin_spec_domtrans',`
|
2005-07-13 18:29:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, bin_t, bin_t)
|
|
|
|
domain_transition_pattern($1, bin_t, $2)
|
2006-01-18 16:40:04 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2008-12-03 19:16:20 +00:00
|
|
|
## Execute a file in a bin directory
|
|
|
|
## in the specified domain.
|
2006-01-18 16:40:04 +00:00
|
|
|
## </summary>
|
|
|
|
## <desc>
|
2008-12-03 19:16:20 +00:00
|
|
|
## <p>
|
|
|
|
## Execute a file in a bin directory
|
|
|
|
## in the specified domain. This allows
|
|
|
|
## the specified domain to execute any file
|
|
|
|
## on these filesystems in the specified
|
|
|
|
## domain. This is not suggested.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## No interprocess communication (signals, pipes,
|
|
|
|
## etc.) is provided by this interface since
|
|
|
|
## the domains are not owned by this module.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## This interface was added to handle
|
|
|
|
## the ssh-agent policy.
|
|
|
|
## </p>
|
2006-01-18 16:40:04 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-18 16:40:04 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="target_domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2008-12-03 19:16:20 +00:00
|
|
|
## The type of the new process.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-18 16:40:04 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_bin_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type bin_t;
|
|
|
|
')
|
|
|
|
|
2009-11-23 18:47:36 +00:00
|
|
|
corecmd_bin_spec_domtrans($1, $2)
|
2006-01-18 16:40:04 +00:00
|
|
|
type_transition $1 bin_t:process $2;
|
2005-07-13 18:29:08 +00:00
|
|
|
')
|
|
|
|
|
2005-05-12 20:50:09 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
2007-03-23 23:24:59 +00:00
|
|
|
## Search the contents of sbin directories. (Deprecated)
|
2006-05-10 18:09:08 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corecmd_search_sbin',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_search_bin() instead.')
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-11-15 20:17:18 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search
|
2007-03-23 23:24:59 +00:00
|
|
|
## sbin directories. (Deprecated)
|
2005-11-15 20:17:18 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-15 20:17:18 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-15 20:17:18 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_dontaudit_search_sbin',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_dontaudit_search_bin($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_dontaudit_search_bin() instead.')
|
2005-11-15 20:17:18 +00:00
|
|
|
')
|
|
|
|
|
2005-05-12 20:50:09 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
2007-03-23 23:24:59 +00:00
|
|
|
## List the contents of sbin directories. (Deprecated)
|
2006-05-10 18:09:08 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corecmd_list_sbin',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_list_bin($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_list_bin() instead.')
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-06-27 18:37:33 +00:00
|
|
|
########################################
|
2007-02-16 23:01:42 +00:00
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to write
|
2007-03-23 23:24:59 +00:00
|
|
|
## sbin directories. (Deprecated)
|
2007-02-16 23:01:42 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_dontaudit_write_sbin_dirs',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_dontaudit_write_bin_dirs($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_dontaudit_write_bin_dirs() instead.')
|
2007-02-16 23:01:42 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
2007-03-23 23:24:59 +00:00
|
|
|
## Get the attributes of sbin files. (Deprecated)
|
2006-05-10 18:09:08 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-06-27 18:37:33 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`corecmd_getattr_sbin_files',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_getattr_bin_files($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_getattr_bin_files() instead.')
|
2005-06-27 18:37:33 +00:00
|
|
|
')
|
|
|
|
|
2005-05-30 21:17:20 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attibutes
|
2007-03-23 23:24:59 +00:00
|
|
|
## of sbin files. (Deprecated)
|
2006-05-10 18:09:08 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-30 21:17:20 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`corecmd_dontaudit_getattr_sbin_files',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_dontaudit_getattr_bin_files($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_dontaudit_getattr_bin_files() instead.')
|
2005-05-30 21:17:20 +00:00
|
|
|
')
|
|
|
|
|
2005-07-11 19:02:50 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2007-03-23 23:24:59 +00:00
|
|
|
## Read files in sbin directories. (Deprecated)
|
2005-07-11 19:02:50 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`corecmd_read_sbin_files',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_read_bin_files($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_read_bin_files() instead.')
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
2005-06-27 20:59:28 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2007-03-23 23:24:59 +00:00
|
|
|
## Read symbolic links in sbin directories. (Deprecated)
|
2005-06-27 20:59:28 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-27 20:59:28 +00:00
|
|
|
## </param>
|
2005-07-11 19:02:50 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`corecmd_read_sbin_symlinks',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_read_bin_symlinks($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_read_bin_symlinks() instead.')
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2007-03-23 23:24:59 +00:00
|
|
|
## Read named pipes in sbin directories. (Deprecated)
|
2005-07-11 19:02:50 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`corecmd_read_sbin_pipes',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_read_bin_pipes($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_read_bin_pipes() instead.')
|
2005-07-11 19:02:50 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2007-03-23 23:24:59 +00:00
|
|
|
## Read named sockets in sbin directories. (Deprecated)
|
2005-07-11 19:02:50 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`corecmd_read_sbin_sockets',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_read_bin_sockets($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_read_bin_sockets() instead.')
|
2005-06-27 20:59:28 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Execute generic programs in sbin directories,
|
2007-03-23 23:24:59 +00:00
|
|
|
## in the caller domain. (Deprecated)
|
2006-05-10 18:09:08 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corecmd_exec_sbin',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_exec_bin($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_exec_bin() instead.')
|
2006-01-11 23:20:28 +00:00
|
|
|
')
|
2005-06-09 14:50:48 +00:00
|
|
|
|
2006-01-11 23:20:28 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2007-03-23 23:24:59 +00:00
|
|
|
## Create, read, write, and delete sbin files. (Deprecated)
|
2006-01-11 23:20:28 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-11 23:20:28 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-11 23:20:28 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
# cjp: added for prelink
|
|
|
|
interface(`corecmd_manage_sbin_files',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_manage_bin_files($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_manage_bin_files() instead.')
|
2006-01-11 23:20:28 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2007-03-23 23:24:59 +00:00
|
|
|
## Relabel to and from the sbin type. (Deprecated)
|
2006-01-11 23:20:28 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-11 23:20:28 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-11 23:20:28 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
# cjp: added for prelink
|
|
|
|
interface(`corecmd_relabel_sbin_files',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_relabel_bin_files($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_relabel_bin_files() instead.')
|
2006-01-11 23:20:28 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2007-03-23 23:24:59 +00:00
|
|
|
## Mmap a sbin file as executable. (Deprecated)
|
2006-01-11 23:20:28 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-11 23:20:28 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-11 23:20:28 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
# cjp: added for prelink
|
|
|
|
interface(`corecmd_mmap_sbin_files',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_mmap_bin_files($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_mmap_bin_files() instead.')
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-08-30 15:48:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a file in a sbin directory
|
2007-03-23 23:24:59 +00:00
|
|
|
## in the specified domain. (Deprecated)
|
2005-08-30 15:48:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Execute a file in a sbin directory
|
|
|
|
## in the specified domain. This allows
|
|
|
|
## the specified domain to execute any file
|
|
|
|
## on these filesystems in the specified
|
2007-03-23 23:24:59 +00:00
|
|
|
## domain. This is not suggested. (Deprecated)
|
2005-08-30 15:48:57 +00:00
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## No interprocess communication (signals, pipes,
|
|
|
|
## etc.) is provided by this interface since
|
|
|
|
## the domains are not owned by this module.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## This interface was added to handle
|
|
|
|
## the ssh-agent policy.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-30 15:48:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="target_domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-30 15:48:57 +00:00
|
|
|
## The type of the new process.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-30 15:48:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_sbin_domtrans',`
|
2008-07-23 21:38:39 +00:00
|
|
|
corecmd_bin_domtrans($1, $2)
|
2007-03-23 23:24:59 +00:00
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_bin_domtrans() instead.')
|
2005-08-30 15:48:57 +00:00
|
|
|
')
|
|
|
|
|
2006-01-18 16:40:04 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a file in a sbin directory
|
|
|
|
## in the specified domain but do not
|
|
|
|
## do it automatically. This is an explicit
|
2007-03-23 23:24:59 +00:00
|
|
|
## transition, requiring the caller to use setexeccon(). (Deprecated)
|
2006-01-18 16:40:04 +00:00
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Execute a file in a sbin directory
|
|
|
|
## in the specified domain. This allows
|
|
|
|
## the specified domain to execute any file
|
|
|
|
## on these filesystems in the specified
|
2007-03-23 23:24:59 +00:00
|
|
|
## domain. This is not suggested. (Deprecated)
|
2006-01-18 16:40:04 +00:00
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## No interprocess communication (signals, pipes,
|
|
|
|
## etc.) is provided by this interface since
|
|
|
|
## the domains are not owned by this module.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## This interface was added to handle
|
|
|
|
## the userhelper policy.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-18 16:40:04 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="target_domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-18 16:40:04 +00:00
|
|
|
## The type of the new process.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-18 16:40:04 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_sbin_spec_domtrans',`
|
2008-07-23 21:38:39 +00:00
|
|
|
corecmd_bin_spec_domtrans($1, $2)
|
2007-03-23 23:24:59 +00:00
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_bin_spec_domtrans() instead.')
|
2006-01-18 16:40:04 +00:00
|
|
|
')
|
|
|
|
|
2005-11-08 22:00:30 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Check if a shell is executable (DAC-wise).
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-08 22:00:30 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_check_exec_shell',`
|
|
|
|
gen_require(`
|
|
|
|
type bin_t, shell_exec_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, bin_t, bin_t)
|
|
|
|
read_lnk_files_pattern($1, bin_t, bin_t)
|
2005-11-08 22:00:30 +00:00
|
|
|
allow $1 shell_exec_t:file execute;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
2010-02-26 13:58:32 +00:00
|
|
|
## Execute shells in the caller domain.
|
2006-05-10 18:09:08 +00:00
|
|
|
## </summary>
|
2010-02-26 13:58:32 +00:00
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Allow the specified domain to execute shells without
|
|
|
|
## a domain transition.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## Typically, this interface should be used when the domain
|
|
|
|
## executes shells within the privileges
|
|
|
|
## of the source domain. Some examples of these programs
|
|
|
|
## are bash, tcsh, and zsh.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## Related interface:
|
|
|
|
## </p>
|
|
|
|
## <ul>
|
|
|
|
## <li>corecmd_exec_bin()</li>
|
|
|
|
## </ul>
|
|
|
|
## </desc>
|
2006-05-10 18:09:08 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corecmd_exec_shell',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type bin_t, shell_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, bin_t, bin_t)
|
|
|
|
read_lnk_files_pattern($1, bin_t, bin_t)
|
|
|
|
can_exec($1, shell_exec_t)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-30 21:17:20 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
2007-03-23 23:24:59 +00:00
|
|
|
## Execute ls in the caller domain. (Deprecated)
|
2006-05-10 18:09:08 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-30 21:17:20 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corecmd_exec_ls',`
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_exec_bin($1)
|
|
|
|
refpolicywarn(`$0() has been deprecated, please use corecmd_exec_bin() instead.')
|
2005-05-30 21:17:20 +00:00
|
|
|
')
|
|
|
|
|
2005-05-12 20:50:09 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
|
|
|
## Execute a shell in the target domain. This
|
|
|
|
## is an explicit transition, requiring the
|
|
|
|
## caller to use setexeccon().
|
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <desc>
|
2005-07-13 18:29:08 +00:00
|
|
|
## <p>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute a shell in the target domain. This
|
|
|
|
## is an explicit transition, requiring the
|
|
|
|
## caller to use setexeccon().
|
2005-07-13 18:29:08 +00:00
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## No interprocess communication (signals, pipes,
|
|
|
|
## etc.) is provided by this interface since
|
|
|
|
## the domains are not owned by this module.
|
|
|
|
## </p>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +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="target_domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the shell process.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corecmd_shell_spec_domtrans',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type bin_t, shell_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
list_dirs_pattern($1, bin_t, bin_t)
|
|
|
|
read_lnk_files_pattern($1, bin_t, bin_t)
|
|
|
|
domain_transition_pattern($1, shell_exec_t, $2)
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-05-31 19:52:57 +00:00
|
|
|
########################################
|
2005-07-13 18:29:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Execute a shell in the specified domain.
|
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <desc>
|
2005-07-13 18:29:08 +00:00
|
|
|
## <p>
|
|
|
|
## Execute a shell in the specified domain.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## No interprocess communication (signals, pipes,
|
|
|
|
## etc.) is provided by this interface since
|
|
|
|
## the domains are not owned by this module.
|
|
|
|
## </p>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:57:11 +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="target_domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the shell process.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-31 19:52:57 +00:00
|
|
|
#
|
2005-07-13 18:29:08 +00:00
|
|
|
interface(`corecmd_shell_domtrans',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type shell_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
corecmd_shell_spec_domtrans($1, $2)
|
2005-06-03 12:25:14 +00:00
|
|
|
type_transition $1 shell_exec_t:process $2;
|
2005-05-31 19:52:57 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2006-05-10 18:09:08 +00:00
|
|
|
## <summary>
|
|
|
|
## Execute chroot in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-07-13 18:29:08 +00:00
|
|
|
interface(`corecmd_exec_chroot',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type chroot_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_lnk_files_pattern($1, bin_t, bin_t)
|
|
|
|
can_exec($1, chroot_exec_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
allow $1 self:capability sys_chroot;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
2006-04-19 21:43:02 +00:00
|
|
|
|
2007-03-19 16:32:44 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of all executable files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`corecmd_getattr_all_executables',`
|
|
|
|
gen_require(`
|
|
|
|
attribute exec_type;
|
2007-03-23 23:24:59 +00:00
|
|
|
type bin_t;
|
2007-03-19 16:32:44 +00:00
|
|
|
')
|
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
allow $1 bin_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
getattr_files_pattern($1, bin_t, exec_type)
|
2007-03-19 16:32:44 +00:00
|
|
|
')
|
|
|
|
|
2010-03-05 15:51:39 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read all executable files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`corecmd_read_all_executables',`
|
|
|
|
gen_require(`
|
|
|
|
attribute exec_type;
|
|
|
|
')
|
|
|
|
|
|
|
|
read_files_pattern($1, exec_type, exec_type)
|
|
|
|
')
|
|
|
|
|
2006-04-19 21:43:02 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute all executable files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2006-04-19 21:43:02 +00:00
|
|
|
#
|
|
|
|
interface(`corecmd_exec_all_executables',`
|
|
|
|
gen_require(`
|
|
|
|
attribute exec_type;
|
2007-03-23 23:24:59 +00:00
|
|
|
type bin_t;
|
2006-04-19 21:43:02 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
can_exec($1, exec_type)
|
|
|
|
list_dirs_pattern($1, bin_t, bin_t)
|
|
|
|
read_lnk_files_pattern($1, bin_t, exec_type)
|
2006-04-19 21:43:02 +00:00
|
|
|
')
|
|
|
|
|
2007-06-20 19:47:10 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to execute all executables.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:24:41 +00:00
|
|
|
## Domain to not audit.
|
2007-06-20 19:47:10 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_dontaudit_exec_all_executables',`
|
|
|
|
gen_require(`
|
|
|
|
attribute exec_type;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 exec_type:file { execute execute_no_trans };
|
|
|
|
')
|
|
|
|
|
2006-04-19 21:43:02 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and all executable files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2006-04-19 21:43:02 +00:00
|
|
|
#
|
|
|
|
interface(`corecmd_manage_all_executables',`
|
|
|
|
gen_require(`
|
|
|
|
attribute exec_type;
|
2007-03-23 23:24:59 +00:00
|
|
|
type bin_t;
|
2006-04-19 21:43:02 +00:00
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
manage_dirs_pattern($1, bin_t, exec_type)
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, bin_t, exec_type)
|
|
|
|
manage_lnk_files_pattern($1, bin_t, bin_t)
|
2006-04-19 21:43:02 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel to and from the bin type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2006-04-19 21:43:02 +00:00
|
|
|
#
|
|
|
|
interface(`corecmd_relabel_all_executables',`
|
|
|
|
gen_require(`
|
|
|
|
attribute exec_type;
|
2007-03-23 23:24:59 +00:00
|
|
|
type bin_t;
|
2006-04-19 21:43:02 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
relabel_files_pattern($1, bin_t, exec_type)
|
2006-04-19 21:43:02 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Mmap all executables as executable.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corecmd_mmap_all_executables',`
|
|
|
|
gen_require(`
|
|
|
|
attribute exec_type;
|
2007-03-23 23:24:59 +00:00
|
|
|
type bin_t;
|
2006-04-19 21:43:02 +00:00
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
mmap_files_pattern($1, bin_t, exec_type)
|
2006-04-19 21:43:02 +00:00
|
|
|
')
|