blob: fc51ad8705f8f990ed8f4ccbc24e82c9d7e653ec [file] [log] [blame]
Inseob Kimff43be22021-06-07 16:56:56 +09001typeattribute shell coredomain, mlstrustedsubject;
2
3# allow shell input injection
4allow shell uhid_device:chr_file rw_file_perms;
5
Inseob Kimff43be22021-06-07 16:56:56 +09006# Perform SELinux access checks, needed for CTS
7selinux_check_access(shell)
8selinux_check_context(shell)
9
Inseob Kimff43be22021-06-07 16:56:56 +090010# Allow shell to run adb shell cmd stats commands. Needed for CTS.
11binder_call(shell, statsd);
12
Inseob Kimff43be22021-06-07 16:56:56 +090013# Allow shell to launch microdroid_launcher in its own domain
14# TODO(b/186396070) remove this when microdroid_manager can do this
Inseob Kim20e80f72021-06-25 14:12:35 +090015domain_auto_trans(shell, microdroid_app_exec, microdroid_app)
Inseob Kimff43be22021-06-07 16:56:56 +090016domain_auto_trans(shell, microdroid_manager_exec, microdroid_manager)
17
Inseob Kim4eb56602021-07-09 15:51:12 +090018# 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 };
Inseob Kimff43be22021-06-07 16:56:56 +090023
Inseob Kim4eb56602021-07-09 15:51:12 +090024# 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;