Skip to content
Snippets Groups Projects
Commit ecc09871 authored by Jiyong Park's avatar Jiyong Park
Browse files

Allow apexd to realpath(3) on apex_key_files

apexd uses realpath(3) to ensure that the public key file that will use
is under /system/etc/security/apex directory. In order to support it,
allow apexd to getattr on apex_key_files.

The canonicalization is required because the key name from APEX might be
wrong. For example, if the key name from an APEX is '../../some/path'
then apexd will use '/system/etc/security/apex/../../some/path' as the
public key file, which is incorrect.

Bug: 115721587
Test: m apex.test; m
/apex/com.android.example.apex@1 exists

Change-Id: I6dc5efa0de369f8497e4f6526e0164e2de589c67
parent a26763ec
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ typeattribute apexd coredomain; ...@@ -3,7 +3,7 @@ typeattribute apexd coredomain;
init_daemon_domain(apexd) init_daemon_domain(apexd)
# Read /system/etc/security/apex_debug_key # Read /system/etc/security/apex_debug_key
allow apexd apex_key_file:dir search; allow apexd apex_key_file:dir { search getattr };
allow apexd apex_key_file:file r_file_perms; allow apexd apex_key_file:file r_file_perms;
# Allow reading and writing of APEX files in the APEX data dir # Allow reading and writing of APEX files in the APEX data dir
......
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