Sepolicy: Allow getattr for otapreopt_slot
Allow getattr on links for otapreopt_slot. It reads links (to the
boot image oat files) when collecting the size of the artifacts
for logging purposes.
Bug: 30832951
Test: m
Change-Id: If97f7a77fc9bf334a4ce8a613c212ec2cfc4c581
diff --git a/public/otapreopt_slot.te b/public/otapreopt_slot.te
index 5745ba7..5f037c5 100644
--- a/public/otapreopt_slot.te
+++ b/public/otapreopt_slot.te
@@ -10,7 +10,7 @@
# The otapreopt_slot renames the OTA dalvik-cache to the regular dalvik-cache, and cleans up
# the directory afterwards. For logging of aggregate size, we need getattr.
allow otapreopt_slot ota_data_file:dir { rw_dir_perms rename reparent rmdir };
-allow otapreopt_slot ota_data_file:file { getattr };
+allow otapreopt_slot ota_data_file:{ file lnk_file } getattr;
# Delete old content of the dalvik-cache.
allow otapreopt_slot dalvikcache_data_file:dir { add_name getattr open read remove_name rmdir search write };