|
Karl MacMillan |
f0c985 |
## <module name="rpm" layer="admin">
|
|
Chris PeBenito |
992aba |
## <summary>Policy for the RPM package manager.</summary>
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
c9428d |
## <interface name="rpm_domtrans">
|
|
Chris PeBenito |
992aba |
## <description>
|
|
Chris PeBenito |
992aba |
## Execute rpm programs in the rpm domain.
|
|
Chris PeBenito |
992aba |
## </description>
|
|
Chris PeBenito |
992aba |
## <parameter name="domain">
|
|
Chris PeBenito |
992aba |
## The type of the process performing this action.
|
|
Chris PeBenito |
992aba |
## </parameter>
|
|
Chris PeBenito |
992aba |
## </interface>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
c9428d |
define(`rpm_domtrans',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
dc67f7 |
allow $1 rpm_exec_t:file rx_file_perms;
|
|
Chris PeBenito |
0c73cd |
allow $1 rpm_t:process transition;
|
|
Chris PeBenito |
0c73cd |
type_transition $1 rpm_exec_t:process rpm_t;
|
|
Chris PeBenito |
0c73cd |
dontaudit $1 rpm_t:process { noatsecure siginh rlimitinh };
|
|
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 |
c9428d |
define(`rpm_domtrans_depend',`
|
|
Chris PeBenito |
0c73cd |
type rpm_t, rpm_exec_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
dc67f7 |
class file rx_file_perms;
|
|
Chris PeBenito |
0c73cd |
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
Chris PeBenito |
0c73cd |
class fd use;
|
|
Chris PeBenito |
0c73cd |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
c9428d |
## <interface name="rpm_run">
|
|
Chris PeBenito |
992aba |
## <description>
|
|
Chris PeBenito |
dc771f |
## Execute RPM programs in the RPM domain.
|
|
Chris PeBenito |
992aba |
## </description>
|
|
Chris PeBenito |
992aba |
## <parameter name="domain">
|
|
Chris PeBenito |
992aba |
## The type of the process performing this action.
|
|
Chris PeBenito |
992aba |
## </parameter>
|
|
Chris PeBenito |
992aba |
## <parameter name="role">
|
|
Chris PeBenito |
dc771f |
## The role to allow the RPM domain.
|
|
Chris PeBenito |
992aba |
## </parameter>
|
|
Chris PeBenito |
992aba |
## <parameter name="terminal">
|
|
Chris PeBenito |
992aba |
## The type of the terminal allow the RPM domain to use.
|
|
Chris PeBenito |
992aba |
## </parameter>
|
|
Chris PeBenito |
992aba |
## </interface>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
c9428d |
define(`rpm_run',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
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 |
0c73cd |
allow rpm_t $3:chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
c9428d |
define(`rpm_run_depend',`
|
|
Chris PeBenito |
0c73cd |
type rpm_t, rpm_script_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
class chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
c9428d |
## <interface name="rpm_use_fd">
|
|
Chris PeBenito |
992aba |
## <description>
|
|
Chris PeBenito |
992aba |
## Inherit and use file descriptors from RPM.
|
|
Chris PeBenito |
992aba |
## </description>
|
|
Chris PeBenito |
992aba |
## <parameter name="domain">
|
|
Chris PeBenito |
992aba |
## The type of the process performing this action.
|
|
Chris PeBenito |
992aba |
## </parameter>
|
|
Chris PeBenito |
992aba |
## </interface>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
c9428d |
define(`rpm_use_fd',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1 rpm_t:fd use;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
c9428d |
define(`rpm_use_fd_depend',`
|
|
Chris PeBenito |
0c73cd |
type rpm_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
class fd use;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
992aba |
## <interface name="rpm_read_pipe">
|
|
Chris PeBenito |
992aba |
## <description>
|
|
Chris PeBenito |
992aba |
## Read from a RPM pipe.
|
|
Chris PeBenito |
992aba |
## </description>
|
|
Chris PeBenito |
992aba |
## <parameter name="domain">
|
|
Chris PeBenito |
992aba |
## The type of the process performing this action.
|
|
Chris PeBenito |
992aba |
## </parameter>
|
|
Chris PeBenito |
992aba |
## </interface>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
992aba |
define(`rpm_read_pipe',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
dc67f7 |
allow $1 rpm_t:fifo_file r_file_perms;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
define(`rpm_read_pipe_depend',`
|
|
Chris PeBenito |
0c73cd |
type rpm_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
dc67f7 |
class fifo_file r_file_perms;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
c9428d |
## <interface name="rpm_read_db">
|
|
Chris PeBenito |
dc771f |
## <description>
|
|
Chris PeBenito |
dc771f |
## Read RPM package database.
|
|
Chris PeBenito |
dc771f |
## </description>
|
|
Chris PeBenito |
dc771f |
## <parameter name="domain">
|
|
Chris PeBenito |
dc771f |
## The type of the process performing this action.
|
|
Chris PeBenito |
dc771f |
## </parameter>
|
|
Chris PeBenito |
dc771f |
## </interface>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
c9428d |
define(`rpm_read_db',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
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 |
c9428d |
define(`rpm_read_db_depend',`
|
|
Chris PeBenito |
0c73cd |
type rpm_var_lib_t_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
dc67f7 |
class dir r_dir_perms;
|
|
Chris PeBenito |
dc67f7 |
class lnk_file r_file_perms;
|
|
Chris PeBenito |
dc67f7 |
class file r_file_perms;
|
|
Chris PeBenito |
dc771f |
')
|
|
Chris PeBenito |
dc771f |
|
|
Chris PeBenito |
dc771f |
########################################
|
|
Chris PeBenito |
dc771f |
#
|
|
Chris PeBenito |
c9428d |
# rpm_manage_db(domain)
|
|
Chris PeBenito |
dc771f |
#
|
|
Chris PeBenito |
c9428d |
define(`rpm_manage_db',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
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 |
|
|
Chris PeBenito |
c9428d |
define(`rpm_manage_db_depend',`
|
|
Chris PeBenito |
0c73cd |
type rpm_var_lib_t_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
dc67f7 |
class dir rw_dir_perms;
|
|
Chris PeBenito |
dc67f7 |
class lnk_file { getattr read write unlink };
|
|
Chris PeBenito |
dc67f7 |
class file { getattr create read write append unlink };
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
## </module>
|