From 1d967dd697e9c4beabb9437582c9d15bcc96e867 Mon Sep 17 00:00:00 2001 From: Josh Yang Date: Thu, 23 Dec 2021 14:37:41 -0800 Subject: [PATCH] Label /data/bootanim with bootanim_data_file. Bug: 16529906 Test: /data/bootanim is labeled correctly. BootAnimation can access this folder. Change-Id: Ic6a438d7a139b4864c4795dcac613cb819a81631 --- private/bootanim.te | 3 +++ private/file.te | 3 +++ private/file_contexts | 2 ++ 3 files changed, 8 insertions(+) diff --git a/private/bootanim.te b/private/bootanim.te index 855bc3dd5..f4fb0bcd8 100644 --- a/private/bootanim.te +++ b/private/bootanim.te @@ -15,3 +15,6 @@ get_prop(bootanim, bootanim_config_prop) # Allow updating boot animation status. set_prop(bootanim, bootanim_system_prop) + +# Allow accessing /data/bootanim +r_dir_file(bootanim, bootanim_data_file) diff --git a/private/file.te b/private/file.te index 0eb201864..5b6170f36 100644 --- a/private/file.te +++ b/private/file.te @@ -69,6 +69,9 @@ type virtualizationservice_data_file, file_type, data_file_type, core_data_file_ # /data/system/environ type environ_system_data_file, file_type, data_file_type, core_data_file_type; +# /data/bootanim +type bootanim_data_file, file_type, data_file_type, core_data_file_type; + # /dev/kvm type kvm_device, dev_type; diff --git a/private/file_contexts b/private/file_contexts index 41bc1847c..4a0453276 100644 --- a/private/file_contexts +++ b/private/file_contexts @@ -704,6 +704,8 @@ /data/incremental/MT_[^/]+/mount/.log u:object_r:incremental_control_file:s0 /data/incremental/MT_[^/]+/mount/.blocks_written u:object_r:incremental_control_file:s0 +# Boot animation data +/data/bootanim(/.*)? u:object_r:bootanim_data_file:s0 ############################# # Expanded data files #