Merge "Add microdroid sepolicy test support" am: 47b3505fbf

Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1978387

Change-Id: I70801b12abc3d614d503c584ff0451a20d87d285
This commit is contained in:
Treehugger Robot 2022-02-11 00:37:00 +00:00 committed by Automerger Merge Worker
commit 6fa204250e
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;