summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormyfluxi <linflux@arcor.de>2016-12-05 22:27:15 +0100
committerdroidfivex <droidfivex@gmail.com>2016-12-14 01:28:14 +0900
commit2420bedb021d6be694a42fc4992c0e498f9abc31 (patch)
treebe88892d06730025ba220059fe5f56b18666ac55
parentdef3c57e7caf3324e880ea5d7f2e0483e97288e8 (diff)
hammerheadcaf: sepolicy: Allow priv app to read smdpkt suspend info
Addresses: avc: denied { read } for pid=3214 comm="Binder:3202_1" name="/" dev="tmpfs" ino=8193 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:device:s0 tclass=dir Change-Id: I104ce7af331a69c7064702cc8121dc7fd643d821
-rw-r--r--sepolicy/file.te1
-rw-r--r--sepolicy/file_contexts1
-rw-r--r--sepolicy/priv_app.te3
3 files changed, 5 insertions, 0 deletions
diff --git a/sepolicy/file.te b/sepolicy/file.te
index 0ff2c21..d445ca5 100644
--- a/sepolicy/file.te
+++ b/sepolicy/file.te
@@ -7,3 +7,4 @@ type persist_camera_file, file_type;
type persist_wifi_file, file_type;
type sysfs_rmnet, fs_type, sysfs_type;
+type sysfs_smdpkt, fs_type, sysfs_type;
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 4aaaade..f58e4c3 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -35,6 +35,7 @@
/sys/devices/platform/bluetooth_rfkill/rfkill/rfkill0/state u:object_r:sysfs_bluetooth_writable:s0
/sys/devices/fdb00000\.qcom,kgsl-3d0/kgsl/kgsl-3d0/gpuclk u:object_r:sysfs_thermal:s0
/sys/devices/fdb00000\.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_gpuclk u:object_r:sysfs_thermal:s0
+/sys/devices/virtual/smdpkt/smdcnt_rev[0-9]/power/runtime_suspended_time u:object_r:sysfs_smdpkt:s0
###################################
# data files
diff --git a/sepolicy/priv_app.te b/sepolicy/priv_app.te
new file mode 100644
index 0000000..a7e70c4
--- /dev/null
+++ b/sepolicy/priv_app.te
@@ -0,0 +1,3 @@
+userdebug_or_eng(`
+ allow priv_app sysfs_smdpkt:dir r_dir_perms;
+')