blob: fc51ad8705f8f990ed8f4ccbc24e82c9d7e653ec [file] [log] [blame]
Inseob Kime1389972021-07-19 07:48:34 +00001typeattribute shell coredomain, mlstrustedsubject;
2
3# allow shell input injection
4allow shell uhid_device:chr_file rw_file_perms;
5
6# Perform SELinux access checks, needed for CTS
7selinux_check_access(shell)
8selinux_check_context(shell)
9
10# Allow shell to run adb shell cmd stats commands. Needed for CTS.
11binder_call(shell, statsd);
12
13# Allow shell to launch microdroid_launcher in its own domain
14# TODO(b/186396070) remove this when microdroid_manager can do this
15domain_auto_trans(shell, microdroid_app_exec, microdroid_app)
16domain_auto_trans(shell, microdroid_manager_exec, microdroid_manager)
17
18# Connect to adbd and use a socket transferred from it.
19# This is used for e.g. adb backup/restore.
20allow shell adbd:unix_stream_socket connectto;
21allow shell adbd:fd use;
22allow shell adbd:unix_stream_socket { getattr getopt ioctl read write shutdown };
23
24# filesystem test for insecure chr_file's is done
25# via a host side test
26allow shell dev_type:dir r_dir_perms;
27allow shell dev_type:chr_file getattr;
28
29# filesystem test for insucre blk_file's is done
30# via hostside test
31allow shell dev_type:blk_file getattr;