blob: 7b6899a21af6906298570347144d71215eaf630f [file] [log] [blame]
Nick Kralevich88ce9512014-01-09 15:25:36 -08001# File types must be defined for file_contexts.
Stephen Smalley01301542013-09-27 10:38:14 -04002type su_exec, exec_type, file_type;
Stephen Smalley2dd4e512012-01-04 12:33:27 -05003
Nick Kralevich88ce9512014-01-09 15:25:36 -08004userdebug_or_eng(`
5 type su, domain;
6 domain_auto_trans(shell, su_exec, su)
Nick Kralevich09e6abd2013-12-13 22:19:45 -08007
Nick Kralevich88ce9512014-01-09 15:25:36 -08008 # Allow dumpstate to call su on userdebug / eng builds to collect
9 # additional information.
10 domain_auto_trans(dumpstate, su_exec, su)
Stephen Smalleyd99e6d52013-12-02 14:18:11 -050011
Nick Kralevich88ce9512014-01-09 15:25:36 -080012 # su is unconfined.
13 unconfined_domain(su)
14
Nick Kralevich7d0f9552014-01-18 18:07:06 -080015 allow su ashmem_device:chr_file execute;
16 allow su self:process execmem;
17 tmpfs_domain(su)
18 allow su su_tmpfs:file execute;
19
Nick Kralevich88ce9512014-01-09 15:25:36 -080020 # su is also permissive to permit setenforce.
21 permissive su;
22')