pixel-sepolicy/ramdump: Add sepolicies for ramdump types & domain
Bug: 160434722
Bug: 161103878
Change-Id: I7950c5eb9c3845da397e2c37aaf28234d8a8a6fe
diff --git a/ramdump/common/file.te b/ramdump/common/file.te
new file mode 100644
index 0000000..e1382df
--- /dev/null
+++ b/ramdump/common/file.te
@@ -0,0 +1,2 @@
+type ramdump_vendor_data_file, file_type, data_file_type, mlstrustedobject;
+type ramdump_vendor_mnt_file, file_type, data_file_type, mlstrustedobject;
diff --git a/ramdump/common/file_contexts b/ramdump/common/file_contexts
new file mode 100644
index 0000000..f5fbd93
--- /dev/null
+++ b/ramdump/common/file_contexts
@@ -0,0 +1,3 @@
+/vendor/bin/ramdump u:object_r:ramdump_exec:s0
+/data/vendor/ramdump(/.*)? u:object_r:ramdump_vendor_data_file:s0
+/mnt/vendor/ramdump(/.*)? u:object_r:ramdump_vendor_mnt_file:s0
diff --git a/ramdump/common/property.te b/ramdump/common/property.te
new file mode 100644
index 0000000..51a37c8
--- /dev/null
+++ b/ramdump/common/property.te
@@ -0,0 +1 @@
+type vendor_ramdump_prop, property_type;
diff --git a/ramdump/common/property_contexts b/ramdump/common/property_contexts
new file mode 100644
index 0000000..25749fa
--- /dev/null
+++ b/ramdump/common/property_contexts
@@ -0,0 +1,2 @@
+ro.boot.ramdump u:object_r:vendor_ramdump_prop:s0
+vendor.debug.ramdump. u:object_r:vendor_ramdump_prop:s0