mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
msm8226-common: Add SELinux specific policies
This commit is contained in:
parent
aa5b6ce106
commit
7a65d086dc
12 changed files with 55 additions and 0 deletions
|
@ -91,6 +91,10 @@ BOARD_RECOVERY_SWIPE := true
|
|||
BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_15x24.h\"
|
||||
COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD
|
||||
|
||||
# SELinux
|
||||
-include device/qcom/sepolicy/sepolicy.mk
|
||||
BOARD_SEPOLICY_DIRS += $(LOCAL_PATH)/sepolicy
|
||||
|
||||
# Vold
|
||||
BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true
|
||||
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file
|
||||
|
|
5
sepolicy/file.te
Normal file
5
sepolicy/file.te
Normal file
|
@ -0,0 +1,5 @@
|
|||
type sensors_efs_file, file_type;
|
||||
type sysfs_camera, fs_type, sysfs_type;
|
||||
type sysfs_display, fs_type, sysfs_type;
|
||||
type sysfs_vibeamp, fs_type, sysfs_type;
|
||||
type wifi_efs_file, file_type;
|
22
sepolicy/file_contexts
Normal file
22
sepolicy/file_contexts
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Camera
|
||||
/data/cam_socket.* u:object_r:camera_socket:s0
|
||||
/sys/devices/virtual/camera(/.*)? u:object_r:sysfs_camera:s0
|
||||
|
||||
# CMHW
|
||||
/sys/devices/virtual/timed_output/vibrator(/.*)? u:object_r:sysfs_vibeamp:s0
|
||||
/sys/class/sec/sec_touchkey/keypad_enable u:object_r:sysfs_display:s0
|
||||
|
||||
# Display
|
||||
/sys/devices/virtual/lcd/panel/power_reduce u:object_r:sysfs_display:s0
|
||||
|
||||
# NFC
|
||||
/dev/pn547 u:object_r:nfc_device:s0
|
||||
|
||||
# Sensors
|
||||
/efs/FactoryApp/baro_delta u:object_r:sensors_efs_file:s0
|
||||
/efs/gyro_cal_data u:object_r:sensors_efs_file:s0
|
||||
|
||||
# WiFi
|
||||
/data/.wifiver.info u:object_r:wifi_data_file:s0
|
||||
/efs/wifi(/.*)? u:object_r:wifi_efs_file:s0
|
||||
|
2
sepolicy/mediaserver.te
Normal file
2
sepolicy/mediaserver.te
Normal file
|
@ -0,0 +1,2 @@
|
|||
allow mediaserver sysfs_camera:dir search;
|
||||
allow mediaserver sysfs_camera:file { getattr open read };
|
3
sepolicy/mm-qcamerad.te
Normal file
3
sepolicy/mm-qcamerad.te
Normal file
|
@ -0,0 +1,3 @@
|
|||
allow mm-qcamerad sysfs_camera:dir search;
|
||||
allow mm-qcamerad sysfs_camera:file { getattr open read write };
|
||||
type_transition mm-qcamerad system_data_file:sock_file camera_socket "cam_socket3";
|
1
sepolicy/rild.te
Normal file
1
sepolicy/rild.te
Normal file
|
@ -0,0 +1 @@
|
|||
allow rild proc_net:file { write };
|
1
sepolicy/rmt_storage.te
Normal file
1
sepolicy/rmt_storage.te
Normal file
|
@ -0,0 +1 @@
|
|||
allow rmt_storage ssd_device:blk_file { open read write };
|
3
sepolicy/system_app.te
Normal file
3
sepolicy/system_app.te
Normal file
|
@ -0,0 +1,3 @@
|
|||
allow system_app sysfs_display:file { getattr open read write };
|
||||
allow system_app sysfs_vibeamp:dir search;
|
||||
allow system_app sysfs_vibeamp:file { getattr open read write };
|
7
sepolicy/system_server.te
Normal file
7
sepolicy/system_server.te
Normal file
|
@ -0,0 +1,7 @@
|
|||
allow system_server efs_file:dir search;
|
||||
allow system_server sensors_efs_file:file { open read };
|
||||
allow system_server sysfs_vibeamp:dir search;
|
||||
allow system_server sysfs_vibeamp:file { open read write };
|
||||
allow system_server sysfs_thermal:dir search;
|
||||
allow system_server sysfs_thermal:file { open read write };
|
||||
allow system_server time_daemon:unix_stream_socket connectto;
|
2
sepolicy/time_daemon.te
Normal file
2
sepolicy/time_daemon.te
Normal file
|
@ -0,0 +1,2 @@
|
|||
allow time_daemon time_data_file:file { getattr append unlink };
|
||||
allow time_daemon time_data_file:dir { remove_name };
|
2
sepolicy/ueventd.te
Normal file
2
sepolicy/ueventd.te
Normal file
|
@ -0,0 +1,2 @@
|
|||
allow ueventd sysfs_camera:file { open read write };
|
||||
allow ueventd sysfs_vibeamp:file { open read write };
|
3
sepolicy/wpa.te
Normal file
3
sepolicy/wpa.te
Normal file
|
@ -0,0 +1,3 @@
|
|||
allow wpa efs_file:dir search;
|
||||
allow wpa wifi_efs_file:dir search;
|
||||
allow wpa wifi_efs_file:file { open read };
|
Loading…
Reference in a new issue