2020-08-18 13:09:10 +00:00
|
|
|
policy_module(ddcprobe, 1.5.0)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
attribute_role ddcprobe_roles;
|
|
|
|
roleattribute system_r ddcprobe_roles;
|
|
|
|
|
|
|
|
type ddcprobe_t;
|
|
|
|
type ddcprobe_exec_t;
|
|
|
|
application_domain(ddcprobe_t, ddcprobe_exec_t)
|
|
|
|
role ddcprobe_roles types ddcprobe_t;
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow ddcprobe_t self:capability { sys_admin sys_rawio };
|
|
|
|
allow ddcprobe_t self:process execmem;
|
|
|
|
|
|
|
|
kernel_read_system_state(ddcprobe_t)
|
|
|
|
kernel_read_kernel_sysctls(ddcprobe_t)
|
|
|
|
kernel_change_ring_buffer_level(ddcprobe_t)
|
|
|
|
|
|
|
|
files_search_kernel_modules(ddcprobe_t)
|
|
|
|
|
|
|
|
corecmd_list_bin(ddcprobe_t)
|
|
|
|
corecmd_exec_bin(ddcprobe_t)
|
|
|
|
|
|
|
|
dev_read_urand(ddcprobe_t)
|
Make raw memory access tunable
Modern systems shouldn't need direct access to raw memory
devices (/dev/mem, /dev/kmem, /dev/mergemem, dev/oldmem, /dev/port)
anymore, so let's remove the access in most cases and make it tunable
in the rest.
Add dev_read_raw_memory_cond(), dev_write_raw_memory_cond() and
dev_wx_raw_memory_cond(), which are conditional to new boolean
allow_raw_memory_access.
Remove raw memory access for a few domains that should never have
needed it (colord_t, iscsid_t, mdamd_t, txtstat_t), should not need it
anymore (dmidecode_t, Debian devicekit_diskt_t, hald_t, hald_mac_t,
xserver_t) or the domains that should transition to different domain
for this (rpm_t, kudzu_t, dpkg_t).
Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
2020-02-22 15:49:24 +00:00
|
|
|
dev_read_raw_memory_cond(ddcprobe_t, allow_raw_memory_access)
|
|
|
|
dev_wx_raw_memory_cond(ddcprobe_t, allow_raw_memory_access)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
files_read_etc_files(ddcprobe_t)
|
|
|
|
files_read_etc_runtime_files(ddcprobe_t)
|
|
|
|
files_read_usr_files(ddcprobe_t)
|
|
|
|
|
|
|
|
term_use_all_ttys(ddcprobe_t)
|
|
|
|
term_use_all_ptys(ddcprobe_t)
|
|
|
|
|
|
|
|
libs_read_lib_files(ddcprobe_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(ddcprobe_t)
|
|
|
|
|
|
|
|
modutils_read_module_deps(ddcprobe_t)
|
|
|
|
|
|
|
|
userdom_use_user_terminals(ddcprobe_t)
|
|
|
|
userdom_use_all_users_fds(ddcprobe_t)
|