lowpan: Add wpantund to SEPolicy
Bug: b/64399219
Test: Manual
Change-Id: I4f6c7e4e3339ae95e43299bf364edff40d07c796
(cherry picked from commit c8bd93d7e8
)
This commit is contained in:
parent
28bc373d83
commit
fd03d51736
6 changed files with 33 additions and 1 deletions
|
@ -33,7 +33,11 @@
|
|||
thermalserviced_tmpfs
|
||||
timezone_service
|
||||
tombstoned_java_trace_socket
|
||||
vold_service))
|
||||
vold_service
|
||||
wpantund
|
||||
wpantund_exec
|
||||
wpantund_service
|
||||
wpantund_tmpfs))
|
||||
|
||||
;; private_objects - a collection of types that were labeled differently in
|
||||
;; older policy, but that should not remain accessible to vendor policy.
|
||||
|
|
|
@ -259,6 +259,7 @@
|
|||
/system/bin/thermalserviced u:object_r:thermalserviced_exec:s0
|
||||
/system/bin/webview_zygote32 u:object_r:webview_zygote_exec:s0
|
||||
/system/bin/webview_zygote64 u:object_r:webview_zygote_exec:s0
|
||||
/system/bin/wpantund u:object_r:wpantund_exec:s0
|
||||
/system/bin/virtual_touchpad u:object_r:virtual_touchpad_exec:s0
|
||||
/system/bin/hw/android\.hidl\.allocator@1\.0-service u:object_r:hal_allocator_default_exec:s0
|
||||
/system/etc/selinux/mapping/[0-9]+\.[0-9]+\.cil u:object_r:sepolicy_file:s0
|
||||
|
|
|
@ -180,6 +180,7 @@ binder_call(system_server, incidentd)
|
|||
binder_call(system_server, netd)
|
||||
binder_call(system_server, vold)
|
||||
binder_call(system_server, wificond)
|
||||
binder_call(system_server, wpantund)
|
||||
binder_service(system_server)
|
||||
|
||||
# Use HALs
|
||||
|
|
3
private/wpantund.te
Normal file
3
private/wpantund.te
Normal file
|
@ -0,0 +1,3 @@
|
|||
typeattribute wpantund coredomain;
|
||||
|
||||
init_daemon_domain(wpantund)
|
|
@ -150,3 +150,4 @@ type wifi_service, app_api_service, system_server_service, service_manager_type;
|
|||
type wificond_service, service_manager_type;
|
||||
type wifiaware_service, app_api_service, system_server_service, service_manager_type;
|
||||
type window_service, system_api_service, system_server_service, service_manager_type;
|
||||
type wpantund_service, system_api_service, service_manager_type;
|
||||
|
|
22
public/wpantund.te
Normal file
22
public/wpantund.te
Normal file
|
@ -0,0 +1,22 @@
|
|||
type wpantund, domain;
|
||||
type wpantund_exec, exec_type, file_type;
|
||||
|
||||
hal_client_domain(wpantund, hal_lowpan)
|
||||
net_domain(wpantund)
|
||||
|
||||
binder_use(wpantund)
|
||||
binder_call(wpantund, system_server)
|
||||
|
||||
# wpantund needs to be able to check in with the lowpan_service
|
||||
allow wpantund lowpan_service:service_manager find;
|
||||
|
||||
# create sockets to set interfaces up and down, add multicast groups, etc.
|
||||
allow wpantund self:udp_socket create_socket_perms;
|
||||
|
||||
# setting interface state up/down and changing MTU are privileged ioctls
|
||||
allowxperm wpantund self:udp_socket ioctl { SIOCSIFFLAGS SIOCSIFMTU };
|
||||
|
||||
# Allow us to bring up a TUN network interface.
|
||||
allow wpantund tun_device:chr_file rw_file_perms;
|
||||
allow wpantund self:capability { net_admin net_raw };
|
||||
allow wpantund self:tun_socket create;
|
Loading…
Reference in a new issue