Abrt patch from Dan Walsh.
This commit is contained in:
parent
e9e43f04b3
commit
1b2f08ea10
@ -1,11 +1,18 @@
|
|||||||
/etc/abrt(/.*)? gen_context(system_u:object_r:abrt_etc_t,s0)
|
/etc/abrt(/.*)? gen_context(system_u:object_r:abrt_etc_t,s0)
|
||||||
/etc/rc\.d/init\.d/abrt -- gen_context(system_u:object_r:abrt_initrc_exec_t,s0)
|
/etc/rc\.d/init\.d/abrt -- gen_context(system_u:object_r:abrt_initrc_exec_t,s0)
|
||||||
|
|
||||||
/usr/sbin/abrt -- gen_context(system_u:object_r:abrt_exec_t,s0)
|
/usr/bin/abrt-pyhook-helper -- gen_context(system_u:object_r:abrt_helper_exec_t,s0)
|
||||||
|
|
||||||
|
/usr/libexec/abrt-pyhook-helper -- gen_context(system_u:object_r:abrt_helper_exec_t,s0)
|
||||||
|
/usr/libexec/abrt-hook-python -- gen_context(system_u:object_r:abrt_helper_exec_t,s0)
|
||||||
|
|
||||||
|
/usr/sbin/abrtd -- gen_context(system_u:object_r:abrt_exec_t,s0)
|
||||||
|
|
||||||
/var/cache/abrt(/.*)? gen_context(system_u:object_r:abrt_var_cache_t,s0)
|
/var/cache/abrt(/.*)? gen_context(system_u:object_r:abrt_var_cache_t,s0)
|
||||||
|
/var/cache/abrt-di(/.*)? gen_context(system_u:object_r:abrt_var_cache_t,s0)
|
||||||
|
|
||||||
/var/log/abrt-logger -- gen_context(system_u:object_r:abrt_var_log_t,s0)
|
/var/log/abrt-logger -- gen_context(system_u:object_r:abrt_var_log_t,s0)
|
||||||
|
|
||||||
/var/run/abrt\.pid -- gen_context(system_u:object_r:abrt_var_run_t,s0)
|
/var/run/abrt\.pid -- gen_context(system_u:object_r:abrt_var_run_t,s0)
|
||||||
/var/run/abrt\.lock -- gen_context(system_u:object_r:abrt_var_run_t,s0)
|
/var/run/abrt\.lock -- gen_context(system_u:object_r:abrt_var_run_t,s0)
|
||||||
|
/var/run/abrt(/.*)? gen_context(system_u:object_r:abrt_var_run_t,s0)
|
||||||
|
@ -21,7 +21,7 @@ interface(`abrt_domtrans',`
|
|||||||
|
|
||||||
######################################
|
######################################
|
||||||
## <summary>
|
## <summary>
|
||||||
## Execute abrt
|
## Execute abrt in the caller domain.
|
||||||
## </summary>
|
## </summary>
|
||||||
## <param name="domain">
|
## <param name="domain">
|
||||||
## <summary>
|
## <summary>
|
||||||
@ -38,6 +38,126 @@ interface(`abrt_exec',`
|
|||||||
can_exec($1, abrt_exec_t)
|
can_exec($1, abrt_exec_t)
|
||||||
')
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Send a null signal to abrt.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## <summary>
|
||||||
|
## Domain allowed access.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`abrt_signull',`
|
||||||
|
gen_require(`
|
||||||
|
type abrt_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
allow $1 abrt_t:process signull;
|
||||||
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Allow the domain to read abrt state files in /proc.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## <summary>
|
||||||
|
## Domain to allow access.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`abrt_read_state',`
|
||||||
|
gen_require(`
|
||||||
|
type abrt_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
ps_process_pattern($1, abrt_t)
|
||||||
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Send and receive messages from
|
||||||
|
## abrt over dbus.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## <summary>
|
||||||
|
## Domain allowed access.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`abrt_dbus_chat',`
|
||||||
|
gen_require(`
|
||||||
|
type abrt_t;
|
||||||
|
class dbus send_msg;
|
||||||
|
')
|
||||||
|
|
||||||
|
allow $1 abrt_t:dbus send_msg;
|
||||||
|
allow abrt_t $1:dbus send_msg;
|
||||||
|
')
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
## <summary>
|
||||||
|
## Execute abrt-helper in the abrt-helper domain.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## <summary>
|
||||||
|
## Domain allowed access.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`abrt_domtrans_helper',`
|
||||||
|
gen_require(`
|
||||||
|
type abrt_helper_t, abrt_helper_exec_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
domtrans_pattern($1, abrt_helper_exec_t, abrt_helper_t)
|
||||||
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Execute abrt helper in the abrt_helper domain, and
|
||||||
|
## allow the specified role the abrt_helper domain.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## <summary>
|
||||||
|
## Domain allowed access.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
## <param name="role">
|
||||||
|
## <summary>
|
||||||
|
## Role allowed access.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
## <rolecap/>
|
||||||
|
#
|
||||||
|
interface(`abrt_run_helper',`
|
||||||
|
gen_require(`
|
||||||
|
type abrt_helper_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
abrt_domtrans_helper($1)
|
||||||
|
role $2 types abrt_helper_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Send and receive messages from
|
||||||
|
## abrt over dbus.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## <summary>
|
||||||
|
## Domain allowed access.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`abrt_cache_manage',`
|
||||||
|
gen_require(`
|
||||||
|
type abrt_var_cache_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
manage_files_pattern($1, abrt_var_cache_t, abrt_var_cache_t)
|
||||||
|
')
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
## <summary>
|
## <summary>
|
||||||
## Read abrt configuration file.
|
## Read abrt configuration file.
|
||||||
@ -76,6 +196,25 @@ interface(`abrt_read_log',`
|
|||||||
read_files_pattern($1, abrt_var_log_t, abrt_var_log_t)
|
read_files_pattern($1, abrt_var_log_t, abrt_var_log_t)
|
||||||
')
|
')
|
||||||
|
|
||||||
|
######################################
|
||||||
|
## <summary>
|
||||||
|
## Read abrt PID files.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## <summary>
|
||||||
|
## Domain allowed access.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`abrt_read_pid_files',`
|
||||||
|
gen_require(`
|
||||||
|
type abrt_var_run_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
files_search_pids($1)
|
||||||
|
read_files_pattern($1, abrt_var_run_t, abrt_var_run_t)
|
||||||
|
')
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
## <summary>
|
## <summary>
|
||||||
## All of the rules required to administrate
|
## All of the rules required to administrate
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
policy_module(abrt, 1.0.1)
|
policy_module(abrt, 1.0.2)
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
#
|
#
|
||||||
@ -33,12 +33,24 @@ files_type(abrt_var_cache_t)
|
|||||||
type abrt_var_run_t;
|
type abrt_var_run_t;
|
||||||
files_pid_file(abrt_var_run_t)
|
files_pid_file(abrt_var_run_t)
|
||||||
|
|
||||||
|
# type needed to allow all domains
|
||||||
|
# to handle /var/cache/abrt
|
||||||
|
type abrt_helper_t;
|
||||||
|
type abrt_helper_exec_t;
|
||||||
|
application_domain(abrt_helper_t, abrt_helper_exec_t)
|
||||||
|
role system_r types abrt_helper_t;
|
||||||
|
|
||||||
|
ifdef(`enable_mcs',`
|
||||||
|
init_ranged_daemon_domain(abrt_t, abrt_exec_t, s0 - mcs_systemhigh)
|
||||||
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
#
|
#
|
||||||
# abrt local policy
|
# abrt local policy
|
||||||
#
|
#
|
||||||
|
|
||||||
allow abrt_t self:capability { setuid setgid sys_nice dac_override };
|
allow abrt_t self:capability { chown kill setuid setgid sys_nice dac_override };
|
||||||
|
dontaudit abrt_t self:capability sys_rawio;
|
||||||
allow abrt_t self:process { signal signull setsched getsched };
|
allow abrt_t self:process { signal signull setsched getsched };
|
||||||
|
|
||||||
allow abrt_t self:fifo_file rw_fifo_file_perms;
|
allow abrt_t self:fifo_file rw_fifo_file_perms;
|
||||||
@ -62,11 +74,13 @@ files_tmp_filetrans(abrt_t, abrt_tmp_t, { file dir })
|
|||||||
# abrt var/cache files
|
# abrt var/cache files
|
||||||
manage_files_pattern(abrt_t, abrt_var_cache_t, abrt_var_cache_t)
|
manage_files_pattern(abrt_t, abrt_var_cache_t, abrt_var_cache_t)
|
||||||
manage_dirs_pattern(abrt_t, abrt_var_cache_t, abrt_var_cache_t)
|
manage_dirs_pattern(abrt_t, abrt_var_cache_t, abrt_var_cache_t)
|
||||||
|
manage_lnk_files_pattern(abrt_t, abrt_var_cache_t, abrt_var_cache_t)
|
||||||
files_var_filetrans(abrt_t, abrt_var_cache_t, { file dir })
|
files_var_filetrans(abrt_t, abrt_var_cache_t, { file dir })
|
||||||
|
|
||||||
# abrt pid files
|
# abrt pid files
|
||||||
manage_files_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
|
manage_files_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
|
||||||
manage_dirs_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
|
manage_dirs_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
|
||||||
|
manage_lnk_files_pattern(abrt_t, abrt_var_run_t, abrt_var_run_t)
|
||||||
files_pid_filetrans(abrt_t, abrt_var_run_t, { file dir })
|
files_pid_filetrans(abrt_t, abrt_var_run_t, { file dir })
|
||||||
|
|
||||||
kernel_read_ring_buffer(abrt_t)
|
kernel_read_ring_buffer(abrt_t)
|
||||||
@ -75,25 +89,47 @@ kernel_rw_kernel_sysctl(abrt_t)
|
|||||||
|
|
||||||
corecmd_exec_bin(abrt_t)
|
corecmd_exec_bin(abrt_t)
|
||||||
corecmd_exec_shell(abrt_t)
|
corecmd_exec_shell(abrt_t)
|
||||||
|
corecmd_read_all_executables(abrt_t)
|
||||||
|
|
||||||
corenet_all_recvfrom_netlabel(abrt_t)
|
corenet_all_recvfrom_netlabel(abrt_t)
|
||||||
corenet_all_recvfrom_unlabeled(abrt_t)
|
corenet_all_recvfrom_unlabeled(abrt_t)
|
||||||
corenet_sendrecv_http_client_packets(abrt_t)
|
|
||||||
corenet_tcp_bind_generic_node(abrt_t)
|
|
||||||
corenet_tcp_connect_http_port(abrt_t)
|
|
||||||
corenet_tcp_sendrecv_generic_if(abrt_t)
|
corenet_tcp_sendrecv_generic_if(abrt_t)
|
||||||
corenet_tcp_sendrecv_generic_node(abrt_t)
|
corenet_tcp_sendrecv_generic_node(abrt_t)
|
||||||
corenet_tcp_sendrecv_generic_port(abrt_t)
|
corenet_tcp_sendrecv_generic_port(abrt_t)
|
||||||
|
corenet_tcp_bind_generic_node(abrt_t)
|
||||||
|
corenet_tcp_connect_http_port(abrt_t)
|
||||||
|
corenet_tcp_connect_ftp_port(abrt_t)
|
||||||
|
corenet_tcp_connect_all_ports(abrt_t)
|
||||||
|
corenet_sendrecv_http_client_packets(abrt_t)
|
||||||
|
|
||||||
|
|
||||||
|
dev_getattr_all_chr_files(abrt_t)
|
||||||
dev_read_urand(abrt_t)
|
dev_read_urand(abrt_t)
|
||||||
|
dev_rw_sysfs(abrt_t)
|
||||||
|
dev_dontaudit_read_raw_memory(abrt_t)
|
||||||
|
|
||||||
|
domain_getattr_all_domains(abrt_t)
|
||||||
|
domain_read_all_domains_state(abrt_t)
|
||||||
|
domain_signull_all_domains(abrt_t)
|
||||||
|
|
||||||
files_getattr_all_files(abrt_t)
|
files_getattr_all_files(abrt_t)
|
||||||
files_read_etc_files(abrt_t)
|
files_read_etc_files(abrt_t)
|
||||||
|
files_read_var_symlinks(abrt_t)
|
||||||
|
files_read_var_lib_files(abrt_t)
|
||||||
files_read_usr_files(abrt_t)
|
files_read_usr_files(abrt_t)
|
||||||
|
files_read_generic_tmp_files(abrt_t)
|
||||||
|
files_read_kernel_modules(abrt_t)
|
||||||
|
files_dontaudit_list_default(abrt_t)
|
||||||
|
files_dontaudit_read_default_files(abrt_t)
|
||||||
|
|
||||||
fs_list_inotifyfs(abrt_t)
|
fs_list_inotifyfs(abrt_t)
|
||||||
fs_getattr_all_fs(abrt_t)
|
fs_getattr_all_fs(abrt_t)
|
||||||
fs_getattr_all_dirs(abrt_t)
|
fs_getattr_all_dirs(abrt_t)
|
||||||
|
fs_read_fusefs_files(abrt_t)
|
||||||
|
fs_read_noxattr_fs_files(abrt_t)
|
||||||
|
fs_read_nfs_files(abrt_t)
|
||||||
|
fs_read_nfs_symlinks(abrt_t)
|
||||||
|
fs_search_all(abrt_t)
|
||||||
|
|
||||||
sysnet_read_config(abrt_t)
|
sysnet_read_config(abrt_t)
|
||||||
|
|
||||||
@ -103,22 +139,82 @@ logging_send_syslog_msg(abrt_t)
|
|||||||
miscfiles_read_certs(abrt_t)
|
miscfiles_read_certs(abrt_t)
|
||||||
miscfiles_read_localization(abrt_t)
|
miscfiles_read_localization(abrt_t)
|
||||||
|
|
||||||
# to run bugzilla plugin
|
userdom_dontaudit_read_user_home_content_files(abrt_t)
|
||||||
# read ~/.abrt/Bugzilla.conf
|
|
||||||
userdom_read_user_home_content_files(abrt_t)
|
|
||||||
|
|
||||||
optional_policy(`
|
optional_policy(`
|
||||||
dbus_connect_system_bus(abrt_t)
|
dbus_system_domain(abrt_t, abrt_exec_t)
|
||||||
dbus_system_bus_client(abrt_t)
|
')
|
||||||
|
|
||||||
|
optional_policy(`
|
||||||
|
nis_use_ypbind(abrt_t)
|
||||||
|
')
|
||||||
|
|
||||||
|
optional_policy(`
|
||||||
|
policykit_dbus_chat(abrt_t)
|
||||||
|
policykit_domtrans_auth(abrt_t)
|
||||||
|
policykit_read_lib(abrt_t)
|
||||||
|
policykit_read_reload(abrt_t)
|
||||||
')
|
')
|
||||||
|
|
||||||
# to install debuginfo packages
|
# to install debuginfo packages
|
||||||
optional_policy(`
|
optional_policy(`
|
||||||
rpm_manage_db(abrt_t)
|
rpm_exec(abrt_t)
|
||||||
rpm_domtrans(abrt_t)
|
rpm_dontaudit_manage_db(abrt_t)
|
||||||
|
rpm_manage_cache(abrt_t)
|
||||||
|
rpm_manage_pid_files(abrt_t)
|
||||||
|
rpm_read_db(abrt_t)
|
||||||
|
rpm_signull(abrt_t)
|
||||||
')
|
')
|
||||||
|
|
||||||
# to run mailx plugin
|
# to run mailx plugin
|
||||||
optional_policy(`
|
optional_policy(`
|
||||||
sendmail_domtrans(abrt_t)
|
sendmail_domtrans(abrt_t)
|
||||||
')
|
')
|
||||||
|
|
||||||
|
optional_policy(`
|
||||||
|
sssd_stream_connect(abrt_t)
|
||||||
|
')
|
||||||
|
|
||||||
|
########################################
|
||||||
|
#
|
||||||
|
# abrt--helper local policy
|
||||||
|
#
|
||||||
|
|
||||||
|
allow abrt_helper_t self:capability { chown setgid };
|
||||||
|
allow abrt_helper_t self:process signal;
|
||||||
|
|
||||||
|
read_files_pattern(abrt_helper_t, abrt_etc_t, abrt_etc_t)
|
||||||
|
|
||||||
|
manage_dirs_pattern(abrt_helper_t, abrt_var_cache_t, abrt_var_cache_t)
|
||||||
|
manage_files_pattern(abrt_helper_t, abrt_var_cache_t, abrt_var_cache_t)
|
||||||
|
manage_lnk_files_pattern(abrt_helper_t, abrt_var_cache_t, abrt_var_cache_t)
|
||||||
|
files_var_filetrans(abrt_helper_t, abrt_var_cache_t, { file dir })
|
||||||
|
|
||||||
|
read_files_pattern(abrt_helper_t, abrt_var_run_t, abrt_var_run_t)
|
||||||
|
read_lnk_files_pattern(abrt_helper_t, abrt_var_run_t, abrt_var_run_t)
|
||||||
|
|
||||||
|
domain_read_all_domains_state(abrt_helper_t)
|
||||||
|
|
||||||
|
files_read_etc_files(abrt_helper_t)
|
||||||
|
|
||||||
|
fs_list_inotifyfs(abrt_helper_t)
|
||||||
|
fs_getattr_all_fs(abrt_helper_t)
|
||||||
|
|
||||||
|
auth_use_nsswitch(abrt_helper_t)
|
||||||
|
|
||||||
|
logging_send_syslog_msg(abrt_helper_t)
|
||||||
|
|
||||||
|
miscfiles_read_localization(abrt_helper_t)
|
||||||
|
|
||||||
|
term_dontaudit_use_all_ttys(abrt_helper_t)
|
||||||
|
term_dontaudit_use_all_ptys(abrt_helper_t)
|
||||||
|
|
||||||
|
ifdef(`hide_broken_symptoms', `
|
||||||
|
userdom_dontaudit_read_user_home_content_files(abrt_helper_t)
|
||||||
|
userdom_dontaudit_read_user_tmp_files(abrt_helper_t)
|
||||||
|
dev_dontaudit_read_all_blk_files(abrt_helper_t)
|
||||||
|
dev_dontaudit_read_all_chr_files(abrt_helper_t)
|
||||||
|
dev_dontaudit_write_all_chr_files(abrt_helper_t)
|
||||||
|
dev_dontaudit_write_all_blk_files(abrt_helper_t)
|
||||||
|
fs_dontaudit_rw_anon_inodefs_files(abrt_helper_t)
|
||||||
|
')
|
||||||
|
Loading…
Reference in New Issue
Block a user