blob: c82c0c88d5c9de2ac2120e39d079a88634a84aa7 [file] [log] [blame]
Inseob Kimff43be22021-06-07 16:56:56 +09001######################################
2# Attribute declarations
3#
4
5# All types used for devices.
6# On change, update CHECK_FC_ASSERT_ATTRS
7# in tools/checkfc.c
8attribute dev_type;
9
10# All types used for processes.
11attribute domain;
12
13# All types used for filesystems.
14# On change, update CHECK_FC_ASSERT_ATTRS
15# definition in tools/checkfc.c.
16attribute fs_type;
17
18# All types used for context= mounts.
19attribute contextmount_type;
20
21# All types used for files that can exist on a labeled fs.
22# Do not use for pseudo file types.
23# On change, update CHECK_FC_ASSERT_ATTRS
24# definition in tools/checkfc.c.
25attribute file_type;
26
27# All types used for domain entry points.
28attribute exec_type;
29
30# All types used for /data files.
31attribute data_file_type;
32expandattribute data_file_type false;
33# All types in /data, not in /data/vendor
34attribute core_data_file_type;
35expandattribute core_data_file_type false;
36
37# All types used for app private data files in seapp_contexts.
38# Such types should not be applied to any other files.
39attribute app_data_file_type;
40expandattribute app_data_file_type false;
41
42# All types in /system
43attribute system_file_type;
44
45# All types in /vendor
46attribute vendor_file_type;
47
48# All types used for procfs files.
49attribute proc_type;
50expandattribute proc_type false;
51
52# Types in /proc/net, excluding qtaguid types.
53# TODO(b/9496886) Lock down access to /proc/net.
54# This attribute is used to audit access to proc_net. it is temporary and will
55# be removed.
56attribute proc_net_type;
57expandattribute proc_net_type true;
58
59# All types used for sysfs files.
60attribute sysfs_type;
61
62# All types use for debugfs files.
63attribute debugfs_type;
64
65# All types used for tracefs files.
66attribute tracefs_type;
67
68# Attribute used for all sdcards
69attribute sdcard_type;
70
71# All types used for nodes/hosts.
72attribute node_type;
73
74# All types used for network interfaces.
75attribute netif_type;
76
77# All types used for network ports.
78attribute port_type;
79
80# All types used for property service
81# On change, update CHECK_PC_ASSERT_ATTRS
82# definition in tools/checkfc.c.
83attribute property_type;
84
85# All properties defined in core SELinux policy. Should not be
86# used by device specific properties
87attribute core_property_type;
88
89# All properties used to configure log filtering.
90attribute log_property_type;
91
92# All properties that are not specific to device but are added from
93# outside of AOSP. (e.g. OEM-specific properties)
94# These properties are not accessible from device-specific domains
95attribute extended_core_property_type;
96
97# Properties used for representing ownership. All properties should have one
98# of: system_property_type, product_property_type, or vendor_property_type.
99
100# All properties defined by /system.
101attribute system_property_type;
102expandattribute system_property_type false;
103
104# All /system-defined properties used only in /system.
105attribute system_internal_property_type;
106expandattribute system_internal_property_type false;
107
108# All /system-defined properties which can't be written outside /system.
109attribute system_restricted_property_type;
110expandattribute system_restricted_property_type false;
111
112# All /system-defined properties with no restrictions.
113attribute system_public_property_type;
114expandattribute system_public_property_type false;
115
116# All keystore2_key labels.
117attribute keystore2_key_type;
118
119# All properties defined by /product.
120# Currently there are no enforcements between /system and /product, so for now
121# /product attributes are just replaced to /system attributes.
122define(`product_property_type', `system_property_type')
123define(`product_internal_property_type', `system_internal_property_type')
124define(`product_restricted_property_type', `system_restricted_property_type')
125define(`product_public_property_type', `system_public_property_type')
126
127# All properties defined by /vendor.
128attribute vendor_property_type;
129expandattribute vendor_property_type false;
130
131# All /vendor-defined properties used only in /vendor.
132attribute vendor_internal_property_type;
133expandattribute vendor_internal_property_type false;
134
135# All /vendor-defined properties which can't be written outside /vendor.
136attribute vendor_restricted_property_type;
137expandattribute vendor_restricted_property_type false;
138
139# All /vendor-defined properties with no restrictions.
140attribute vendor_public_property_type;
141expandattribute vendor_public_property_type false;
142
143# All service_manager types created by system_server
144attribute system_server_service;
145
146# services which should be available to all but isolated apps
147attribute app_api_service;
148
149# services which should be available to all ephemeral apps
150attribute ephemeral_app_api_service;
151
152# services which export only system_api
153attribute system_api_service;
154
155# services which are explicitly disallowed for untrusted apps to access
156attribute protected_service;
157
158# services which served by vendor and also using the copy of libbinder on
159# system (for instance via libbinder_ndk). services using a different copy
160# of libbinder currently need their own context manager (e.g.
161# vndservicemanager)
162attribute vendor_service;
163
164# All types used for services managed by servicemanager.
165# On change, update CHECK_SC_ASSERT_ATTRS
166# definition in tools/checkfc.c.
167attribute service_manager_type;
168
169# All types used for services managed by hwservicemanager
170attribute hwservice_manager_type;
171
172# All HwBinder services guaranteed to be passthrough. These services always run
173# in the process of their clients, and thus operate with the same access as
174# their clients.
175attribute same_process_hwservice;
176
177# All HwBinder services guaranteed to be offered only by core domain components
178attribute coredomain_hwservice;
179
180# All HwBinder services that untrusted apps can't directly access
181attribute protected_hwservice;
182
183# All types used for services managed by vndservicemanager
184attribute vndservice_manager_type;
185
186
187# All domains that can override MLS restrictions.
188# i.e. processes that can read up and write down.
189attribute mlstrustedsubject;
190
191# All types that can override MLS restrictions.
192# i.e. files that can be read by lower and written by higher
193attribute mlstrustedobject;
194
195# All domains used for apps.
196attribute appdomain;
197
198# All third party apps (except isolated_app and ephemeral_app)
199attribute untrusted_app_all;
200
201# All domains used for apps with network access.
202attribute netdomain;
203
204# All domains used for apps with bluetooth access.
205attribute bluetoothdomain;
206
207# All domains used for binder service domains.
208attribute binderservicedomain;
209
210# update_engine related domains that need to apply an update and run
211# postinstall. This includes the background daemon and the sideload tool from
212# recovery for A/B devices.
213attribute update_engine_common;
214
215# All core domains (as opposed to vendor/device-specific domains)
216attribute coredomain;
217
218# All vendor hwservice.
219attribute vendor_hwservice_type;
220
221# All socket devices owned by core domain components
222attribute coredomain_socket;
223expandattribute coredomain_socket false;
224
225# All vendor domains which violate the requirement of not using sockets for
226# communicating with core components
227# TODO(b/36577153): Remove this once there are no violations
228attribute socket_between_core_and_vendor_violators;
229expandattribute socket_between_core_and_vendor_violators false;
230
231# All vendor domains which violate the requirement of not executing
232# system processes
233# TODO(b/36463595)
234attribute vendor_executes_system_violators;
235expandattribute vendor_executes_system_violators false;
236
237# All domains which violate the requirement of not sharing files by path
238# between between vendor and core domains.
239# TODO(b/34980020)
240attribute data_between_core_and_vendor_violators;
241expandattribute data_between_core_and_vendor_violators false;
242
243# All system domains which violate the requirement of not executing vendor
244# binaries/libraries.
245# TODO(b/62041836)
246attribute system_executes_vendor_violators;
247expandattribute system_executes_vendor_violators false;
248
249# All system domains which violate the requirement of not writing vendor
250# properties.
251# TODO(b/78598545): Remove this once there are no violations
252attribute system_writes_vendor_properties_violators;
253expandattribute system_writes_vendor_properties_violators false;
254
255# All system domains which violate the requirement of not writing to
256# /mnt/vendor/*. Must not be used on devices launched with P or later.
257attribute system_writes_mnt_vendor_violators;
258expandattribute system_writes_mnt_vendor_violators false;
259
260# hwservices that are accessible from untrusted applications
261# WARNING: Use of this attribute should be avoided unless
262# absolutely necessary. It is a temporary allowance to aid the
263# transition to treble and will be removed in a future platform
264# version, requiring all hwservices that are labeled with this
265# attribute to be submitted to AOSP in order to maintain their
266# app-visibility.
267attribute untrusted_app_visible_hwservice_violators;
268expandattribute untrusted_app_visible_hwservice_violators false;
269
270# halserver domains that are accessible to untrusted applications. These
271# domains are typically those hosting hwservices attributed by the
272# untrusted_app_visible_hwservice_violators.
273# WARNING: Use of this attribute should be avoided unless absolutely necessary.
274# It is a temporary allowance to aid the transition to treble and will be
275# removed in the future platform version, requiring all halserver domains that
276# are labeled with this attribute to be submitted to AOSP in order to maintain
277# their app-visibility.
278attribute untrusted_app_visible_halserver_violators;
279expandattribute untrusted_app_visible_halserver_violators false;
280
281# PDX services
282attribute pdx_endpoint_dir_type;
283attribute pdx_endpoint_socket_type;
284expandattribute pdx_endpoint_socket_type false;
285attribute pdx_channel_socket_type;
286expandattribute pdx_channel_socket_type false;
287
288pdx_service_attributes(display_client)
289pdx_service_attributes(display_manager)
290pdx_service_attributes(display_screenshot)
291pdx_service_attributes(display_vsync)
292pdx_service_attributes(performance_client)
293pdx_service_attributes(bufferhub_client)
294
295# All HAL servers
296attribute halserverdomain;
297# All HAL clients
298attribute halclientdomain;
299expandattribute halclientdomain true;
300
301# Exempt for halserverdomain to access sockets. Only builds for automotive
302# device types are allowed to use this attribute (enforced by CTS).
303# Unlike phone, in a car many modules are external from Android perspective and
304# HALs should be able to communicate with those devices through sockets.
305attribute hal_automotive_socket_exemption;
306
307# HALs
308hal_attribute(allocator);
309hal_attribute(atrace);
310hal_attribute(audio);
311hal_attribute(audiocontrol);
312hal_attribute(authsecret);
313hal_attribute(bluetooth);
314hal_attribute(bootctl);
315hal_attribute(bufferhub);
316hal_attribute(broadcastradio);
317hal_attribute(camera);
318hal_attribute(can_bus);
319hal_attribute(can_controller);
320hal_attribute(cas);
321hal_attribute(codec2);
322hal_attribute(configstore);
323hal_attribute(confirmationui);
324hal_attribute(contexthub);
325hal_attribute(drm);
Inseob Kimff43be22021-06-07 16:56:56 +0900326hal_attribute(evs);
327hal_attribute(face);
328hal_attribute(fingerprint);
329hal_attribute(gatekeeper);
330hal_attribute(gnss);
331hal_attribute(graphics_allocator);
332hal_attribute(graphics_composer);
333hal_attribute(health);
334hal_attribute(health_storage);
335hal_attribute(identity);
336hal_attribute(input_classifier);
337hal_attribute(ir);
338hal_attribute(keymaster);
339hal_attribute(keymint);
340hal_attribute(light);
341hal_attribute(lowpan);
342hal_attribute(memtrack);
343hal_attribute(neuralnetworks);
344hal_attribute(nfc);
345hal_attribute(oemlock);
346hal_attribute(omx);
347hal_attribute(power);
348hal_attribute(power_stats);
349hal_attribute(rebootescrow);
350hal_attribute(secure_element);
351hal_attribute(sensors);
352hal_attribute(telephony);
353hal_attribute(tetheroffload);
354hal_attribute(thermal);
355hal_attribute(tv_cec);
356hal_attribute(tv_input);
357hal_attribute(tv_tuner);
358hal_attribute(usb);
359hal_attribute(usb_gadget);
360hal_attribute(vehicle);
361hal_attribute(vibrator);
362hal_attribute(vr);
363hal_attribute(weaver);
364hal_attribute(wifi);
365hal_attribute(wifi_hostapd);
366hal_attribute(wifi_supplicant);
367
368# HwBinder services offered across the core-vendor boundary
369#
370# We annotate server domains with x_server to loosen the coupling between
371# system and vendor images. For example, it should be possible to move a service
372# from one core domain to another, without having to update the vendor image
373# which contains clients of this service.
374
375attribute automotive_display_service_server;
376attribute camera_service_server;
377attribute display_service_server;
378attribute scheduler_service_server;
379attribute sensor_service_server;
380attribute stats_service_server;
381attribute system_suspend_internal_server;
382attribute system_suspend_server;
383attribute wifi_keystore_service_server;
384
385# All types used for super partition block devices.
386attribute super_block_device_type;
387
388# All types used for DMA-BUF heaps
389attribute dmabuf_heap_device_type;
390expandattribute dmabuf_heap_device_type false;
391
392# All types used for DSU metadata files.
393attribute gsi_metadata_file_type;
Inseob Kim4eb56602021-07-09 15:51:12 +0900394
395attribute fusefs_type;