|
Chris PeBenito |
992aba |
## <module name="rpm" layer="system">
|
|
Chris PeBenito |
992aba |
## <summary>Policy for the RPM package manager.</summary>
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
992aba |
## <interface name="rpm_transition">
|
|
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 |
## <infoflow type="write" weight="10"/>
|
|
Chris PeBenito |
992aba |
## </interface>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
992aba |
define(`rpm_transition',`
|
|
Chris PeBenito |
992aba |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
992aba |
allow $1 rpm_exec_t:file { getattr read execute };
|
|
Chris PeBenito |
992aba |
allow $1 rpm_t:process transition;
|
|
Chris PeBenito |
e7fcdc |
type_transition $1 rpm_exec_t:process rpm_t;
|
|
Chris PeBenito |
992aba |
dontaudit $1 rpm_t:process { noatsecure siginh rlimitinh };
|
|
Chris PeBenito |
4bf4ed |
allow $1 rpm_t:fd use;
|
|
Chris PeBenito |
4bf4ed |
allow rpm_t $1:fd use;
|
|
Chris PeBenito |
4bf4ed |
allow rpm_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
4bf4ed |
allow rpm_t $1:process sigchld;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
define(`rpm_transition_depend',`
|
|
Chris PeBenito |
992aba |
type rpm_t, rpm_exec_t;
|
|
Chris PeBenito |
992aba |
class file { getattr read execute };
|
|
Chris PeBenito |
4bf4ed |
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
Chris PeBenito |
4bf4ed |
class fd use;
|
|
Chris PeBenito |
4bf4ed |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
992aba |
## <interface name="rpm_transition_add_role_use_terminal">
|
|
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 |
## <infoflow type="both" weight="10"/>
|
|
Chris PeBenito |
992aba |
## </interface>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
992aba |
define(`rpm_transition_add_role_use_terminal',`
|
|
Chris PeBenito |
992aba |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
992aba |
rpm_transition($1)
|
|
Chris PeBenito |
992aba |
role $2 types rpm_t;
|
|
Chris PeBenito |
992aba |
role $2 types rpm_script_t;
|
|
Chris PeBenito |
992aba |
allow rpm_t $3:chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
define(`rpm_transition_add_role_use_terminal_depend',`
|
|
Chris PeBenito |
992aba |
type rpm_t, rpm_script_t;
|
|
Chris PeBenito |
992aba |
class chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
992aba |
## <interface name="rpm_use_file_descriptors">
|
|
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 |
## <infoflow type="read" weight="1"/>
|
|
Chris PeBenito |
992aba |
## </interface>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
992aba |
define(`rpm_use_file_descriptors',`
|
|
Chris PeBenito |
992aba |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
992aba |
allow $1 rpm_t:fd use;
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
define(`rpm_use_file_descriptors_depend',`
|
|
Chris PeBenito |
992aba |
type rpm_t;
|
|
Chris PeBenito |
992aba |
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 |
## <infoflow type="read" weight="10"/>
|
|
Chris PeBenito |
992aba |
## </interface>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
992aba |
define(`rpm_read_pipe',`
|
|
Chris PeBenito |
992aba |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
992aba |
allow $1 rpm_t:fifo_file { getattr read };
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
define(`rpm_read_pipe_depend',`
|
|
Chris PeBenito |
992aba |
type rpm_t;
|
|
Chris PeBenito |
992aba |
class fifo_file { getattr read };
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
########################################
|
|
Chris PeBenito |
dc771f |
## <interface name="rpm_read_package_database">
|
|
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 |
## <infoflow type="read" weight="10"/>
|
|
Chris PeBenito |
dc771f |
## </interface>
|
|
Chris PeBenito |
992aba |
#
|
|
Chris PeBenito |
dc771f |
define(`rpm_read_package_database',`
|
|
Chris PeBenito |
992aba |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
992aba |
allow $1 rpm_var_lib_t:dir { getattr read search };
|
|
Chris PeBenito |
992aba |
allow $1 rpm_var_lib_t:file { read getattr };
|
|
Chris PeBenito |
992aba |
allow $1 rpm_var_lib_t:lnk_file { getattr read };
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
dc771f |
define(`rpm_read_package_database_depend',`
|
|
Chris PeBenito |
dc771f |
type rpm_var_lib_t_t;
|
|
Chris PeBenito |
dc771f |
class dir { search getattr read };
|
|
Chris PeBenito |
dc771f |
class lnk_file { getattr read };
|
|
Chris PeBenito |
dc771f |
class file { getattr read };
|
|
Chris PeBenito |
dc771f |
')
|
|
Chris PeBenito |
dc771f |
|
|
Chris PeBenito |
dc771f |
########################################
|
|
Chris PeBenito |
dc771f |
#
|
|
Chris PeBenito |
dc771f |
# rpm_manage_package_database(domain)
|
|
Chris PeBenito |
dc771f |
#
|
|
Chris PeBenito |
dc771f |
define(`rpm_manage_package_database',`
|
|
Chris PeBenito |
dc771f |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
dc771f |
allow $1 rpm_var_lib_t:dir { getattr search read write add_name remove_name };
|
|
Chris PeBenito |
dc771f |
allow $1 rpm_var_lib_t:file { getattr create read write append unlink };
|
|
Chris PeBenito |
dc771f |
allow $1 rpm_var_lib_t:lnk_file { getattr read write unlink };
|
|
Chris PeBenito |
dc771f |
')
|
|
Chris PeBenito |
dc771f |
|
|
Chris PeBenito |
dc771f |
define(`rpm_manage_package_database_depend',`
|
|
Chris PeBenito |
dc771f |
type rpm_var_lib_t_t;
|
|
Chris PeBenito |
992aba |
class dir { search getattr read };
|
|
Chris PeBenito |
992aba |
class lnk_file { getattr read };
|
|
Chris PeBenito |
992aba |
class file { getattr read };
|
|
Chris PeBenito |
992aba |
')
|
|
Chris PeBenito |
992aba |
|
|
Chris PeBenito |
992aba |
## </module>
|