aboutsummaryrefslogtreecommitdiffstats
path: root/install_recovery.te
diff options
context:
space:
mode:
authorStephen Smalley <sds@tycho.nsa.gov>2014-09-30 12:53:12 -0400
committerStephen Smalley <sds@tycho.nsa.gov>2014-10-02 09:00:41 -0400
commit206b1a6c45f1bae25906018d9c5d968330106826 (patch)
tree51af419c27126a32b3390253fea6ccd20a1121e5 /install_recovery.te
parenteb5b76aa904db6fe5210f1aa4e051016a077ed42 (diff)
downloadandroid_external_sepolicy-206b1a6c45f1bae25906018d9c5d968330106826.tar.gz
android_external_sepolicy-206b1a6c45f1bae25906018d9c5d968330106826.tar.bz2
android_external_sepolicy-206b1a6c45f1bae25906018d9c5d968330106826.zip
Define specific block device types for system and recovery partitions.
Define a specific block device type for system so that we can prevent raw writes to the system partition by anything other than recovery. Define a specific block device type for recovery so that we can prevent raw writes to the recovery partition by anything other than install_recovery or recovery. These types must be assigned to specific block device nodes via device-specific policy. This change merely defines the types, adds allow rules so that nothing will break when the types are assigned, and adds neverallow rules to prevent adding further allow rules on these types. This change does not remove access to the generic block_device type from any domain so nothing should break even on devices without these type assignments. Change-Id: Ie9c1f6d632f6e9e8cbba106f07f6b1979d2a3c4a Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Diffstat (limited to 'install_recovery.te')
-rw-r--r--install_recovery.te2
1 files changed, 2 insertions, 0 deletions
diff --git a/install_recovery.te b/install_recovery.te
index 138134a..5232685 100644
--- a/install_recovery.te
+++ b/install_recovery.te
@@ -18,6 +18,8 @@ allow install_recovery system_file:file rx_file_perms;
# create an appropriate label for it.
allow install_recovery block_device:dir search;
allow install_recovery block_device:blk_file rw_file_perms;
+auditallow install_recovery block_device:blk_file rw_file_perms;
+allow install_recovery recovery_block_device:blk_file rw_file_perms;
# Create and delete /cache/saved.file
allow install_recovery cache_file:dir rw_dir_perms;