diff --git a/private/file_contexts b/private/file_contexts index 23b0bbe4a686f009c1b5c13d145d7a5494c9621b..54192128bc5e804de2fd1b23d97824423574fe59 100644 --- a/private/file_contexts +++ b/private/file_contexts @@ -217,7 +217,6 @@ /system/xbin/perfprofd u:object_r:perfprofd_exec:s0 /system/bin/dnsmasq u:object_r:dnsmasq_exec:s0 /system/bin/healthd u:object_r:healthd_exec:s0 -/system/bin/hostapd u:object_r:hostapd_exec:s0 /system/bin/clatd u:object_r:clatd_exec:s0 /system/bin/lmkd u:object_r:lmkd_exec:s0 /system/bin/inputflinger u:object_r:inputflinger_exec:s0 @@ -325,7 +324,6 @@ /data/misc/wifi(/.*)? u:object_r:wifi_data_file:s0 /data/misc/wifi/sockets(/.*)? u:object_r:wpa_socket:s0 /data/misc/wifi/sockets/wpa_ctrl.* u:object_r:system_wpa_socket:s0 -/data/misc/wifi/hostapd(/.*)? u:object_r:hostapd_socket:s0 /data/misc/zoneinfo(/.*)? u:object_r:zoneinfo_data_file:s0 /data/misc/vold(/.*)? u:object_r:vold_data_file:s0 /data/misc/perfprofd(/.*)? u:object_r:perfprofd_data_file:s0 diff --git a/private/hostapd.te b/private/hostapd.te deleted file mode 100644 index d895f2916499133ab3fdc4231f1ae0dc5857e8ba..0000000000000000000000000000000000000000 --- a/private/hostapd.te +++ /dev/null @@ -1,3 +0,0 @@ -# type_transition must be private policy the domain_trans rules could stay -# public, but conceptually should go with this -init_daemon_domain(hostapd) diff --git a/public/file.te b/public/file.te index 2936d65155d4d5017c8daf378ba7588691350aab..71ea3244c0fca05f8aab41b43b5ec029491ec3cc 100644 --- a/public/file.te +++ b/public/file.te @@ -246,8 +246,6 @@ type uncrypt_socket, file_type; type vold_socket, file_type; type webview_zygote_socket, file_type; type wpa_socket, file_type; -# hostapd control interface. -type hostapd_socket, file_type; type zygote_socket, file_type; type sap_uim_socket, file_type; # UART (for GPS) control proc file diff --git a/vendor/file.te b/vendor/file.te new file mode 100644 index 0000000000000000000000000000000000000000..aeafb4aa64ba3d1989728dd69a85c259453cb7bb --- /dev/null +++ b/vendor/file.te @@ -0,0 +1,2 @@ +# Socket types +type hostapd_socket, file_type; diff --git a/vendor/file_contexts b/vendor/file_contexts index 98317e32c46f76d4ced85e3b8c55cf73df941909..40cf1f314f5918951f82dd160f0aeed181130428 100644 --- a/vendor/file_contexts +++ b/vendor/file_contexts @@ -28,4 +28,10 @@ /(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator@1\.0-service u:object_r:hal_vibrator_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.vr@1\.0-service u:object_r:hal_vr_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.wifi@1\.0-service u:object_r:hal_wifi_default_exec:s0 -/(vendor|system/vendor)/bin/hw/wpa_supplicant u:object_r:hal_wifi_supplicant_default_exec:s0 +/(vendor|system/vendor)/bin/hw/wpa_supplicant u:object_r:hal_wifi_supplicant_default_exec:s0 +/(vendor|system/vendor)/bin/hostapd u:object_r:hostapd_exec:s0 + +############################# +# Data files +# +/data/misc/wifi/hostapd(/.*)? u:object_r:hostapd_socket:s0 diff --git a/public/hostapd.te b/vendor/hostapd.te similarity index 97% rename from public/hostapd.te rename to vendor/hostapd.te index b40bdc84a50d9dd39c527c33430183e6be4df904..02bafaa93ae7220bb6b97095266035abc71bb6e0 100644 --- a/public/hostapd.te +++ b/vendor/hostapd.te @@ -2,6 +2,7 @@ type hostapd, domain; type hostapd_exec, exec_type, file_type; +init_daemon_domain(hostapd) net_domain(hostapd) allow hostapd self:capability { net_admin net_raw };