From d761cec8e324c8e222d32e13cd14a49d4edf864a Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Sun, 24 Dec 2017 00:54:36 +0000 Subject: [PATCH] msm8937-common: sepolicy: Add debug rules for rmt_storage Change-Id: Ie0c94ac657127b1653afbbb82b06789dfe34032d --- sepolicy/vendor/file.te | 1 + sepolicy/vendor/genfs_contexts | 1 + sepolicy/vendor/rmt_storage.te | 6 ++++++ 3 files changed, 8 insertions(+) create mode 100644 sepolicy/vendor/genfs_contexts diff --git a/sepolicy/vendor/file.te b/sepolicy/vendor/file.te index 95f4577..e34dda4 100644 --- a/sepolicy/vendor/file.te +++ b/sepolicy/vendor/file.te @@ -2,3 +2,4 @@ type fpc_data_file, file_type, data_file_type; type fpce_socket, file_type; type fpc_sysfs, fs_type, sysfs_type; type gx_fpd_data_file, file_type, data_file_type; +type debugfs_rmt, debugfs_type, fs_type; diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts new file mode 100644 index 0000000..f94e9eb --- /dev/null +++ b/sepolicy/vendor/genfs_contexts @@ -0,0 +1 @@ +genfscon debugfs /rmt_storage u:object_r:debugfs_rmt:s0 diff --git a/sepolicy/vendor/rmt_storage.te b/sepolicy/vendor/rmt_storage.te index a89459d..99f032a 100644 --- a/sepolicy/vendor/rmt_storage.te +++ b/sepolicy/vendor/rmt_storage.te @@ -1 +1,7 @@ allow rmt_storage self:capability net_raw; + +# debugfs access +userdebug_or_eng(` + allow rmt_storage debugfs_rmt:dir search; + allow rmt_storage debugfs_rmt:file rw_file_perms; +')