common: Allow lhd to access bbd sysfs
authorAndreas Schneider <asn@cryptomilk.org>
Mon, 25 May 2020 17:59:09 +0000 (19:59 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 25 May 2020 18:01:36 +0000 (20:01 +0200)
Change-Id: Ib3bdd52dd8718ae06f71f83c7e86d402a5ea7851

common/vendor/file.te
common/vendor/genfs_contexts
common/vendor/lhd.te

index f125b415cf1f9fe6574f82505c1bb469620c2c54..b08e3a4fe09366881054ceb22e54e8d63e057777 100644 (file)
@@ -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;
index 431c0347d885409c0654b9a91c9aea7559eaacac..761357685b9f5d9363a48634e17b98a8b27af15d 100644 (file)
@@ -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
index fa27fcaa1671b6aaba25d82c013652ecfb699040..12e28c00e4370957102e0280cd094a35d667f982 100644 (file)
@@ -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;