summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuchi Kandoi <kandoiruchi@google.com>2017-03-30 15:09:34 -0700
committerRuchi Kandoi <kandoiruchi@google.com>2017-03-30 15:10:58 -0700
commitf1321a0e3dd3c517f7f65945e531c707a7a84dbe (patch)
tree0685668cf7aed58e134f672a7b87a710481fed05
parent1ff3a514443fe5e12a1f75e480b505d8c827854f (diff)
downloadangler-f1321a0e3dd3c517f7f65945e531c707a7a84dbe.tar.gz
nfc: sepolicy: creates data/vendor/nfc/ for HAL specific data
Test: NFC powers up without any denials Bug: 36645109 Change-Id: Ie2fc3b5e900257b40a9ac5e7830315cbe9c7d474 Signed-off-by: Ruchi Kandoi<kandoiruchi@google.com>
-rwxr-xr-xinit.angler.rc1
-rw-r--r--sepolicy/file.te2
-rw-r--r--sepolicy/file_contexts1
-rw-r--r--sepolicy/nfc_hal_pn54x.te4
4 files changed, 6 insertions, 2 deletions
diff --git a/init.angler.rc b/init.angler.rc
index e5b8148..775344a 100755
--- a/init.angler.rc
+++ b/init.angler.rc
@@ -227,6 +227,7 @@ on post-fs-data
# Create nfc local data
mkdir /data/nfc 0770 nfc nfc
+ mkdir /data/vendor/nfc 0770 nfc nfc
#modify access for speaker calibdata
chown system system /persist/audio/speaker_calibdata.bin
diff --git a/sepolicy/file.te b/sepolicy/file.te
index 7582be8..1b98df5 100644
--- a/sepolicy/file.te
+++ b/sepolicy/file.te
@@ -35,3 +35,5 @@ type cnd_data_file, file_type, data_file_type;
type sysfs_wifi_sar, fs_type, sysfs_type;
type sysfs_lcd_mipi, fs_type, sysfs_type;
+
+type nfc_vendor_data_file, file_type, data_file_type;
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 3447439..8f14b8c 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -168,6 +168,7 @@
/data/misc/perfd(/.*)? u:object_r:perfd_data_file:s0
/data/misc/radio(/.*)? u:object_r:radio_data_file:s0
/data/nfc(/.*)? u:object_r:nfc_data_file:s0
+/data/vendor/nfc(/.*)? u:object_r:nfc_vendor_data_file:s0
/data/ramdump(/.*)? u:object_r:ssr_data_file:s0
/data/system/perfd(/.*)? u:object_r:perfd_data_file:s0
/data/time(/.*)? u:object_r:time_data_file:s0
diff --git a/sepolicy/nfc_hal_pn54x.te b/sepolicy/nfc_hal_pn54x.te
index 2830a71..264bed6 100644
--- a/sepolicy/nfc_hal_pn54x.te
+++ b/sepolicy/nfc_hal_pn54x.te
@@ -20,8 +20,8 @@ set_prop(nfc_hal_pn54x, nfc_prop)
allow nfc_hal_pn54x nfc_device:chr_file rw_file_perms;
# Data file accesses.
-allow nfc_hal_pn54x nfc_data_file:dir create_dir_perms;
-allow nfc_hal_pn54x nfc_data_file:notdevfile_class_set create_file_perms;
+allow nfc_hal_pn54x nfc_vendor_data_file:dir create_dir_perms;
+allow nfc_hal_pn54x nfc_vendor_data_file:notdevfile_class_set create_file_perms;
allow nfc_hal_pn54x sysfs_nfc_power_writable:file rw_file_perms;
allow nfc_hal_pn54x sysfs:file write;