blob: 074ff2e5d9642e32426d28e9bde32dace8e54062 [file] [log] [blame]
Inseob Kimff43be22021-06-07 16:56:56 +09001# All types must be defined regardless of build variant to ensure
2# policy compilation succeeds with userdebug/user combination at boot
3type su, domain;
4
5# File types must be defined for file_contexts.
6type su_exec, system_file_type, exec_type, file_type;
7
8userdebug_or_eng(`
9 # Domain used for su processes, as well as for adbd and adb shell
10 # after performing an adb root command. The domain definition is
11 # wrapped to ensure that it does not exist at all on -user builds.
12 typeattribute su mlstrustedsubject;
13
14 # Add su to various domains
15 net_domain(su)
16
17 # grant su access to vndbinder
18 vndbinder_use(su)
19
20 dontaudit su self:capability_class_set *;
21 dontaudit su self:capability2 *;
22 dontaudit su kernel:security *;
23 dontaudit su { kernel file_type }:system *;
24 dontaudit su self:memprotect *;
25 dontaudit su domain:{ process process2 } *;
26 dontaudit su domain:fd *;
27 dontaudit su domain:dir *;
28 dontaudit su domain:lnk_file *;
29 dontaudit su domain:{ fifo_file file } *;
30 dontaudit su domain:socket_class_set *;
31 dontaudit su domain:ipc_class_set *;
32 dontaudit su domain:key *;
33 dontaudit su fs_type:filesystem *;
34 dontaudit su {fs_type dev_type file_type}:dir_file_class_set *;
35 dontaudit su node_type:node *;
36 dontaudit su node_type:{ tcp_socket udp_socket rawip_socket } *;
37 dontaudit su netif_type:netif *;
38 dontaudit su port_type:socket_class_set *;
39 dontaudit su port_type:{ tcp_socket dccp_socket } *;
40 dontaudit su domain:peer *;
41 dontaudit su domain:binder *;
42 dontaudit su property_type:property_service *;
43 dontaudit su property_type:file *;
44 dontaudit su service_manager_type:service_manager *;
45 dontaudit su hwservice_manager_type:hwservice_manager *;
46 dontaudit su vndservice_manager_type:service_manager *;
47 dontaudit su servicemanager:service_manager list;
48 dontaudit su hwservicemanager:hwservice_manager list;
49 dontaudit su vndservicemanager:service_manager list;
50 dontaudit su keystore:keystore_key *;
51 dontaudit su keystore:keystore2 *;
52 dontaudit su domain:drmservice *;
53 dontaudit su unlabeled:filesystem *;
54 dontaudit su postinstall_file:filesystem *;
55 dontaudit su domain:bpf *;
56 dontaudit su unlabeled:vsock_socket *;
57 dontaudit su self:perf_event *;
58
59 # VTS tests run in the permissive su domain on debug builds, but the HALs
60 # being tested run in enforcing mode. Because hal_foo_server is enforcing
61 # su needs to be declared as hal_foo_client to grant hal_foo_server
62 # permission to interact with it.
63 typeattribute su halclientdomain;
64 typeattribute su hal_allocator_client;
65 typeattribute su hal_atrace_client;
66 typeattribute su hal_audio_client;
67 typeattribute su hal_authsecret_client;
68 typeattribute su hal_bluetooth_client;
69 typeattribute su hal_bootctl_client;
70 typeattribute su hal_camera_client;
71 typeattribute su hal_configstore_client;
72 typeattribute su hal_confirmationui_client;
73 typeattribute su hal_contexthub_client;
74 typeattribute su hal_drm_client;
75 typeattribute su hal_cas_client;
76 typeattribute su hal_dumpstate_client;
77 typeattribute su hal_fingerprint_client;
78 typeattribute su hal_gatekeeper_client;
79 typeattribute su hal_gnss_client;
80 typeattribute su hal_graphics_allocator_client;
81 typeattribute su hal_graphics_composer_client;
82 typeattribute su hal_health_client;
83 typeattribute su hal_input_classifier_client;
84 typeattribute su hal_ir_client;
85 typeattribute su hal_keymaster_client;
86 typeattribute su hal_light_client;
87 typeattribute su hal_memtrack_client;
88 typeattribute su hal_neuralnetworks_client;
89 typeattribute su hal_nfc_client;
90 typeattribute su hal_oemlock_client;
91 typeattribute su hal_power_client;
92 typeattribute su hal_rebootescrow_client;
93 typeattribute su hal_secure_element_client;
94 typeattribute su hal_sensors_client;
95 typeattribute su hal_telephony_client;
96 typeattribute su hal_tetheroffload_client;
97 typeattribute su hal_thermal_client;
98 typeattribute su hal_tv_cec_client;
99 typeattribute su hal_tv_input_client;
100 typeattribute su hal_tv_tuner_client;
101 typeattribute su hal_usb_client;
102 typeattribute su hal_vibrator_client;
103 typeattribute su hal_vr_client;
104 typeattribute su hal_weaver_client;
105 typeattribute su hal_wifi_client;
106 typeattribute su hal_wifi_hostapd_client;
107 typeattribute su hal_wifi_supplicant_client;
108')