Skip to content
Snippets Groups Projects
Commit ad151a23 authored by Nick Kralevich's avatar Nick Kralevich Committed by Gerrit Code Review
Browse files

Merge "Label block devices created or accessed by vold with specific types."

parents 44cb98a7 273d7ea4
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ type dm_device, dev_type; ...@@ -11,6 +11,7 @@ type dm_device, dev_type;
type loop_device, dev_type; type loop_device, dev_type;
type radio_device, dev_type; type radio_device, dev_type;
type ram_device, dev_type; type ram_device, dev_type;
type vold_device, dev_type;
type console_device, dev_type; type console_device, dev_type;
type cpuctl_device, dev_type; type cpuctl_device, dev_type;
type fscklogs, dev_type; type fscklogs, dev_type;
...@@ -82,3 +83,8 @@ type cache_block_device, dev_type; ...@@ -82,3 +83,8 @@ type cache_block_device, dev_type;
# Block device for any swap partition. # Block device for any swap partition.
type swap_block_device, dev_type; type swap_block_device, dev_type;
# Metadata block device used for encryption metadata.
# Assign this type to the partition specified by the encryptable=
# mount option in your fstab file in the entry for userdata.
type metadata_block_device, dev_type;
...@@ -40,7 +40,9 @@ ...@@ -40,7 +40,9 @@
/dev/audio.* u:object_r:audio_device:s0 /dev/audio.* u:object_r:audio_device:s0
/dev/binder u:object_r:binder_device:s0 /dev/binder u:object_r:binder_device:s0
/dev/block(/.*)? u:object_r:block_device:s0 /dev/block(/.*)? u:object_r:block_device:s0
/dev/block/dm-[0-9]+ u:object_r:dm_device:s0
/dev/block/loop[0-9]* u:object_r:loop_device:s0 /dev/block/loop[0-9]* u:object_r:loop_device:s0
/dev/block/vold/[0-9]+:[0-9]+ u:object_r:vold_device:s0
/dev/block/ram[0-9]* u:object_r:ram_device:s0 /dev/block/ram[0-9]* u:object_r:ram_device:s0
/dev/bus/usb(.*)? u:object_r:usb_device:s0 /dev/bus/usb(.*)? u:object_r:usb_device:s0
/dev/cam u:object_r:camera_device:s0 /dev/cam u:object_r:camera_device:s0
......
...@@ -5,9 +5,11 @@ type vold_exec, exec_type, file_type; ...@@ -5,9 +5,11 @@ type vold_exec, exec_type, file_type;
init_daemon_domain(vold) init_daemon_domain(vold)
typeattribute vold mlstrustedsubject; typeattribute vold mlstrustedsubject;
allow vold self:process setfscreate;
allow vold system_file:file x_file_perms; allow vold system_file:file x_file_perms;
allow vold block_device:dir create_dir_perms; allow vold block_device:dir create_dir_perms;
allow vold block_device:blk_file create_file_perms; allow vold block_device:blk_file create_file_perms;
auditallow vold block_device:blk_file create_file_perms;
allow vold device:dir write; allow vold device:dir write;
allow vold devpts:chr_file rw_file_perms; allow vold devpts:chr_file rw_file_perms;
allow vold rootfs:dir mounton; allow vold rootfs:dir mounton;
...@@ -22,8 +24,10 @@ allow vold self:capability { net_admin dac_override mknod sys_admin chown fowner ...@@ -22,8 +24,10 @@ allow vold self:capability { net_admin dac_override mknod sys_admin chown fowner
allow vold self:netlink_kobject_uevent_socket create_socket_perms; allow vold self:netlink_kobject_uevent_socket create_socket_perms;
allow vold app_data_file:dir search; allow vold app_data_file:dir search;
allow vold app_data_file:file rw_file_perms; allow vold app_data_file:file rw_file_perms;
allow vold loop_device:blk_file rw_file_perms; allow vold loop_device:blk_file create_file_perms;
allow vold vold_device:blk_file create_file_perms;
allow vold dm_device:chr_file rw_file_perms; allow vold dm_device:chr_file rw_file_perms;
allow vold dm_device:blk_file rw_file_perms;
# For vold Process::killProcessesWithOpenFiles function. # For vold Process::killProcessesWithOpenFiles function.
allow vold domain:dir r_dir_perms; allow vold domain:dir r_dir_perms;
allow vold domain:{ file lnk_file } r_file_perms; allow vold domain:{ file lnk_file } r_file_perms;
...@@ -94,4 +98,6 @@ allow vold tee_device:chr_file rw_file_perms; ...@@ -94,4 +98,6 @@ allow vold tee_device:chr_file rw_file_perms;
# Access userdata block device. # Access userdata block device.
allow vold userdata_block_device:blk_file rw_file_perms; allow vold userdata_block_device:blk_file rw_file_perms;
auditallow vold userdata_block_device:blk_file rw_file_perms;
# Access metadata block device used for encryption meta-data.
allow vold metadata_block_device:blk_file rw_file_perms;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment