Merge "Allow service managers access to apex data."

This commit is contained in:
Rob Seymour 2022-10-14 18:04:46 +00:00 committed by Gerrit Code Review
commit 9833c60b35
7 changed files with 30 additions and 0 deletions

View file

@ -28,3 +28,6 @@ set_prop(servicemanager, servicemanager_prop)
# servicemanager is using bootstrap bionic
use_bootstrap_libs(servicemanager)
# servicemanager is using apex_info via libvintf
use_apex_info(servicemanager)

View file

@ -960,3 +960,11 @@ define(`use_bootstrap_libs', `
allow $1 system_bootstrap_lib_file:dir r_dir_perms;
allow $1 system_bootstrap_lib_file:file { execute read open getattr map };
')
######################################
# use_apex_info(domain)
# Allow access to apex information
define(`use_apex_info', `
allow $1 apex_mnt_dir:dir r_dir_perms;
allow $1 apex_info_file:file r_file_perms;
')

View file

@ -22,3 +22,5 @@ allow binderservicedomain keystore:keystore2 { get_state };
allow binderservicedomain keystore:keystore2_key { delete get_info rebind use };
use_keystore(binderservicedomain)
# binderservicedomain is using apex_info via libvintf
use_apex_info(binderservicedomain)

View file

@ -10,3 +10,6 @@ set_prop(hwservicemanager, hwservicemanager_prop)
# hwservicemanager is using bootstrap bionic
use_bootstrap_libs(hwservicemanager)
# hwservicemanager is using apex_info via libvintf
use_apex_info(hwservicemanager)

View file

@ -40,3 +40,6 @@ allow keystore vold:binder transfer;
# system property, an exception is added for init as well.
set_prop(keystore, keystore_crash_prop)
neverallow { domain -keystore -init } keystore_crash_prop:property_service set;
# keystore is using apex_info via libvintf
use_apex_info(keystore)

View file

@ -9,3 +9,6 @@ set_prop(servicemanager, servicemanager_prop)
# servicemanager is using bootstrap bionic
use_bootstrap_libs(servicemanager)
# servicemanager is using apex_info via libvintf
use_apex_info(servicemanager)

View file

@ -1036,3 +1036,11 @@ define(`use_bootstrap_libs', `
allow $1 system_bootstrap_lib_file:dir r_dir_perms;
allow $1 system_bootstrap_lib_file:file { execute read open getattr map };
')
######################################
# use_apex_info(domain)
# Allow access to apex information
define(`use_apex_info', `
allow $1 apex_mnt_dir:dir r_dir_perms;
allow $1 apex_info_file:file r_file_perms;
')