[refpolicy] [PATCH 2/3] Allow mount_t usage of /dev/loop-control

Christopher J. PeBenito cpebenito at tresys.com
Fri Jan 31 22:26:33 EST 2014


On 1/29/2014 5:45 PM, Luis Ressel wrote:
> If loopback devices are not pregenerated (kernel option
> CONFIG_BLK_DEV_LOOP_MIN_COUNT=0), mount needs to write to
> /dev/loop-control do create them dynamically when needed.
> ---
>  policy/modules/system/mount.te | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/policy/modules/system/mount.te b/policy/modules/system/mount.te
> index 7d01431..449b3e7 100644
> --- a/policy/modules/system/mount.te
> +++ b/policy/modules/system/mount.te
> @@ -78,6 +78,7 @@ dev_list_all_dev_nodes(mount_t)
>  dev_read_sysfs(mount_t)
>  dev_dontaudit_write_sysfs_dirs(mount_t)
>  dev_rw_lvm_control(mount_t)
> +rw_chr_files_pattern(mount_t, device_t, loop_control_device_t)
>  dev_dontaudit_getattr_all_chr_files(mount_t)
>  dev_dontaudit_getattr_memory_dev(mount_t)
>  dev_getattr_sound_dev(mount_t)
 
A proper interface in the devices modules needs to be created to support this access.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com


More information about the refpolicy mailing list