diff options
author | alk3pInjection <webmaster@raspii.tech> | 2022-05-01 21:36:16 +0800 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2022-05-01 21:36:16 +0800 |
commit | 329b113bc1329f83fe1eecd32213435f8885ca71 (patch) | |
tree | af249b7fce9300b5248cbffe94a08d48fb919f73 /prebuilts/api/32.0/public/simpleperf_app_runner.te | |
parent | 18c07b58901c9d0e7fc0d908ed38146847bab5b3 (diff) | |
parent | d7b93dbd049c0eacfb7ad14677457836c79b38f6 (diff) |
Merge tag 'LA.QSSI.12.0.r1-06800-qssi.0' into sugisawa-mr1HEADsugisawa-mr1
"LA.QSSI.12.0.r1-06800-qssi.0"
Change-Id: I35dbb71151ce8b3bf68b425732a761532c638017
Diffstat (limited to 'prebuilts/api/32.0/public/simpleperf_app_runner.te')
-rw-r--r-- | prebuilts/api/32.0/public/simpleperf_app_runner.te | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/prebuilts/api/32.0/public/simpleperf_app_runner.te b/prebuilts/api/32.0/public/simpleperf_app_runner.te new file mode 100644 index 000000000..2ed007e10 --- /dev/null +++ b/prebuilts/api/32.0/public/simpleperf_app_runner.te @@ -0,0 +1,44 @@ +type simpleperf_app_runner, domain, mlstrustedsubject; +type simpleperf_app_runner_exec, system_file_type, exec_type, file_type; + +# run simpleperf_app_runner in adb shell. +allow simpleperf_app_runner adbd:fd use; +allow simpleperf_app_runner shell:fd use; +allow simpleperf_app_runner devpts:chr_file { read write ioctl }; + +# simpleperf_app_runner reads package information. +allow simpleperf_app_runner system_data_file:file r_file_perms; +allow simpleperf_app_runner system_data_file:lnk_file getattr; +allow simpleperf_app_runner packages_list_file:file r_file_perms; + +# The app's data dir may be accessed through a symlink. +allow simpleperf_app_runner system_data_file:lnk_file read; + +# simpleperf_app_runner switches to the app UID/GID. +allow simpleperf_app_runner self:global_capability_class_set { setuid setgid }; + +# simpleperf_app_runner switches to the app security context. +selinux_check_context(simpleperf_app_runner) # validate context +allow simpleperf_app_runner self:process setcurrent; +allow simpleperf_app_runner untrusted_app_all:process dyntransition; # setcon + +# simpleperf_app_runner/libselinux needs access to seapp_contexts_file to +# determine which domain to transition to. +allow simpleperf_app_runner seapp_contexts_file:file r_file_perms; + +# simpleperf_app_runner passes pipe fds. +# simpleperf_app_runner writes app type (debuggable or profileable) to pipe fds. +allow simpleperf_app_runner shell:fifo_file { read write }; + +# simpleperf_app_runner checks shell data paths. +# simpleperf_app_runner passes shell data fds. +allow simpleperf_app_runner shell_data_file:dir { getattr search }; +allow simpleperf_app_runner shell_data_file:file { getattr write }; + +### +### neverallow rules +### + +# simpleperf_app_runner cannot have capabilities other than CAP_SETUID and CAP_SETGID +neverallow simpleperf_app_runner self:global_capability_class_set ~{ setuid setgid }; +neverallow simpleperf_app_runner self:global_capability2_class_set *; |