selinux-policy/policy/modules/admin/vbetool.te
Dominick Grift 623e4f0885 1/1] Make the ability to mmap zero conditional where this is fapplicable.
Retry: forgot to include attribute mmap_low_domain_type attribute to domain_mmap_low()	:

Inspired by similar implementation in Fedora.
Wine and vbetool do not always actually need the ability to mmap a low area of the address space.
In some cases this can be silently denied.

Therefore introduce an interface that facilitates "mmap low" conditionally, and the corresponding boolean.
Also implement booleans for wine and vbetool that enables the ability to not audit attempts by wine and vbetool to mmap a low area of the address space.

Rename domain_mmap_low interface to domain_mmap_low_uncond.

Change call to domain_mmap_low to domain_mmap_low_uncond for xserver_t. Also move this call to distro redhat ifndef block because Redhat does not need this ability.

Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-09-01 09:41:56 -04:00

52 lines
1.0 KiB
Plaintext

policy_module(vbetool, 1.5.1)
########################################
#
# Declarations
#
## <desc>
## <p>
## Ignore vbetool mmap_zero errors.
## </p>
## </desc>
gen_tunable(vbetool_mmap_zero_ignore, false)
type vbetool_t;
type vbetool_exec_t;
init_system_domain(vbetool_t, vbetool_exec_t)
########################################
#
# Local policy
#
allow vbetool_t self:capability { dac_override sys_tty_config sys_admin };
allow vbetool_t self:process execmem;
dev_wx_raw_memory(vbetool_t)
dev_read_raw_memory(vbetool_t)
dev_rwx_zero(vbetool_t)
dev_rw_sysfs(vbetool_t)
dev_rw_xserver_misc(vbetool_t)
dev_rw_mtrr(vbetool_t)
domain_mmap_low(vbetool_t)
mls_file_read_all_levels(vbetool_t)
mls_file_write_all_levels(vbetool_t)
term_use_unallocated_ttys(vbetool_t)
miscfiles_read_localization(vbetool_t)
tunable_policy(`vbetool_mmap_zero_ignore',`
dontaudit vbetool_t self:memprotect mmap_zero;
')
optional_policy(`
hal_rw_pid_files(vbetool_t)
hal_write_log(vbetool_t)
hal_dontaudit_append_lib_files(vbetool_t)
')