Skip to content
Snippets Groups Projects
Commit 9e80bfc8 authored by Calin Juravle's avatar Calin Juravle
Browse files

Allow profman to resolve symlinks on dirs

When opening the dex files we sometime need to check for the real location
of the file (even if it was open via an fd).

Denial example:

avc: denied { getattr } for comm="profman" path="/data/app" dev="sda13"
ino=1048577 scontext=u:r:profman:s0 tcontext=u:object_r:apk_data_file:s0
tclass=dir permissive=0

Test: verify we get no denials when taking a profile snapshot.
Bug: 77922323
Change-Id: Ifa5570656c644819d14f46af74e4c15e903a8a54
parent 26ee5a85
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,9 @@ allow profman user_profile_data_file:file { getattr read write lock }; ...@@ -6,7 +6,9 @@ allow profman user_profile_data_file:file { getattr read write lock };
# Dumping profile info opens the application APK file for pretty printing. # Dumping profile info opens the application APK file for pretty printing.
allow profman asec_apk_file:file { read }; allow profman asec_apk_file:file { read };
allow profman apk_data_file:file { read }; allow profman apk_data_file:file { getattr read };
allow profman apk_data_file:dir { getattr read search };
allow profman oemfs:file { read }; allow profman oemfs:file { read };
# Reading an APK opens a ZipArchive, which unpack to tmpfs. # Reading an APK opens a ZipArchive, which unpack to tmpfs.
allow profman tmpfs:file { read }; allow profman tmpfs:file { read };
...@@ -18,6 +20,7 @@ allow profman installd:fd use; ...@@ -18,6 +20,7 @@ allow profman installd:fd use;
# are application dex files reported back to the framework when using # are application dex files reported back to the framework when using
# BaseDexClassLoader. # BaseDexClassLoader.
allow profman app_data_file:file { getattr read write lock }; allow profman app_data_file:file { getattr read write lock };
allow profman app_data_file:dir { getattr read search };
### ###
### neverallow rules ### neverallow rules
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment