Skip to content
Snippets Groups Projects
Commit 9bef2502 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

system_server: support hard linking for split APKs

Commit 85ce2c70 removed hard link
support from create_file_perms, but system_server requires hard
link support for split APKs. Allow it.

Addresses the following denial:

  audit(0.0:152): avc: denied { link } for name="base.apk" dev="dm-0" ino=816009 scontext=u:r:system_server:s0 tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=0

Steps to reproduce:
1) Find the directory "hellogoogle3.splitapk"
2) adb install-multiple -r hellogoogle3_incremental.apk
3) adb install-multiple -r -p com.google.android.samples.hellogoogle3 native.apk

Expected:
  2nd APK installs successfully.

Actual:
  2nd APK fails to install.

Change-Id: Ib69fc70dd1c7cd158590db3fd117d6b05acf1cf7
parent 8a06c077
No related branches found
No related tags found
No related merge requests found
...@@ -175,7 +175,7 @@ allow system_server keychain_data_file:file create_file_perms; ...@@ -175,7 +175,7 @@ allow system_server keychain_data_file:file create_file_perms;
# Manage /data/app. # Manage /data/app.
allow system_server apk_data_file:dir create_dir_perms; allow system_server apk_data_file:dir create_dir_perms;
allow system_server apk_data_file:file create_file_perms; allow system_server apk_data_file:file { create_file_perms link };
allow system_server apk_tmp_file:dir create_dir_perms; allow system_server apk_tmp_file:dir create_dir_perms;
allow system_server apk_tmp_file:file create_file_perms; allow system_server apk_tmp_file:file create_file_perms;
......
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