aboutsummaryrefslogtreecommitdiffstats
path: root/sepolicy/geomagneticd.te
diff options
context:
space:
mode:
authorZiyan <jaraidaniel@gmail.com>2016-03-04 03:48:25 +0100
committerAndreas Blaesius <skate4life@gmx.de>2016-03-29 19:44:18 +0200
commit491824c82435b9e22aa95da3e8a554956e3d74b6 (patch)
treecf3ba3fadbdc8e8689c7af77a64c73e804b44a0c /sepolicy/geomagneticd.te
parentd7911aa4d4f13863ae26e6d8f485cf0e106e3167 (diff)
downloaddevice_samsung_espressowifi-491824c82435b9e22aa95da3e8a554956e3d74b6.zip
device_samsung_espressowifi-491824c82435b9e22aa95da3e8a554956e3d74b6.tar.gz
device_samsung_espressowifi-491824c82435b9e22aa95da3e8a554956e3d74b6.tar.bz2
libsensors: fix selinux denials
Moved geomagneticd calibration data to /data/sensors to allow relabeling it. Change-Id: Ibe596b5903aa309f862a568b9876e79acaff5d19
Diffstat (limited to 'sepolicy/geomagneticd.te')
-rw-r--r--sepolicy/geomagneticd.te17
1 files changed, 11 insertions, 6 deletions
diff --git a/sepolicy/geomagneticd.te b/sepolicy/geomagneticd.te
index fe1dd42..ddfa01e 100644
--- a/sepolicy/geomagneticd.te
+++ b/sepolicy/geomagneticd.te
@@ -4,9 +4,14 @@ type geomagneticd_exec, exec_type, file_type;
init_daemon_domain(geomagneticd)
-allow geomagneticd input_device:chr_file { read open ioctl };
-allow geomagneticd input_device:dir { search read open };
-allow geomagneticd self:process { execmem };
-allow geomagneticd sensor_data_file:dir { write add_name remove_name create };
-allow geomagneticd sensor_data_file:file { create open read write getattr setattr rename };
-allow geomagneticd sysfs:file { write };
+# the sensor is an input device
+allow geomagneticd input_device:chr_file rw_file_perms;
+allow geomagneticd input_device:dir r_dir_perms;
+
+# store/read calibration data
+allow geomagneticd sensors_data_file:dir w_dir_perms;
+allow geomagneticd sensors_data_file:file create_file_perms;
+
+# read/write calibration offsets
+# TODO: create own label
+allow geomagneticd sysfs:file write;