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-09-23 02:44:00 +02:00
|
|
|
type su, domain, mlstrustedsubject;
|
2014-01-10 00:25:36 +01:00
|
|
|
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
|
|
|
|
2015-01-29 21:11:55 +01:00
|
|
|
# Make sure that dumpstate runs the same from the "su" domain as
|
|
|
|
# from the "init" domain.
|
|
|
|
domain_auto_trans(su, dumpstate_exec, dumpstate)
|
|
|
|
|
2014-01-10 00:25:36 +01:00
|
|
|
# su is also permissive to permit setenforce.
|
|
|
|
permissive su;
|
2014-05-02 23:50:26 +02:00
|
|
|
|
2014-07-12 21:46:58 +02:00
|
|
|
# Add su to various domains
|
2014-05-02 23:50:26 +02:00
|
|
|
net_domain(su)
|
2014-07-12 21:46:58 +02:00
|
|
|
app_domain(su)
|
2014-05-28 00:46:39 +02:00
|
|
|
|
|
|
|
dontaudit su self:capability_class_set *;
|
|
|
|
dontaudit su kernel:security *;
|
|
|
|
dontaudit su kernel:system *;
|
|
|
|
dontaudit su self:memprotect *;
|
|
|
|
dontaudit su domain:process *;
|
|
|
|
dontaudit su domain:fd *;
|
|
|
|
dontaudit su domain:dir *;
|
|
|
|
dontaudit su domain:lnk_file *;
|
|
|
|
dontaudit su domain:{ fifo_file file } *;
|
|
|
|
dontaudit su domain:socket_class_set *;
|
|
|
|
dontaudit su domain:ipc_class_set *;
|
|
|
|
dontaudit su domain:key *;
|
|
|
|
dontaudit su fs_type:filesystem *;
|
|
|
|
dontaudit su {fs_type dev_type file_type}:dir_file_class_set *;
|
|
|
|
dontaudit su node_type:node *;
|
|
|
|
dontaudit su node_type:{ tcp_socket udp_socket rawip_socket } *;
|
|
|
|
dontaudit su netif_type:netif *;
|
|
|
|
dontaudit su port_type:socket_class_set *;
|
|
|
|
dontaudit su port_type:{ tcp_socket dccp_socket } *;
|
|
|
|
dontaudit su domain:peer *;
|
|
|
|
dontaudit su domain:binder *;
|
|
|
|
dontaudit su property_type:property_service *;
|
2015-01-06 21:50:19 +01:00
|
|
|
dontaudit su service_manager_type:service_manager *;
|
|
|
|
dontaudit su keystore:keystore_key *;
|
|
|
|
dontaudit su domain:debuggerd *;
|
|
|
|
dontaudit su domain:drmservice *;
|
2015-04-16 02:58:08 +02:00
|
|
|
dontaudit su unlabeled:filesystem *;
|
2015-02-25 18:43:59 +01:00
|
|
|
service_manager_local_audit_domain(su)
|
2014-01-10 00:25:36 +01:00
|
|
|
')
|