Merge "Support fine grain read access control for properties"
diff --git a/bootanim.te b/bootanim.te
index 9e04c04..ee5bcae 100644
--- a/bootanim.te
+++ b/bootanim.te
@@ -1,5 +1,5 @@
 # bootanimation oneshot service
-type bootanim, domain, domain_deprecated;
+type bootanim, domain;
 type bootanim_exec, exec_type, file_type;
 
 init_daemon_domain(bootanim)
@@ -17,3 +17,24 @@
 allow bootanim audio_device:chr_file rw_file_perms;
 
 allow bootanim surfaceflinger_service:service_manager find;
+
+# For /acct/uid/*/tasks.
+allow bootanim cgroup:dir { search write };
+allow bootanim cgroup:file w_file_perms;
+
+# debugfs access
+allow bootanim debugfs:dir r_dir_perms;
+allow bootanim debugfs:file w_file_perms;
+
+# Allow access to ion memory allocation device
+allow bootanim ion_device:chr_file rw_file_perms;
+
+# Read access to pseudo filesystems.
+r_dir_file(bootanim, proc)
+r_dir_file(bootanim, sysfs)
+r_dir_file(bootanim, sysfs_devices_system_cpu)
+r_dir_file(bootanim, cgroup)
+allow bootanim proc_cpuinfo:file r_file_perms;
+
+# System file accesses.
+allow bootanim system_file:dir r_dir_perms;
diff --git a/mdnsd.te b/mdnsd.te
index 43ef267..a9dc7c5 100644
--- a/mdnsd.te
+++ b/mdnsd.te
@@ -1,6 +1,9 @@
 # mdns daemon
-type mdnsd, domain, domain_deprecated, mlstrustedsubject;
+type mdnsd, domain, mlstrustedsubject;
 type mdnsd_exec, exec_type, file_type;
 
 init_daemon_domain(mdnsd)
 net_domain(mdnsd)
+
+# Read from /proc/net
+r_dir_file(mdnsd, proc_net)
diff --git a/priv_app.te b/priv_app.te
index a92b6eb..2ff9a37 100644
--- a/priv_app.te
+++ b/priv_app.te
@@ -60,6 +60,10 @@
   allow priv_app perfprofd_data_file:dir r_dir_perms;
 ')
 
+# Allow GMS core to stat files and executables on
+# the system partition
+allow priv_app exec_type:file getattr;
+
 ###
 ### neverallow rules
 ###
diff --git a/shell.te b/shell.te
index a02fbd0..e0c318f 100644
--- a/shell.te
+++ b/shell.te
@@ -71,6 +71,7 @@
 # Directory read access and file write access is already granted
 # in domain.te.
 allow shell debugfs:file r_file_perms;
+allow shell debugfs:dir search;
 allow shell atrace_exec:file rx_file_perms;
 
 userdebug_or_eng(`
@@ -97,6 +98,10 @@
 # allow shell to read /proc/pid/attr/current for ps -Z
 allow shell domain:process getattr;
 
+# Allow pulling the SELinux policy for CTS purposes
+allow shell selinuxfs:dir r_dir_perms;
+allow shell selinuxfs:file r_file_perms;
+
 # enable shell domain to read/write files/dirs for bootchart data
 # User will creates the start and stop file via adb shell
 # and read other files created by init process under /data/bootchart
@@ -113,3 +118,6 @@
 # bugs, so we want to ensure the shell user never has this
 # capability.
 neverallow shell file_type:file link;
+
+# Allow access to ion memory allocation device.
+allow shell ion_device:chr_file { open read };