Allow odrefresh to access dalvik system properties

We recently started to forward dalvik related system properties to
CompOS for odrefresh to use.  The properties are set indeed, but we
still need to allow odrefresh to use.

Bug: 231579544
Test: Cherry pick aosp/2096406, run composd_cmd test-compile
      See ro.dalvik.vm.*, dalvik.vm.* and
      persist.device_config.runtime_native_boot.enable_uffd_gc
      properties in cache-info.xml
Ignore-AOSP-First: Will cherry pick
Change-Id: I5a44384bf39c572878b1d305c3df9860d9324eda
This commit is contained in:
Victor Hsieh 2022-05-13 15:22:16 -07:00
parent ee5fc96178
commit 82481e5ead

View file

@ -35,7 +35,10 @@ allow odrefresh compos:fifo_file read;
# fail immediately. See b/210909688.
allow odrefresh compos:fd use;
# Silently ignore the access to properties. Unlike on Android, parameters
# should be passed from command line to avoid global state.
# Allow odrefresh to read all dalvik system properties. odrefresh needs to record the relevant ones
# in the output for later verification check.
get_prop(odrefresh, dalvik_config_prop)
get_prop(odrefresh, device_config_runtime_native_boot_prop)
# Silently ignore the write to properties, e.g. for setting boot animation progress.
dontaudit odrefresh property_socket:sock_file write;
dontaudit odrefresh dalvik_config_prop:file read;