Add /dev/diag support in policy.

Change-Id: Ife106263a39501959f9779c601dfbe17d5854c3f
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 96fc2c6..8464813 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -53,6 +53,7 @@
         device.te \
         drmserver.te \
         file.te \
+        rild.te \
         sensors_config.te \
         shell.te \
         surfaceflinger.te \
diff --git a/sepolicy/device.te b/sepolicy/device.te
index 98d57c3..b997573 100644
--- a/sepolicy/device.te
+++ b/sepolicy/device.te
@@ -2,3 +2,4 @@
 type elan_ip_device, dev_type;
 type sensors_block_device, dev_type;
 type sysfs_devices_tegradc, dev_type;
+type diag_device, dev_type;
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 5996ed0..772943d 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -1,4 +1,5 @@
 /dev/block/platform/sdhci-tegra.3/by-name/PER     u:object_r:sensors_block_device:s0
+/dev/diag                         u:object_r:diag_device:s0
 /dev/elan-iap                     u:object_r:elan_ip_device:s0
 /dev/knvmap                       u:object_r:knv_device:s0
 /dev/lightsensor                  u:object_r:sensors_device:s0
diff --git a/sepolicy/rild.te b/sepolicy/rild.te
new file mode 100644
index 0000000..4ba75e9
--- /dev/null
+++ b/sepolicy/rild.te
@@ -0,0 +1 @@
+allow rild diag_device:chr_file rw_file_perms;
diff --git a/sepolicy/system.te b/sepolicy/system.te
index 828c5fb..c370b77 100644
--- a/sepolicy/system.te
+++ b/sepolicy/system.te
@@ -2,3 +2,4 @@
 allow system sysfs_devices_system_cpu:file w_file_perms;
 allow system sysfs_devices_system_cpu:dir r_dir_perms;
 allow system elan_ip_device:chr_file rw_file_perms;
+allow system diag_device:chr_file rw_file_perms;