Add rules for /system/bin/tzdatacheck

Bug: 19941636
Change-Id: I7cc61e058424c856da88f11ff9b259f34cb39dc7
diff --git a/file_contexts b/file_contexts
index fcb22e9..eef0fd3 100644
--- a/file_contexts
+++ b/file_contexts
@@ -175,6 +175,7 @@
 /system/bin/patchoat    u:object_r:dex2oat_exec:s0
 /system/bin/sgdisk      u:object_r:sgdisk_exec:s0
 /system/bin/blkid       u:object_r:blkid_exec:s0
+/system/bin/tzdatacheck u:object_r:tzdatacheck_exec:s0
 
 #############################
 # Vendor files
diff --git a/tzdatacheck.te b/tzdatacheck.te
new file mode 100644
index 0000000..a95dc0d
--- /dev/null
+++ b/tzdatacheck.te
@@ -0,0 +1,8 @@
+# The tzdatacheck command run by init.
+type tzdatacheck, domain;
+type tzdatacheck_exec, exec_type, file_type;
+
+init_daemon_domain(tzdatacheck)
+
+allow tzdatacheck zoneinfo_data_file:dir create_dir_perms;
+allow tzdatacheck zoneinfo_data_file:file unlink;