pipa: sepolicy: Set data_file_type for xiaomi_keyboard_conf_file under /data/vendor

Label xiaomi_keyboard_conf_file with data_file_type and place it under
/data/vendor to comply with SELinux policy requirements.

This avoids the use of core_data_file_type, which is restricted to core
domains, and ensures compatibility with sepolicy_test and neverallow rules.

Test: sepolicy_test and neverallow checks pass
This commit is contained in:
CuriousNom
2025-07-17 12:00:00 +00:00
committed by gensis01
parent ec160952a5
commit 010f16432b
2 changed files with 4 additions and 2 deletions

View File

@@ -10,4 +10,4 @@
# Xiaomi Keyboard
/dev/nanodev0 u:object_r:xiaomi_keyboard_device:s0
/data/misc/xiaomi_keyboard.conf u:object_r:xiaomi_keyboard_conf_file:s0
/data/vendor/xiaomi_keyboard.conf u:object_r:xiaomi_keyboard_conf_file:s0

View File

@@ -23,4 +23,6 @@ allow xiaomi_keyboard servicemanager:binder { call transfer };
allow xiaomi_keyboard sysfs:dir { read open };
allow xiaomi_keyboard sysfs_devices_system_cpu:file { read open };
allow xiaomi_keyboard xiaomi_keyboard_conf_file:file { read open };
allow xiaomi_keyboard xiaomi_keyboard_conf_file:file { read open };
typeattribute xiaomi_keyboard_conf_file data_file_type;