Yuyang Huang | cfdea5f | 2023-01-18 16:52:43 +0900 | [diff] [blame] | 1 | ### |
| 2 | ### Untrusted apps. |
| 3 | ### |
| 4 | ### This file defines the rules for untrusted apps running with |
| 5 | ### 31 < targetSdkVersion <= 33. |
| 6 | ### |
| 7 | ### See public/untrusted_app.te for more information about which apps are |
| 8 | ### placed in this selinux domain. |
| 9 | ### |
| 10 | |
| 11 | typeattribute untrusted_app_32 coredomain; |
| 12 | |
| 13 | app_domain(untrusted_app_32) |
| 14 | untrusted_app_domain(untrusted_app_32) |
| 15 | net_domain(untrusted_app_32) |
| 16 | bluetooth_domain(untrusted_app_32) |
| 17 | |
| 18 | # Allow webview to access fd shared by sdksandbox for experiments data |
| 19 | # TODO(b/229249719): Will not be supported in Android U |
| 20 | allow untrusted_app_32 sdk_sandbox_data_file:fd use; |
| 21 | allow untrusted_app_32 sdk_sandbox_data_file:file write; |
| 22 | |
| 23 | neverallow untrusted_app_32 sdk_sandbox_data_file:file { open create }; |
| 24 | |
| 25 | # Connect to mdnsd via mdnsd socket. |
| 26 | unix_socket_connect(untrusted_app_32, mdnsd, mdnsd) |
| 27 | userdebug_or_eng(` |
| 28 | auditallow untrusted_app_32 mdnsd_socket:sock_file write; |
| 29 | auditallow untrusted_app_32 mdnsd:unix_stream_socket connectto; |
| 30 | ') |