aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Smalley <sds@tycho.nsa.gov>2013-11-06 13:00:52 -0500
committerSteve Kondik <shade@chemlab.org>2014-04-05 14:17:37 -0700
commit8bebb1c5dd10f704d0f5c90b9c51ed7f3e91eb06 (patch)
treee6bdbf55ea248174ce4956518d8487e86789b4f4
parentfa32bbc8c9b37dc4ec363cf58f6b8b313d9b65f8 (diff)
downloadandroid_external_sepolicy-8bebb1c5dd10f704d0f5c90b9c51ed7f3e91eb06.tar.gz
android_external_sepolicy-8bebb1c5dd10f704d0f5c90b9c51ed7f3e91eb06.tar.bz2
android_external_sepolicy-8bebb1c5dd10f704d0f5c90b9c51ed7f3e91eb06.zip
Move audio_firmware_file and /data/misc/audio entry to core sepolicy.
Change-Id: Ib8c96ab9e19d34e8e34a4c859528345763be4906 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Rename camera_calibration_file and audio_firmware_file. Use more general type names for the contents of /data/misc/camera and /data/misc/audio. These were the names used in our policy until 4.3 was released, at which point we switched to be consistent with AOSP. However, the Galaxy S4 4.2.2 image, Galaxy S4 4.3 image, and Galaxy Note 3 4.3 image all shipped with policies using _data_file names because they were based on our older policy. So we may as well switch AOSP to these names. Not sure if in fact these could be all coalesced to the new media_data_file type for /data/misc/media introduced by Ic374488f8b62bd4f8b3c90f30da0e8d1ed1a7343. Options to fix already existing devices, which would only apply to Nexus devices with 4.3 or 4.4 at this point: 1) Add restorecon_recursive /data/misc/audio /data/misc/camera to either the system/core init.rc or to the device-specific init.*.rc files. -or- 2) Add a typealias declaration in the policy to remap the old type names. to the new ones. Then existing types on persistent storage will be remapped internally to the new ones. -or- 3) Some sort of relabeld. Option #2 is implemented by this change. Change-Id: Id36203f5bb66b5200efc1205630b5b260ef97496 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
-rw-r--r--file.te6
-rw-r--r--file_contexts3
2 files changed, 7 insertions, 2 deletions
diff --git a/file.te b/file.te
index 706bc2f..d6c62b4 100644
--- a/file.te
+++ b/file.te
@@ -47,6 +47,7 @@ type shell_data_file, file_type, data_file_type;
type gps_data_file, file_type, data_file_type;
# /data/misc subdirectories
type bluetoothd_data_file, file_type, data_file_type;
+type audio_data_file, file_type, data_file_type;
type bluetooth_data_file, file_type, data_file_type;
type keystore_data_file, file_type, data_file_type;
type vpn_data_file, file_type, data_file_type;
@@ -54,8 +55,11 @@ type systemkeys_data_file, file_type, data_file_type;
type wifi_data_file, file_type, data_file_type;
type radio_data_file, file_type, data_file_type;
type nfc_data_file, file_type, data_file_type;
-type camera_calibration_file, file_type, data_file_type;
+type camera_data_file, file_type, data_file_type;
type adb_keys_file, file_type, data_file_type;
+# Compatibility with type names used in vanilla Android 4.3 and 4.4.
+typealias audio_data_file alias audio_firmware_file;
+typealias camera_data_file alias camera_calibration_file;
# /data/data subdirectories - app sandboxes
type app_data_file, file_type, data_file_type;
# Compatibility with type name used in Android 4.3 and 4.4.
diff --git a/file_contexts b/file_contexts
index 5db0e40..5aad5a7 100644
--- a/file_contexts
+++ b/file_contexts
@@ -177,13 +177,14 @@
/data/local/tmp/selinux(/.*)? u:object_r:tombstone_data_file:s0
# Misc data
/data/misc/bluetoothd(/.*)? u:object_r:bluetoothd_data_file:s0
+/data/misc/audio(/.*)? u:object_r:audio_data_file:s0
/data/misc/bluetooth(/.*)? u:object_r:bluetooth_data_file:s0
/data/misc/bluedroid(/.*)? u:object_r:bluetooth_data_file:s0
/data/misc/keystore(/.*)? u:object_r:keystore_data_file:s0
/data/misc/vpn(/.*)? u:object_r:vpn_data_file:s0
/data/misc/systemkeys(/.*)? u:object_r:systemkeys_data_file:s0
/data/misc/wifi(/.*)? u:object_r:wifi_data_file:s0
-/data/misc/camera(/.*)? u:object_r:camera_calibration_file:s0
+/data/misc/camera(/.*)? u:object_r:camera_data_file:s0
/data/misc/dhcp(/.*)? u:object_r:dhcp_data_file:s0
/data/misc/adb(/.*)? u:object_r:adb_keys_file:s0
# App sandboxes