blob: 2e0d10ae8dbb80112106a847a07a4f9510a1465d [file] [log] [blame]
Nick Kralevich88ce9512014-01-09 15:25:36 -08001userdebug_or_eng(`
Alex Klyubin6b558dc2017-03-24 09:30:19 -07002 typeattribute su coredomain;
3
Nick Kralevich88ce9512014-01-09 15:25:36 -08004 domain_auto_trans(shell, su_exec, su)
Nick Kralevich88ce9512014-01-09 15:25:36 -08005 # Allow dumpstate to call su on userdebug / eng builds to collect
6 # additional information.
7 domain_auto_trans(dumpstate, su_exec, su)
Stephen Smalleyd99e6d52013-12-02 14:18:11 -05008
Christopher Ferris5ec38c42015-01-29 12:11:55 -08009 # Make sure that dumpstate runs the same from the "su" domain as
10 # from the "init" domain.
11 domain_auto_trans(su, dumpstate_exec, dumpstate)
12
Joe Onorato41f93db2016-11-20 23:23:04 -080013 # Put the incident command into its domain so it is the same on user, userdebug and eng.
14 domain_auto_trans(su, incident_exec, incident)
15
Orion Hodson8f75f762020-10-16 15:29:55 +010016 # Put the odrefresh command into its domain.
17 domain_auto_trans(su, odrefresh_exec, odrefresh)
18
Primiano Tucci1a9f4f72018-01-24 16:07:09 +000019 # Put the perfetto command into its domain so it is the same on user, userdebug and eng.
20 domain_auto_trans(su, perfetto_exec, perfetto)
21
Alan Stokes8b4d6122023-12-20 12:36:18 +000022 # Allow accessing virtualization (e.g. via the vm command) - ensures virtmgr runs in its
23 # own domain.
24 virtualizationservice_use(su)
David Brazdil55d808c2022-12-15 13:38:42 +000025
Nick Kralevich35e92392017-11-01 10:17:28 -070026 # su is also permissive to permit setenforce.
Nick Kralevich88ce9512014-01-09 15:25:36 -080027 permissive su;
Sreeram Ramachandranbc320182014-05-02 14:50:26 -070028
dcashman3e8dbf02016-12-08 11:23:34 -080029 app_domain(su)
Janis Danisevskisd3451f82020-07-27 13:06:11 -070030
31 # Do not audit accesses to keystore2 namespace for the su domain.
32 dontaudit su keystore2_key_type:{ keystore2 keystore2_key } *;
33
Florian Mayer56af9a22022-05-20 11:25:26 -070034 # Allow root to set MTE permissive mode.
35 set_prop(su, permissive_mte_prop);
Nick Kralevich88ce9512014-01-09 15:25:36 -080036')