2013-10-21 22:32:31 +02:00
|
|
|
#######################################################
|
|
|
|
#
|
|
|
|
# This is the unconfined template. This template is the base policy
|
|
|
|
# which is used by daemons and other privileged components of
|
|
|
|
# Android.
|
|
|
|
#
|
|
|
|
# Historically, this template was called "unconfined" because it
|
|
|
|
# allowed the domain to do anything it wanted. Over time,
|
|
|
|
# this has changed, and will continue to change in the future.
|
|
|
|
# The rules in this file will be removed when no remaining
|
|
|
|
# unconfined domains require it, or when the rules contradict
|
|
|
|
# Android security best practices. Domains which need rules not
|
|
|
|
# provided by the unconfined template should add them directly to
|
|
|
|
# the relevant policy.
|
|
|
|
#
|
|
|
|
# The use of this template is discouraged.
|
|
|
|
######################################################
|
|
|
|
|
2014-05-20 07:54:07 +02:00
|
|
|
allow unconfineddomain self:capability ~{ sys_ptrace sys_rawio mknod sys_module audit_write audit_control linux_immutable };
|
2014-01-30 19:23:08 +01:00
|
|
|
allow unconfineddomain self:capability2 ~{ mac_override mac_admin };
|
2014-03-06 19:02:50 +01:00
|
|
|
allow unconfineddomain kernel:security ~{ load_policy setenforce setcheckreqprot setbool setsecparam };
|
2014-05-28 22:48:52 +02:00
|
|
|
allow unconfineddomain kernel:system ~{ syslog_read syslog_mod syslog_console };
|
2014-05-31 02:07:36 +02:00
|
|
|
allow unconfineddomain domain:process {
|
|
|
|
fork
|
|
|
|
sigchld
|
|
|
|
sigkill
|
|
|
|
sigstop
|
|
|
|
signull
|
|
|
|
signal
|
|
|
|
getsched
|
|
|
|
setsched
|
|
|
|
getsession
|
|
|
|
getpgid
|
|
|
|
setpgid
|
|
|
|
getcap
|
|
|
|
setcap
|
|
|
|
share
|
|
|
|
getattr
|
|
|
|
noatsecure
|
|
|
|
siginh
|
|
|
|
setrlimit
|
|
|
|
rlimitinh
|
|
|
|
};
|
2012-01-04 18:33:27 +01:00
|
|
|
allow unconfineddomain domain:fd *;
|
|
|
|
allow unconfineddomain domain:dir r_dir_perms;
|
|
|
|
allow unconfineddomain domain:lnk_file r_file_perms;
|
|
|
|
allow unconfineddomain domain:{ fifo_file file } rw_file_perms;
|
|
|
|
allow unconfineddomain domain:socket_class_set *;
|
|
|
|
allow unconfineddomain domain:ipc_class_set *;
|
|
|
|
allow unconfineddomain domain:key *;
|
2014-06-16 19:05:38 +02:00
|
|
|
allow unconfineddomain {fs_type -contextmount_type}:{ dir lnk_file sock_file fifo_file } ~relabelto;
|
|
|
|
allow unconfineddomain dev_type:{ dir lnk_file sock_file fifo_file } ~relabelto;
|
2014-06-07 19:00:59 +02:00
|
|
|
allow unconfineddomain {
|
|
|
|
file_type
|
|
|
|
-keystore_data_file
|
|
|
|
-property_data_file
|
|
|
|
-system_file
|
|
|
|
-exec_type
|
|
|
|
-security_file
|
|
|
|
-shell_data_file
|
|
|
|
}:{ dir lnk_file sock_file fifo_file } ~relabelto;
|
2014-06-17 21:59:58 +02:00
|
|
|
allow unconfineddomain exec_type:dir r_dir_perms;
|
2014-06-19 15:07:17 +02:00
|
|
|
allow unconfineddomain exec_type:file { r_file_perms execute execmod };
|
2014-06-17 21:59:58 +02:00
|
|
|
allow unconfineddomain exec_type:lnk_file r_file_perms;
|
|
|
|
allow unconfineddomain system_file:dir r_dir_perms;
|
2014-06-19 15:07:17 +02:00
|
|
|
allow unconfineddomain system_file:file { r_file_perms execute execmod };
|
2014-06-17 21:59:58 +02:00
|
|
|
allow unconfineddomain system_file:lnk_file r_file_perms;
|
2014-06-16 19:05:38 +02:00
|
|
|
allow unconfineddomain {
|
|
|
|
fs_type
|
|
|
|
-usermodehelper
|
|
|
|
-proc_security
|
|
|
|
-contextmount_type
|
2014-06-19 15:07:17 +02:00
|
|
|
}:{ chr_file file } ~{entrypoint execute_no_trans execmod execute relabelto};
|
|
|
|
allow unconfineddomain {dev_type -kmem_device}:{ chr_file file } ~{entrypoint execute_no_trans execmod execute relabelto};
|
2014-06-07 19:00:59 +02:00
|
|
|
allow unconfineddomain {
|
|
|
|
file_type
|
|
|
|
-keystore_data_file
|
|
|
|
-property_data_file
|
|
|
|
-system_file
|
|
|
|
-exec_type
|
|
|
|
-security_file
|
|
|
|
-shell_data_file
|
2014-06-19 15:07:17 +02:00
|
|
|
}:{ chr_file file } ~{entrypoint execute_no_trans execmod execute relabelto};
|
2014-06-17 21:59:58 +02:00
|
|
|
allow unconfineddomain rootfs:file execute;
|
2014-06-16 19:05:38 +02:00
|
|
|
allow unconfineddomain contextmount_type:dir r_dir_perms;
|
|
|
|
allow unconfineddomain contextmount_type:notdevfile_class_set r_file_perms;
|
2012-01-04 18:33:27 +01:00
|
|
|
allow unconfineddomain node_type:node *;
|
2013-05-22 22:19:58 +02:00
|
|
|
allow unconfineddomain node_type:{ tcp_socket udp_socket rawip_socket } node_bind;
|
2012-01-04 18:33:27 +01:00
|
|
|
allow unconfineddomain netif_type:netif *;
|
|
|
|
allow unconfineddomain port_type:socket_class_set name_bind;
|
|
|
|
allow unconfineddomain port_type:{ tcp_socket dccp_socket } name_connect;
|
|
|
|
allow unconfineddomain domain:peer recv;
|
2014-01-04 05:44:07 +01:00
|
|
|
allow unconfineddomain { domain -init }:binder { call transfer set_context_mgr };
|
2014-05-30 16:25:00 +02:00
|
|
|
allow unconfineddomain { property_type -security_prop }:property_service set;
|