2018-12-03 20:18:47 +00:00
|
|
|
type phhsu_daemon, domain, mlstrustedsubject;
|
2017-12-19 12:08:26 +00:00
|
|
|
type phhsu_exec, exec_type, file_type;
|
|
|
|
|
|
|
|
typeattribute phhsu_daemon coredomain;
|
|
|
|
permissive phhsu_daemon;
|
|
|
|
|
|
|
|
tmpfs_domain(phhsu_daemon);
|
|
|
|
domain_auto_trans(init, phhsu_exec, phhsu_daemon);
|
|
|
|
file_type_auto_trans(phhsu_daemon, device, phhsu_daemon);
|
|
|
|
|
|
|
|
allow { appdomain shell } phhsu_daemon:unix_stream_socket { connectto write read };
|
|
|
|
allow { appdomain shell } phhsu_daemon:sock_file { write read };
|
|
|
|
allow { appdomain shell } phhsu_exec:file { getattr read open execute execute_no_trans };
|
|
|
|
|
|
|
|
create_pty(shell)
|
2018-12-03 20:18:47 +00:00
|
|
|
allowxperm shell devpts:chr_file ioctl { TCSETSF TCGETS unpriv_tty_ioctls };
|
|
|
|
allowxperm { phhsu_daemon untrusted_app untrusted_app_27 } untrusted_app_all_devpts:chr_file ioctl { TCSETSF TCGETS unpriv_tty_ioctls };
|
2017-12-19 12:08:26 +00:00
|
|
|
|
|
|
|
allow servicemanager phhsu_daemon:dir { search read };
|
|
|
|
allow servicemanager phhsu_daemon:file { open read };
|
|
|
|
allow servicemanager phhsu_daemon:process { getattr };
|
|
|
|
allow servicemanager phhsu_daemon:binder { call transfer };
|
|
|
|
|
|
|
|
typeattribute phhsu_daemon mlstrustedobject;
|
|
|
|
typeattribute phhsu_daemon mlstrustedsubject;
|
|
|
|
|
|
|
|
allow shell su_exec:file getattr;
|
|
|
|
typeattribute su mlstrustedsubject;
|
|
|
|
|
|
|
|
allow phhsu_daemon { system_api_service app_api_service system_server_service }:service_manager find;
|
|
|
|
|
2018-05-19 11:39:22 +00:00
|
|
|
allow system_server phhsu_daemon:fifo_file { read write };
|
2017-12-19 12:08:26 +00:00
|
|
|
allow system_server phhsu_daemon:fd use;
|
2017-12-21 22:20:52 +00:00
|
|
|
allow system_server phhsu_daemon:binder { call transfer };
|
|
|
|
allow system_server shell_devpts:chr_file { read write };
|
2017-12-19 12:08:26 +00:00
|
|
|
|
|
|
|
# Add su to various domains
|
2018-05-01 20:03:36 +00:00
|
|
|
net_domain(phhsu_daemon)
|
2017-12-19 12:08:26 +00:00
|
|
|
|
2018-05-01 20:03:36 +00:00
|
|
|
hwbinder_use(phhsu_daemon)
|
2017-12-19 12:08:26 +00:00
|
|
|
|
2018-12-03 20:18:47 +00:00
|
|
|
allow phhsu_daemon untrusted_app_all_devpts:chr_file { getattr read write open ioctl };
|
2017-12-19 12:08:26 +00:00
|
|
|
allow phhsu_daemon zygote_exec:file { execute read open execute_no_trans getattr };
|
|
|
|
|
|
|
|
allow appdomain phhsu_daemon:dir { search };
|
2018-12-03 20:18:47 +00:00
|
|
|
|
|
|
|
allow phhsu_daemon self:global_capability_class_set { sys_resource sys_ptrace };
|
|
|
|
|
|
|
|
allow phhsu_daemon self:dir rw_dir_perms;
|
|
|
|
allow phhsu_daemon self:file { rwx_file_perms create rename setattr unlink };
|
|
|
|
allow phhsu_daemon self:lnk_file { r_file_perms execmod };
|
|
|
|
|
|
|
|
allow phhsu_daemon adbd_exec:file { getattr read };
|
|
|
|
allow phhsu_daemon { rootfs same_process_hal_file system_file }:file { mounton getattr };
|
|
|
|
allow phhsu_daemon self:capability { sys_admin chown setuid setgid net_raw dac_override dac_read_search kill };
|
|
|
|
allow phhsu_daemon self:capability2 { syslog };
|
|
|
|
allow phhsu_daemon shell_exec:file rx_file_perms;
|
|
|
|
allow phhsu_daemon system_file:file { rx_file_perms entrypoint };
|
|
|
|
allow phhsu_daemon kmsg_device:chr_file { ioctl w_file_perms };
|
|
|
|
allow phhsu_daemon toolbox_exec:file rx_file_perms;
|
|
|
|
allow phhsu_daemon system_block_device:{ lnk_file file } r_file_perms;
|
|
|
|
|
|
|
|
allow { phhsu_daemon shell } domain:dir rw_dir_perms;
|
|
|
|
allow { phhsu_daemon shell } domain:file rw_file_perms;
|
|
|
|
allow { phhsu_daemon shell } domain:lnk_file rw_file_perms;
|
|
|
|
allow { phhsu_daemon shell } rootfs:file { rwx_file_perms create rename setattr unlink };
|
|
|
|
allow { phhsu_daemon shell } rootfs:dir rw_dir_perms;
|
|
|
|
allow phhsu_daemon asec_apk_file:dir rw_dir_perms;
|
|
|
|
|
|
|
|
allow phhsu_daemon shell_devpts:chr_file rw_file_perms;
|
|
|
|
|
|
|
|
allow phhsu_daemon app_data_file:dir rw_dir_perms;
|
|
|
|
allow phhsu_daemon app_data_file:file { rwx_file_perms create rename setattr unlink };
|
|
|
|
allow phhsu_daemon dalvikcache_data_file:dir rw_dir_perms;
|
|
|
|
allow phhsu_daemon dalvikcache_data_file:file { rwx_file_perms create rename setattr unlink };
|
|
|
|
allow phhsu_daemon dalvikcache_data_file:lnk_file { r_file_perms execmod };
|
|
|
|
allow phhsu_daemon system_data_file:file { rwx_file_perms create rename setattr unlink };
|
|
|
|
allow phhsu_daemon system_data_file:dir rw_dir_perms;
|
|
|
|
allow phhsu_daemon system_data_file:file { rwx_file_perms create rename setattr unlink };
|
|
|
|
allow phhsu_daemon system_file:dir rw_dir_perms;
|
|
|
|
allow phhsu_daemon system_file:file { rwx_file_perms create rename setattr unlink };
|
|
|
|
allow phhsu_daemon init:unix_stream_socket { connectto };
|
|
|
|
allow phhsu_daemon self:process { ptrace setexec execmem setfscreate };
|
|
|
|
allow phhsu_daemon tmpfs:filesystem { associate };
|
|
|
|
allow phhsu_daemon app_data_file:file { rwx_file_perms create rename setattr unlink };
|
|
|
|
allow phhsu_daemon app_data_file:dir rw_dir_perms;
|
|
|
|
allow phhsu_daemon ashmem_device:chr_file { execute };
|
|
|
|
allow phhsu_daemon dex2oat_exec:file rx_file_perms;
|
|
|
|
|
|
|
|
|
|
|
|
allow phhsu_daemon phhsu_daemon_tmpfs:file rwx_file_perms;
|
|
|
|
|
|
|
|
allow phhsu_daemon { proc_type dev_type exec_type file_type sysfs_type fs_type }:file { rwx_file_perms create };
|
|
|
|
allow phhsu_daemon { proc_type dev_type exec_type file_type sysfs_type fs_type }:dir rw_dir_perms;
|
|
|
|
allow phhsu_daemon { proc_type dev_type exec_type file_type sysfs_type fs_type }:chr_file rwx_file_perms;
|
|
|
|
allow phhsu_daemon { proc_type dev_type exec_type file_type sysfs_type fs_type }:blk_file rw_file_perms;
|
|
|
|
|
|
|
|
allow phhsu_daemon labeledfs:filesystem { remount unmount };
|
|
|
|
allow phhsu_daemon device:file rwx_file_perms;
|
|
|
|
allow phhsu_daemon device:dir rw_dir_perms;
|
|
|
|
|
|
|
|
allow phhsu_daemon domain:process { ptrace signal signull };
|
|
|
|
allow phhsu_daemon selinuxfs:file rwx_file_perms;
|
|
|
|
allow domain phhsu_daemon:process { sigchld };
|
|
|
|
allow phhsu_daemon domain:binder { call transfer };
|
|
|
|
allow phhsu_daemon kernel:system { syslog_read syslog_mod };
|
|
|
|
allow phhsu_daemon kernel:security { setenforce };
|
|
|
|
allow phhsu_daemon domain:unix_stream_socket { getattr };
|
|
|
|
|
|
|
|
allow phhsu_daemon logdr_socket:sock_file write;
|
|
|
|
allow phhsu_daemon logd:unix_stream_socket connectto;
|
|
|
|
|
|
|
|
allow phhsu_daemon property_type:property_service { set };
|
|
|
|
allow phhsu_daemon property_socket:sock_file { write };
|
|
|
|
allow phhsu_daemon property_type:file rw_file_perms;
|
|
|
|
allow phhsu_daemon { hwservicemanager hwservice_manager_type }:hwservice_manager { list add find };
|
|
|
|
allow phhsu_daemon domain:unix_dgram_socket rw_socket_perms;
|