sepolicy: Allow init to create xcap sockets

I auditd  : type=1400 audit(0.0:191): avc: denied { create } for comm="init" name="vendor.xcap" scontext=u:r:init:s0 tcontext=u:object_r:socket_device:s0 tclass=sock_file permissive=0

Change-Id: I44fade622638a8ea64afcb6569515ca2c231c84c
diff --git a/basic/non_plat/file.te b/basic/non_plat/file.te
index 72b59fa..c045242 100644
--- a/basic/non_plat/file.te
+++ b/basic/non_plat/file.te
@@ -631,6 +631,8 @@
 # thermal core socket file
 type thermal_socket, file_type;
 
+type xcap_socket, file_type;
+
 # Data : 2021/08/24
 # Operaton: S development
 # Purpose: Add permission for node /proc/dma_heap
diff --git a/basic/non_plat/file_contexts b/basic/non_plat/file_contexts
index eb50d26..e3fac82 100644
--- a/basic/non_plat/file_contexts
+++ b/basic/non_plat/file_contexts
@@ -402,6 +402,8 @@
 /dev/socket/thermal_socket(/.*)? u:object_r:thermal_socket:s0
 /dev/socket/thermal_hal_socket(/.*)? u:object_r:thermal_hal_socket:s0
 
+/dev/socket/vendor.xcap(/.*)?         u:object_r:xcap_socket:s0
+
 /dev/stpant(/.*)?   u:object_r:stpant_device:s0
 /dev/stpbt(/.*)?    u:object_r:stpbt_device:s0
 /dev/fw_log_bt      u:object_r:fw_log_bt_device:s0
diff --git a/basic/non_plat/init.te b/basic/non_plat/init.te
index 847b7bf..192d345 100644
--- a/basic/non_plat/init.te
+++ b/basic/non_plat/init.te
@@ -144,3 +144,4 @@
 allow init sysfs_mtk_core_ctl:file rw_file_perms;
 
 allow init sysfs_devices_block:file rw_file_perms;
+allow init xcap_socket:sock_file create_file_perms;