Merge "Add microdroid sepolicy test support"

This commit is contained in:
Treehugger Robot 2022-02-11 00:22:27 +00:00 committed by Gerrit Code Review
commit 47b3505fbf
2 changed files with 13 additions and 0 deletions

View file

@ -280,3 +280,11 @@ prebuilt_etc {
relative_install_path: "selinux",
installable: false,
}
// For CTS
se_policy_conf {
name: "microdroid_general_sepolicy.conf",
srcs: system_policy_files,
exclude_build_test: true,
installable: false,
}

View file

@ -48,6 +48,11 @@ set_prop(adbd, shell_prop)
# Set service.adb.tcp.port, service.adb.tls.port, persist.adb.wifi.* properties
set_prop(adbd, adbd_prop)
# Allow pulling the SELinux policy for CTS purposes
allow adbd selinuxfs:dir r_dir_perms;
allow adbd selinuxfs:file r_file_perms;
allow adbd kernel:security read_policy;
# adbd tries to run mdnsd, but mdnsd doesn't exist. Just dontaudit ctl permissions.
# TODO(b/200902288): patch adb and remove this rule
dontaudit adbd { ctl_default_prop ctl_start_prop }:property_service set;