|
Chris PeBenito |
992aba |
## <summary>Policy for the RPM package manager.</summary>
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Execute rpm programs in the rpm domain.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
199895 |
interface(`rpm_domtrans',`
|
|
Chris PeBenito |
7f2e39 |
gen_require(`
|
|
Chris PeBenito |
7f2e39 |
type rpm_t, rpm_exec_t;
|
|
Chris PeBenito |
7f2e39 |
class process sigchld;
|
|
Chris PeBenito |
7f2e39 |
class fd use;
|
|
Chris PeBenito |
7f2e39 |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
7f2e39 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
7f2e39 |
files_search_usr($1)
|
|
Chris PeBenito |
7f2e39 |
corecmd_search_bin($1)
|
|
Chris PeBenito |
7f2e39 |
domain_auto_trans($1,rpm_exec_t,rpm_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1 rpm_t:fd use;
|
|
Chris PeBenito |
0c73cd |
allow rpm_t $1:fd use;
|
|
Chris PeBenito |
0c73cd |
allow rpm_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
0c73cd |
allow rpm_t $1:process sigchld;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Execute RPM programs in the RPM domain.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="role">
|
|
Chris PeBenito |
414e41 |
## The role to allow the RPM domain.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="terminal">
|
|
Chris PeBenito |
414e41 |
## The type of the terminal allow the RPM domain to use.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
199895 |
interface(`rpm_run',`
|
|
Chris PeBenito |
7f2e39 |
gen_require(`
|
|
Chris PeBenito |
7f2e39 |
type rpm_t, rpm_script_t;
|
|
Chris PeBenito |
7f2e39 |
class chr_file rw_term_perms;
|
|
Chris PeBenito |
7f2e39 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
rpm_domtrans($1)
|
|
Chris PeBenito |
0c73cd |
role $2 types rpm_t;
|
|
Chris PeBenito |
0c73cd |
role $2 types rpm_script_t;
|
|
Chris PeBenito |
7f2e39 |
allow rpm_t $3:chr_file rw_term_perms;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Inherit and use file descriptors from RPM.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
199895 |
interface(`rpm_use_fd',`
|
|
Chris PeBenito |
7f2e39 |
gen_require(`
|
|
Chris PeBenito |
7f2e39 |
type rpm_t;
|
|
Chris PeBenito |
7f2e39 |
class fd use;
|
|
Chris PeBenito |
7f2e39 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1 rpm_t:fd use;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Read from a RPM pipe.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
199895 |
interface(`rpm_read_pipe',`
|
|
Chris PeBenito |
7f2e39 |
gen_require(`
|
|
Chris PeBenito |
7f2e39 |
type rpm_t;
|
|
Chris PeBenito |
7f2e39 |
class fifo_file r_file_perms;
|
|
Chris PeBenito |
7f2e39 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
dc67f7 |
allow $1 rpm_t:fifo_file r_file_perms;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## Read the RPM package database.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
199895 |
interface(`rpm_read_db',`
|
|
Chris PeBenito |
7f2e39 |
gen_require(`
|
|
Chris PeBenito |
7f2e39 |
type rpm_var_lib_t_t;
|
|
Chris PeBenito |
7f2e39 |
class dir r_dir_perms;
|
|
Chris PeBenito |
7f2e39 |
class lnk_file r_file_perms;
|
|
Chris PeBenito |
7f2e39 |
class file r_file_perms;
|
|
Chris PeBenito |
7f2e39 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
dc67f7 |
allow $1 rpm_var_lib_t:dir r_dir_perms;
|
|
Chris PeBenito |
dc67f7 |
allow $1 rpm_var_lib_t:file r_file_perms;
|
|
Chris PeBenito |
dc67f7 |
allow $1 rpm_var_lib_t:lnk_file r_file_perms;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
dc771f |
########################################
|
|
Chris PeBenito |
ebdc3b |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## Create, read, write, and delete the RPM package database.
|
|
Chris PeBenito |
ebdc3b |
## </summary>
|
|
Chris PeBenito |
ebdc3b |
## <param name="domain">
|
|
Chris PeBenito |
ebdc3b |
## The type of the process performing this action.
|
|
Chris PeBenito |
ebdc3b |
## </param>
|
|
Chris PeBenito |
dc771f |
#
|
|
Chris PeBenito |
199895 |
interface(`rpm_manage_db',`
|
|
Chris PeBenito |
7f2e39 |
gen_require(`
|
|
Chris PeBenito |
7f2e39 |
type rpm_var_lib_t_t;
|
|
Chris PeBenito |
7f2e39 |
class dir rw_dir_perms;
|
|
Chris PeBenito |
7f2e39 |
class lnk_file { getattr read write unlink };
|
|
Chris PeBenito |
7f2e39 |
class file { getattr create read write append unlink };
|
|
Chris PeBenito |
7f2e39 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
dc67f7 |
allow $1 rpm_var_lib_t:dir rw_dir_perms;
|
|
Chris PeBenito |
0c73cd |
allow $1 rpm_var_lib_t:file { getattr create read write append unlink };
|
|
Chris PeBenito |
0c73cd |
allow $1 rpm_var_lib_t:lnk_file { getattr read write unlink };
|
|
Chris PeBenito |
dc771f |
')
|
|
Chris PeBenito |
dc771f |
|