Update linkerconfig to generate APEX binary config

Linkerconfig should generate multiple linker configurations for APEX
with binaries. To meet this requirement, linkerconfig should be able to
create sub-directories per APEX module with binary, and also
linkerconfig should be able to scan APEX directories.

Bug: 147987608
Test: m -j passed && No sepolicy error from cuttlefish
Change-Id: I804a8e6121f647dfb1778c564649a33e4547a24a
This commit is contained in:
Kiyoung Kim 2020-01-20 13:40:08 +09:00
parent 2e5ce26f17
commit b55d444c40

View File

@ -4,7 +4,7 @@ type linkerconfig_exec, exec_type, file_type, system_file_type;
init_daemon_domain(linkerconfig)
## Read and write linkerconfig subdirectory.
allow linkerconfig linkerconfig_file:dir rw_dir_perms;
allow linkerconfig linkerconfig_file:dir create_dir_perms;
allow linkerconfig linkerconfig_file:file create_file_perms;
# Allow linkerconfig to log to the kernel.
@ -13,4 +13,7 @@ allow linkerconfig kmsg_device:chr_file w_file_perms;
# Allow linkerconfig to be invoked with logwrapper from init.
allow linkerconfig devpts:chr_file { read write };
# Allow linkerconfig to scan for apex modules
allow linkerconfig apex_mnt_dir:dir r_dir_perms;
neverallow { domain -init -linkerconfig } linkerconfig_exec:file no_x_file_perms;