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
This commit is contained in:
Andreas Gampe 2017-03-17 10:05:31 -07:00
parent 37f7ffa388
commit f7c2613eb1

View File

@ -10,7 +10,7 @@ type otapreopt_slot_exec, exec_type, file_type;
# 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 };