review vcd and remove obsolete declarations
Bug: 196916111
Test: boot with vcd started
Change-Id: Ic82975e998dad4437c38afc625a7a88428417b7a
diff --git a/legacy/file.te b/legacy/file.te
index a0b0521..17c8c0b 100644
--- a/legacy/file.te
+++ b/legacy/file.te
@@ -5,12 +5,7 @@
# Exynos Log Files
type vendor_log_file, file_type, data_file_type;
-type vendor_cbd_log_file, file_type, data_file_type;
type vendor_rfsd_log_file, file_type, data_file_type;
-type vendor_dump_log_file, file_type, data_file_type;
-type vendor_rild_log_file, file_type, data_file_type;
-type vendor_telephony_log_file, file_type, data_file_type;
-type vendor_vcd_log_file, file_type, data_file_type;
# app data files
type vendor_test_data_file, file_type, data_file_type;
diff --git a/legacy/file_contexts b/legacy/file_contexts
index 711c7d2..7c75972 100644
--- a/legacy/file_contexts
+++ b/legacy/file_contexts
@@ -119,7 +119,6 @@
/(vendor|system/vendor)/bin/hw/lhd u:object_r:lhd_exec:s0
/(vendor|system/vendor)/bin/hw/rild_exynos u:object_r:rild_exec:s0
/(vendor|system/vendor)/bin/rfsd u:object_r:rfsd_exec:s0
-/(vendor|system/vendor)/bin/vcd u:object_r:vcd_exec:s0
/(vendor|system/vendor)/bin/bipchmgr u:object_r:bipchmgr_exec:s0
#
@@ -132,11 +131,7 @@
# Exynos Log Files
#
/data/vendor/log(/.*)? u:object_r:vendor_log_file:s0
-/data/vendor/log/cbd(/.*)? u:object_r:vendor_cbd_log_file:s0
/data/vendor/log/rfsd(/.*)? u:object_r:vendor_rfsd_log_file:s0
-/data/vendor/log/dump(/.*)? u:object_r:vendor_dump_log_file:s0
-/data/vendor/log/rild(/.*)? u:object_r:vendor_rild_log_file:s0
-/data/vendor/log/vcd(/.*)? u:object_r:vendor_vcd_log_file:s0
/persist/sensorcal\.json u:object_r:sensors_cal_file:s0
diff --git a/legacy/vcd.te b/legacy/vcd.te
deleted file mode 100644
index c4af485..0000000
--- a/legacy/vcd.te
+++ /dev/null
@@ -1,11 +0,0 @@
-type vcd, domain;
-type vcd_exec, vendor_file_type, exec_type, file_type;
-init_daemon_domain(vcd)
-
-get_prop(vcd, vendor_rild_prop);
-get_prop(vcd, vendor_persist_config_default_prop);
-
-allow vcd serial_device:chr_file rw_file_perms;
-allow vcd radio_device:chr_file rw_file_perms;
-allow vcd self:tcp_socket { create_socket_perms_no_ioctl listen accept };
-allow vcd node:tcp_socket node_bind;
diff --git a/whitechapel_pro/file_contexts b/whitechapel_pro/file_contexts
index e23f084..b584a42 100644
--- a/whitechapel_pro/file_contexts
+++ b/whitechapel_pro/file_contexts
@@ -2,6 +2,7 @@
/vendor/bin/dmd u:object_r:dmd_exec:s0
/vendor/bin/modem_logging_control u:object_r:modem_logging_control_exec:s0
/vendor/bin/sced u:object_r:sced_exec:s0
+/vendor/bin/vcd u:object_r:vcd_exec:s0
# Vendor Firmwares
/vendor/firmware(/.*)? u:object_r:vendor_fw_file:s0
diff --git a/whitechapel_pro/vcd.te b/whitechapel_pro/vcd.te
new file mode 100644
index 0000000..211d367
--- /dev/null
+++ b/whitechapel_pro/vcd.te
@@ -0,0 +1,12 @@
+type vcd, domain;
+type vcd_exec, vendor_file_type, exec_type, file_type;
+userdebug_or_eng(`
+ init_daemon_domain(vcd)
+
+ get_prop(vcd, vendor_rild_prop);
+
+ allow vcd serial_device:chr_file rw_file_perms;
+ allow vcd radio_device:chr_file rw_file_perms;
+ allow vcd self:tcp_socket { create_socket_perms_no_ioctl listen accept };
+ allow vcd node:tcp_socket node_bind;
+')