Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc96e6e9 authored by Francescodario Cuzzocrea's avatar Francescodario Cuzzocrea Committed by ivanmeler
Browse files

universal8890: sepolicy: label hrm sysfs and allow sensor hal to rw permission on it

Change-Id: Ie115c4214f85eb408209cd2ee073206240a0a8ea
parent 6bf54b93
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ type sysfs_dsm, fs_type, sysfs_type, mlstrustedobject;
type sysfs_graphics, sysfs_type, fs_type, mlstrustedobject;
type sysfs_hall, sysfs_type, fs_type, mlstrustedobject;
type sysfs_hmt, fs_type, sysfs_type, mlstrustedobject;
type sysfs_hrm, fs_type, sysfs_type, mlstrustedobject;
type sysfs_jack, sysfs_type, fs_type, mlstrustedobject;
type sysfs_lhd, fs_type, sysfs_type, mlstrustedobject;
type sysfs_light, fs_type, sysfs_type, mlstrustedobject;
+3 −0
Original line number Diff line number Diff line
@@ -175,6 +175,9 @@
# HMT relay mode node
/sys/devices/virtual/relay_on                       u:object_r:sysfs_hmt:s0

# HRM
/sys/devices/virtual/input/input4(/.*)?             u:object_r:sysfs_hrm:s0

# IIO
/sys/bus/iio/devices(/.*)?                                                            u:object_r:sysfs_iio:s0
/sys/devices/[a-f0-9]+\.adc/iio:device[0-9](/.*)?                                     u:object_r:sysfs_iio:s0
+6 −1
Original line number Diff line number Diff line
@@ -15,13 +15,18 @@ allow hal_sensors_default {
}:file r_file_perms;

allow hal_sensors_default {
    sysfs_hrm
    sysfs_spi_writeable
    sysfs_ssp
}:dir r_dir_perms;

allow hal_sensors_default {
    sysfs_hrm
    sysfs_spi_writeable
    sysfs_ssp
}:file rw_file_perms;

allow hal_sensors_default sysfs_iio:lnk_file r_file_perms;
allow hal_sensors_default {
    sysfs_hrm
    sysfs_iio
}:lnk_file r_file_perms;