diff --git a/non_plat/epdg_wod.te b/non_plat/epdg_wod.te new file mode 100644 index 0000000..e237880 --- /dev/null +++ b/non_plat/epdg_wod.te @@ -0,0 +1,24 @@ +type epdg_wod, domain, netdomain, mtkimsmddomain; +type epdg_wod_exec, exec_type, file_type, vendor_file_type; + +init_daemon_domain(epdg_wod) + +allow epdg_wod self:tun_socket { create relabelfrom relabelto }; +allow epdg_wod self:netlink_route_socket { create_socket_perms_no_ioctl nlmsg_read nlmsg_write }; +allow epdg_wod self:netlink_xfrm_socket { read write create getattr bind setopt nlmsg_write }; +allow epdg_wod self:udp_socket { ioctl create }; +allow epdg_wod self:rawip_socket { create getopt setopt }; +allow epdg_wod self:capability { kill net_admin net_raw }; + +allow epdg_wod tun_device:chr_file rw_file_perms; +allow epdg_wod { property_socket netd_socket }:sock_file write; +allow epdg_wod init:unix_stream_socket connectto; + +allow epdg_wod kernel:process signal; +allow epdg_wod system_server:process { signull signal }; + +allow epdg_wod device:dir { write add_name }; +allow epdg_wod device:lnk_file create; + +set_prop(epdg_wod, mtk_wod_prop) +set_prop(epdg_wod, persist_wod_prop) diff --git a/non_plat/file_contexts b/non_plat/file_contexts index c5b862e..d2cc05e 100644 --- a/non_plat/file_contexts +++ b/non_plat/file_contexts @@ -715,6 +715,7 @@ /dev/socket/volte_ua(/.*)? u:object_r:volte_ua_socket:s0 /dev/socket/volte_imcb(/.*)? u:object_r:volte_imcb_socket:s0 /(system\/vendor|vendor)/bin/bip u:object_r:bip_exec:s0 +/(system\/vendor|vendor)/bin/epdg_wod u:object_r:epdg_wod_exec:s0 /(system\/vendor|vendor)/bin/volte_imsm_93 u:object_r:volte_imsm_93_exec:s0 /(system\/vendor|vendor)/bin/volte_md_status u:object_r:volte_md_status_exec:s0 /(system\/vendor|vendor)/bin/volte_ua u:object_r:volte_ua_exec:s0 diff --git a/non_plat/property.te b/non_plat/property.te index 8af8169..04fe93a 100644 --- a/non_plat/property.te +++ b/non_plat/property.te @@ -340,3 +340,5 @@ type mtk_network_prop, property_type, mtk_core_property_type; type mtk_md_status_prop, property_type; type ctl_volte_ua_prop, property_type; type ctl_volte_imcb_prop, property_type; +type mtk_wod_prop, property_type, mtk_core_property_type; +type persist_wod_prop, property_type, mtk_core_property_type; diff --git a/non_plat/property_contexts b/non_plat/property_contexts index b2fa073..ace53ee 100644 --- a/non_plat/property_contexts +++ b/non_plat/property_contexts @@ -380,3 +380,5 @@ vendor.volte_md_status u:object_r:mtk_md_status_prop:s0 vendor.ril.volte. u:object_r:mtk_volte_prop:s0 ctl.vendor.volte_ua u:object_r:ctl_volte_ua_prop:s0 ctl.vendor.volte_imcb u:object_r:ctl_volte_imcb_prop:s0 +vendor.wo. u:object_r:mtk_wod_prop:s0 +persist.vendor.wo. u:object_r:persist_wod_prop:s0