attributes 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. ######################################
  2. # Attribute declarations
  3. #
  4. # All types used for devices.
  5. # On change, update CHECK_FC_ASSERT_ATTRS
  6. # in tools/checkfc.c
  7. attribute dev_type;
  8. # All types used for processes.
  9. attribute domain;
  10. # All types used for filesystems.
  11. # On change, update CHECK_FC_ASSERT_ATTRS
  12. # definition in tools/checkfc.c.
  13. attribute fs_type;
  14. # All types used for context= mounts.
  15. attribute contextmount_type;
  16. # All types used for files that can exist on a labeled fs.
  17. # Do not use for pseudo file types.
  18. # On change, update CHECK_FC_ASSERT_ATTRS
  19. # definition in tools/checkfc.c.
  20. attribute file_type;
  21. # All types used for domain entry points.
  22. attribute exec_type;
  23. # All types used for /data files.
  24. attribute data_file_type;
  25. expandattribute data_file_type false;
  26. # All types in /data, not in /data/vendor
  27. attribute core_data_file_type;
  28. expandattribute core_data_file_type false;
  29. # All types in /system
  30. attribute system_file_type;
  31. # All types in /vendor
  32. attribute vendor_file_type;
  33. # All types used for procfs files.
  34. attribute proc_type;
  35. expandattribute proc_type false;
  36. # Types in /proc/net, excluding qtaguid types.
  37. # TODO(b/9496886) Lock down access to /proc/net.
  38. # This attribute is used to audit access to proc_net. it is temporary and will
  39. # be removed.
  40. attribute proc_net_type;
  41. expandattribute proc_net_type true;
  42. # All types used for sysfs files.
  43. attribute sysfs_type;
  44. # All types use for debugfs files.
  45. attribute debugfs_type;
  46. # Attribute used for all sdcards
  47. attribute sdcard_type;
  48. # All types used for nodes/hosts.
  49. attribute node_type;
  50. # All types used for network interfaces.
  51. attribute netif_type;
  52. # All types used for network ports.
  53. attribute port_type;
  54. # All types used for property service
  55. # On change, update CHECK_PC_ASSERT_ATTRS
  56. # definition in tools/checkfc.c.
  57. attribute property_type;
  58. # All properties defined in core SELinux policy. Should not be
  59. # used by device specific properties
  60. attribute core_property_type;
  61. # All properties used to configure log filtering.
  62. attribute log_property_type;
  63. # All properties that are not specific to device but are added from
  64. # outside of AOSP. (e.g. OEM-specific properties)
  65. # These properties are not accessible from device-specific domains
  66. attribute extended_core_property_type;
  67. # All service_manager types created by system_server
  68. attribute system_server_service;
  69. # services which should be available to all but isolated apps
  70. attribute app_api_service;
  71. # services which should be available to all ephemeral apps
  72. attribute ephemeral_app_api_service;
  73. # services which export only system_api
  74. attribute system_api_service;
  75. # All types used for services managed by servicemanager.
  76. # On change, update CHECK_SC_ASSERT_ATTRS
  77. # definition in tools/checkfc.c.
  78. attribute service_manager_type;
  79. # All types used for services managed by hwservicemanager
  80. attribute hwservice_manager_type;
  81. # All HwBinder services guaranteed to be passthrough. These services always run
  82. # in the process of their clients, and thus operate with the same access as
  83. # their clients.
  84. attribute same_process_hwservice;
  85. # All HwBinder services guaranteed to be offered only by core domain components
  86. attribute coredomain_hwservice;
  87. # All types used for services managed by vndservicemanager
  88. attribute vndservice_manager_type;
  89. # All domains that can override MLS restrictions.
  90. # i.e. processes that can read up and write down.
  91. attribute mlstrustedsubject;
  92. # All types that can override MLS restrictions.
  93. # i.e. files that can be read by lower and written by higher
  94. attribute mlstrustedobject;
  95. # All domains used for apps.
  96. attribute appdomain;
  97. # All third party apps.
  98. attribute untrusted_app_all;
  99. # All domains used for apps with network access.
  100. attribute netdomain;
  101. # All domains used for apps with bluetooth access.
  102. attribute bluetoothdomain;
  103. # All domains used for binder service domains.
  104. attribute binderservicedomain;
  105. # update_engine related domains that need to apply an update and run
  106. # postinstall. This includes the background daemon and the sideload tool from
  107. # recovery for A/B devices.
  108. attribute update_engine_common;
  109. # All core domains (as opposed to vendor/device-specific domains)
  110. attribute coredomain;
  111. # All socket devices owned by core domain components
  112. attribute coredomain_socket;
  113. expandattribute coredomain_socket false;
  114. # All vendor domains which violate the requirement of not using Binder
  115. # TODO(b/35870313): Remove this once there are no violations
  116. attribute binder_in_vendor_violators;
  117. expandattribute binder_in_vendor_violators false;
  118. # All vendor domains which violate the requirement of not using sockets for
  119. # communicating with core components
  120. # TODO(b/36577153): Remove this once there are no violations
  121. attribute socket_between_core_and_vendor_violators;
  122. expandattribute socket_between_core_and_vendor_violators false;
  123. # All vendor domains which violate the requirement of not executing
  124. # system processes
  125. # TODO(b/36463595)
  126. attribute vendor_executes_system_violators;
  127. expandattribute vendor_executes_system_violators false;
  128. # All domains which violate the requirement of not sharing files by path
  129. # between between vendor and core domains.
  130. # TODO(b/34980020)
  131. attribute data_between_core_and_vendor_violators;
  132. expandattribute data_between_core_and_vendor_violators false;
  133. # All system domains which violate the requirement of not executing vendor
  134. # binaries/libraries.
  135. # TODO(b/62041836)
  136. attribute system_executes_vendor_violators;
  137. expandattribute system_executes_vendor_violators false;
  138. # All system domains which violate the requirement of not writing vendor
  139. # properties.
  140. # TODO(b/78598545): Remove this once there are no violations
  141. attribute system_writes_vendor_properties_violators;
  142. expandattribute system_writes_vendor_properties_violators false;
  143. # All system domains which violate the requirement of not writing to
  144. # /mnt/vendor/*. Must not be used on devices launched with P or later.
  145. attribute system_writes_mnt_vendor_violators;
  146. expandattribute system_writes_mnt_vendor_violators false;
  147. # hwservices that are accessible from untrusted applications
  148. # WARNING: Use of this attribute should be avoided unless
  149. # absolutely necessary. It is a temporary allowance to aid the
  150. # transition to treble and will be removed in a future platform
  151. # version, requiring all hwservices that are labeled with this
  152. # attribute to be submitted to AOSP in order to maintain their
  153. # app-visibility.
  154. attribute untrusted_app_visible_hwservice_violators;
  155. expandattribute untrusted_app_visible_hwservice_violators false;
  156. # halserver domains that are accessible to untrusted applications. These
  157. # domains are typically those hosting hwservices attributed by the
  158. # untrusted_app_visible_hwservice_violators.
  159. # WARNING: Use of this attribute should be avoided unless absolutely necessary.
  160. # It is a temporary allowance to aid the transition to treble and will be
  161. # removed in the future platform version, requiring all halserver domains that
  162. # are labeled with this attribute to be submitted to AOSP in order to maintain
  163. # their app-visibility.
  164. attribute untrusted_app_visible_halserver_violators;
  165. expandattribute untrusted_app_visible_halserver_violators false;
  166. # PDX services
  167. attribute pdx_endpoint_dir_type;
  168. attribute pdx_endpoint_socket_type;
  169. expandattribute pdx_endpoint_socket_type false;
  170. attribute pdx_channel_socket_type;
  171. expandattribute pdx_channel_socket_type false;
  172. pdx_service_attributes(display_client)
  173. pdx_service_attributes(display_manager)
  174. pdx_service_attributes(display_screenshot)
  175. pdx_service_attributes(display_vsync)
  176. pdx_service_attributes(performance_client)
  177. pdx_service_attributes(bufferhub_client)
  178. # All HAL servers
  179. attribute halserverdomain;
  180. # All HAL clients
  181. attribute halclientdomain;
  182. expandattribute halclientdomain true;
  183. # Exempt for halserverdomain to access sockets. Only builds for automotive
  184. # device types are allowed to use this attribute (enforced by CTS).
  185. # Unlike phone, in a car many modules are external from Android perspective and
  186. # HALs should be able to communicate with those devices through sockets.
  187. attribute hal_automotive_socket_exemption;
  188. # HALs
  189. hal_attribute(allocator);
  190. hal_attribute(atrace);
  191. hal_attribute(audio);
  192. hal_attribute(audiocontrol);
  193. hal_attribute(authsecret);
  194. hal_attribute(bluetooth);
  195. hal_attribute(bootctl);
  196. hal_attribute(bufferhub);
  197. hal_attribute(broadcastradio);
  198. hal_attribute(camera);
  199. hal_attribute(cas);
  200. hal_attribute(codec2);
  201. hal_attribute(configstore);
  202. hal_attribute(confirmationui);
  203. hal_attribute(contexthub);
  204. hal_attribute(drm);
  205. hal_attribute(dumpstate);
  206. hal_attribute(evs);
  207. hal_attribute(face);
  208. hal_attribute(fingerprint);
  209. hal_attribute(gatekeeper);
  210. hal_attribute(gnss);
  211. hal_attribute(graphics_allocator);
  212. hal_attribute(graphics_composer);
  213. hal_attribute(health);
  214. hal_attribute(health_storage);
  215. hal_attribute(input_classifier);
  216. hal_attribute(ir);
  217. hal_attribute(keymaster);
  218. hal_attribute(light);
  219. hal_attribute(lowpan);
  220. hal_attribute(memtrack);
  221. hal_attribute(neuralnetworks);
  222. hal_attribute(nfc);
  223. hal_attribute(oemlock);
  224. hal_attribute(omx);
  225. hal_attribute(power);
  226. hal_attribute(power_stats);
  227. hal_attribute(secure_element);
  228. hal_attribute(sensors);
  229. hal_attribute(telephony);
  230. hal_attribute(tetheroffload);
  231. hal_attribute(thermal);
  232. hal_attribute(tv_cec);
  233. hal_attribute(tv_input);
  234. hal_attribute(usb);
  235. hal_attribute(usb_gadget);
  236. hal_attribute(vehicle);
  237. hal_attribute(vibrator);
  238. hal_attribute(vr);
  239. hal_attribute(weaver);
  240. hal_attribute(wifi);
  241. hal_attribute(wifi_hostapd);
  242. hal_attribute(wifi_offload);
  243. hal_attribute(wifi_supplicant);
  244. # HwBinder services offered across the core-vendor boundary
  245. #
  246. # We annotate server domains with x_server to loosen the coupling between
  247. # system and vendor images. For example, it should be possible to move a service
  248. # from one core domain to another, without having to update the vendor image
  249. # which contains clients of this service.
  250. attribute camera_service_server;
  251. attribute display_service_server;
  252. attribute scheduler_service_server;
  253. attribute sensor_service_server;
  254. attribute stats_service_server;
  255. attribute system_suspend_server;
  256. attribute wifi_keystore_service_server;
  257. # All types used for super partition block devices.
  258. attribute super_block_device_type;