diff --git a/bluetooth.te b/bluetooth.te index 6a329b70c3cbb75bd0fa32f805e1eb89a4df09a3..18178202a19a28165eb0270033949e4ceb3bea85 100644 --- a/bluetooth.te +++ b/bluetooth.te @@ -24,6 +24,8 @@ allow bluetooth self:capability net_admin; allow bluetooth self:capability2 wake_alarm; # tethering +allow bluetooth self:packet_socket create_socket_perms; +allow bluetooth self:capability { net_admin net_raw net_bind_service }; allow bluetooth self:tun_socket create_socket_perms; allow bluetooth efs_file:dir search; @@ -59,6 +61,6 @@ allow bluetooth shell_data_file:file read; ### # Superuser capabilities. -# bluetooth requires net_admin, wake_alarm and block_suspend -neverallow bluetooth self:capability ~net_admin; +# bluetooth requires net_{admin,raw,bind_service} and wake_alarm and block_suspend. +neverallow bluetooth self:capability ~{ net_admin net_raw net_bind_service }; neverallow bluetooth self:capability2 ~{ wake_alarm block_suspend }; diff --git a/netd.te b/netd.te index 2c0fb15cec1a32f3d0192c4b256fed185b8b2c2c..3c612a4beb58ec9b7a6b7eb4dd95d2b5caf0269f 100644 --- a/netd.te +++ b/netd.te @@ -30,15 +30,6 @@ allow netd proc_net:file write; # XXX Split into its own type. allow netd sysfs:file write; -# Set dhcp lease for PAN connection -set_prop(netd, dhcp_prop) -set_prop(netd, system_prop) -auditallow netd system_prop:property_service set; - -# Connect to PAN -domain_auto_trans(netd, dhcp_exec, dhcp) -allow netd dhcp:process signal; - # Needed to update /data/misc/wifi/hostapd.conf # TODO: See what we can do to reduce the need for # these capabilities