9ec532752d
Any FUSE filesystem will receive the 'fuse' type when mounted. It is possible to change this behaviour by specifying the "context=" or "fscontext=" option in mount(). Because 'fuse' has historically been used only for the emulated storage, it also received the 'sdcard_type' attribute. Replace the 'sdcard_type' attribute from 'fuse' with the new 'fusefs_type'. This attribute can be attached on derived types (such as app_fusefs). This change: - Remove the neverallow restriction on this new type. This means any custom FUSE implementation can be mounted/unmounted (if the correct allow rule is added). See domain.te. - Change the attribute of 'fuse' from 'sdcard_type' to 'fusefs_type'. See file.te. - Modify all references to 'sdcard_type' to explicitly include 'fuse' for compatibility reason. Bug: 177481425 Bug: 190804537 Test: Build and boot aosp_cf_x86_64_phone-userdebug Change-Id: Id4e410a049f72647accd4c3cf43eaa55e94c318f
27 lines
1.1 KiB
Text
27 lines
1.1 KiB
Text
# HwBinder IPC from client to server
|
|
binder_call(hal_wifi_hostapd_client, hal_wifi_hostapd_server)
|
|
binder_call(hal_wifi_hostapd_server, hal_wifi_hostapd_client)
|
|
|
|
hal_attribute_hwservice(hal_wifi_hostapd, hal_wifi_hostapd_hwservice)
|
|
|
|
allow hal_wifi_hostapd_server self:global_capability_class_set { net_admin net_raw };
|
|
|
|
allow hal_wifi_hostapd_server sysfs_net:dir search;
|
|
|
|
# Allow hal_wifi_hostapd to access /proc/net/psched
|
|
allow hal_wifi_hostapd_server proc_net_type:file { getattr open read };
|
|
|
|
# Various socket permissions.
|
|
allowxperm hal_wifi_hostapd_server self:udp_socket ioctl priv_sock_ioctls;
|
|
allow hal_wifi_hostapd_server self:netlink_socket create_socket_perms_no_ioctl;
|
|
allow hal_wifi_hostapd_server self:netlink_generic_socket create_socket_perms_no_ioctl;
|
|
allow hal_wifi_hostapd_server self:packet_socket create_socket_perms_no_ioctl;
|
|
allow hal_wifi_hostapd_server self:netlink_route_socket nlmsg_write;
|
|
|
|
###
|
|
### neverallow rules
|
|
###
|
|
|
|
# hal_wifi_hostapd should not trust any data from sdcards
|
|
neverallow hal_wifi_hostapd_server { sdcard_type fuse }:dir ~getattr;
|
|
neverallow hal_wifi_hostapd_server { sdcard_type fuse }:file *;
|