From f7c2613eb14de5ac8b514fb98b4e31b5a2c03fdc Mon Sep 17 00:00:00 2001
From: Andreas Gampe <agampe@google.com>
Date: Fri, 17 Mar 2017 10:05:31 -0700
Subject: [PATCH] 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
---
 public/otapreopt_slot.te | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/public/otapreopt_slot.te b/public/otapreopt_slot.te
index 5745ba786..5f037c56a 100644
--- a/public/otapreopt_slot.te
+++ b/public/otapreopt_slot.te
@@ -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 };
-- 
GitLab