Skip to content
Snippets Groups Projects
Commit f37ce3f3 authored by dcashman's avatar dcashman Committed by Nick Kralevich
Browse files

Add support for factory reset protection.

Address the following denials:
<12>[  417.732129] type=1400 audit(365340.189:47): avc: denied { read } for pid=1737 comm="Binder_2" name="mmcblk0p18" dev="tmpfs" ino=12406 scontext=u:r:system_server:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0
<12>[  417.882126] type=1400 audit(365340.339:48): avc: denied { read } for pid=1737 comm="Binder_2" name="mmcblk0p18" dev="tmpfs" ino=12406 scontext=u:r:system_server:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0

(cherrypick of commit 47bd7300)

Bug: 16710840
Change-Id: I8cb5b4b17dffe14f0bf05d63eb8f6ab8d5c09f53
parent d298354e
No related branches found
No related tags found
No related merge requests found
......@@ -65,5 +65,5 @@ type rpmsg_device, dev_type;
# Partition layout block device
type root_block_device, dev_type;
# Persistent data block device
type persistent_data_block_device, dev_type;
# factory reset protection block device
type frp_block_device, dev_type;
......@@ -311,3 +311,5 @@ neverallow domain default_android_service:service_manager add;
# Require that domains explicitly label unknown properties, and do not allow
# anyone but init to modify unknown properties.
neverallow { domain -init } default_prop:property_service set;
neverallow { domain -init -recovery -system_server } frp_block_device:blk_file rw_file_perms;
......@@ -386,10 +386,10 @@ allow system_server keystore:keystore_key {
password_uid
};
# Allow system server to search and write to the persistent data block device
# This block device does not get wiped in a factory reset.
allow system_server persistent_data_block_device:blk_file rw_file_perms;
# Allow system server to search and write to the persistent factory reset
# protection partition. This block device does not get wiped in a factory reset.
allow system_server block_device:dir search;
allow system_server frp_block_device:blk_file rw_file_perms;
# Clean up old cgroups
allow system_server cgroup:dir { remove_name rmdir };
......
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