Skip to content
Snippets Groups Projects
Commit 3da1ffba authored by Stephen Smalley's avatar Stephen Smalley Committed by Nick Kralevich
Browse files

Remove block_device:blk_file access from fsck.


Now that we have assigned specific types to userdata and cache
block devices, we can remove the ability of fsck to run on other
block devices.

Change-Id: I8cfb3dc0e4ebe6b73346ff291ecb11397bb0c2d0
Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
parent beb279c7
No related branches found
No related tags found
No related merge requests found
......@@ -254,7 +254,7 @@ neverallow domain init:binder *;
# Don't allow raw read/write/open access to block_device
# Rather force a relabel to a more specific type
neverallow { domain -kernel -init -recovery -vold -uncrypt -install_recovery -fsck } block_device:blk_file { open read write };
neverallow { domain -kernel -init -recovery -vold -uncrypt -install_recovery } block_device:blk_file { open read write };
# Don't allow raw read/write/open access to generic devices.
# Rather force a relabel to a more specific type.
......
......@@ -13,10 +13,6 @@ allow fsck tmpfs:chr_file { read write ioctl };
allow fsck devpts:chr_file { read write ioctl getattr };
# Run e2fsck on block devices.
# TODO: Assign userdata and cache block device types to the corresponding
# block devices in all device policies, and then remove access to
# block_device:blk_file from here.
allow fsck block_device:blk_file rw_file_perms;
allow fsck userdata_block_device:blk_file rw_file_perms;
allow fsck cache_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