2014-01-10 00:25:36 +01:00
|
|
|
# File types must be defined for file_contexts.
|
2013-09-27 16:38:14 +02:00
|
|
|
type su_exec, exec_type, file_type;
|
2012-01-04 18:33:27 +01:00
|
|
|
|
2014-01-10 00:25:36 +01:00
|
|
|
userdebug_or_eng(`
|
2014-02-21 19:45:29 +01:00
|
|
|
# Domain used for su processes, as well as for adbd and adb shell
|
|
|
|
# after performing an adb root command. The domain definition is
|
|
|
|
# wrapped to ensure that it does not exist at all on -user builds.
|
2014-01-10 00:25:36 +01:00
|
|
|
type su, domain;
|
|
|
|
domain_auto_trans(shell, su_exec, su)
|
2013-12-14 07:19:45 +01:00
|
|
|
|
2014-01-10 00:25:36 +01:00
|
|
|
# Allow dumpstate to call su on userdebug / eng builds to collect
|
|
|
|
# additional information.
|
|
|
|
domain_auto_trans(dumpstate, su_exec, su)
|
2013-12-02 20:18:11 +01:00
|
|
|
|
2014-01-10 00:25:36 +01:00
|
|
|
# su is unconfined.
|
|
|
|
unconfined_domain(su)
|
|
|
|
|
2014-01-19 03:07:06 +01:00
|
|
|
allow su ashmem_device:chr_file execute;
|
|
|
|
allow su self:process execmem;
|
|
|
|
tmpfs_domain(su)
|
|
|
|
allow su su_tmpfs:file execute;
|
2014-02-06 01:36:25 +01:00
|
|
|
allow su debuggerd_prop:property_service set;
|
2014-01-19 03:07:06 +01:00
|
|
|
|
2014-01-10 00:25:36 +01:00
|
|
|
# su is also permissive to permit setenforce.
|
|
|
|
permissive su;
|
|
|
|
')
|