Skip to content
Snippets Groups Projects
Commit 2fbecbba authored by Stephen Smalley's avatar Stephen Smalley Committed by Nick Kralevich
Browse files

Allow installd to stat asec files and /data/media files.


Addresses denials such as:
avc: denied { getattr } for comm="installd" path="/data/app-asec/com.vectorunit.red-1.asec" dev="dm-0" ino=578229 scontext=u:r:installd:s0 tcontext=u:object_r:asec_image_file:s0 tclass=file

avc:  denied  { getattr } for  pid=262 comm="installd" path="/data/media/0/Android/data/com.google.android.apps.maps/cache/cache_vts_tran_base_GMM.m" dev="dm-0" ino=124930 scontext=u:r:installd:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file

Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>

(cherry picked from commit d2622fda)

Change-Id: Iac46236ee583dee11a7e6518a9e8eca25c59e9ba
parent f1b92488
No related branches found
No related tags found
No related merge requests found
...@@ -17,8 +17,9 @@ selinux_check_context(installd) ...@@ -17,8 +17,9 @@ selinux_check_context(installd)
# Read /seapp_contexts and /data/security/seapp_contexts # Read /seapp_contexts and /data/security/seapp_contexts
security_access_policy(installd) security_access_policy(installd)
# Search /data/app-asec. # Search /data/app-asec and stat files in it.
allow installd asec_image_file:dir search; allow installd asec_image_file:dir search;
allow installd asec_image_file:file getattr;
# Create /data/user and /data/user/0 if necessary. # Create /data/user and /data/user/0 if necessary.
# Also required to initially create /data/data subdirectories # Also required to initially create /data/data subdirectories
...@@ -29,7 +30,7 @@ allow installd system_data_file:lnk_file { create setattr unlink }; ...@@ -29,7 +30,7 @@ allow installd system_data_file:lnk_file { create setattr unlink };
# Upgrade /data/media for multi-user if necessary. # Upgrade /data/media for multi-user if necessary.
allow installd media_rw_data_file:dir create_dir_perms; allow installd media_rw_data_file:dir create_dir_perms;
allow installd media_rw_data_file:file unlink; allow installd media_rw_data_file:file { getattr unlink };
# restorecon new /data/media directory. # restorecon new /data/media directory.
allow installd system_data_file:dir relabelfrom; allow installd system_data_file:dir relabelfrom;
allow installd media_rw_data_file:dir relabelto; allow installd media_rw_data_file:dir relabelto;
......
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