From: Andreas Schneider Date: Mon, 25 May 2020 17:59:09 +0000 (+0200) Subject: common: Allow lhd to access bbd sysfs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e25e59b29f583ed8007012186ce6dd9653cc3553;p=GitHub%2FLineageOS%2Fandroid_device_samsung_slsi_sepolicy.git common: Allow lhd to access bbd sysfs Change-Id: Ib3bdd52dd8718ae06f71f83c7e86d402a5ea7851 --- diff --git a/common/vendor/file.te b/common/vendor/file.te index f125b41..b08e3a4 100644 --- a/common/vendor/file.te +++ b/common/vendor/file.te @@ -28,6 +28,7 @@ type epicd_socket, file_type, data_file_type; ### SYSFS type sysfs_argos, sysfs_type, r_fs_type, fs_type; type sysfs_battery, sysfs_type, r_fs_type, fs_type; +type sysfs_bbd, sysfs_type, r_fs_type, fs_type; type sysfs_fingerprint, sysfs_type, r_fs_type, fs_type; type sysfs_iio, sysfs_type, r_fs_type, fs_type; type sysfs_input, sysfs_type, r_fs_type, fs_type; diff --git a/common/vendor/genfs_contexts b/common/vendor/genfs_contexts index 431c034..7613576 100644 --- a/common/vendor/genfs_contexts +++ b/common/vendor/genfs_contexts @@ -1,6 +1,8 @@ # genfs_contexts ### SYSFS +genfscon sysfs /bbd u:object_r:sysfs_bbd:s0 + genfscon sysfs /bus/iio/devices u:object_r:sysfs_iio:s0 genfscon sysfs /class/backlight/ u:object_r:sysfs_backlight_writable:s0 diff --git a/common/vendor/lhd.te b/common/vendor/lhd.te index fa27fca..12e28c0 100644 --- a/common/vendor/lhd.te +++ b/common/vendor/lhd.te @@ -24,6 +24,9 @@ allow lhd bbd_device:chr_file rw_file_perms; # /dev/socket/fwmarkd allow lhd fwmarkd_socket:sock_file write; +# /sys/bbd/lk_enable +r_dir_file(lhd, sysfs_bbd) + # /sys/class/sec/gps allow lhd sysfs_sec_gps:dir r_dir_perms; allow lhd sysfs_sec_gps:file r_file_perms;