2016-05-20 04:31:20 +02:00
|
|
|
# wificond
|
|
|
|
type wificond, domain;
|
|
|
|
type wificond_exec, exec_type, file_type;
|
|
|
|
|
2016-06-03 19:08:56 +02:00
|
|
|
binder_use(wificond)
|
|
|
|
binder_call(wificond, system_server)
|
|
|
|
|
2017-01-19 22:23:52 +01:00
|
|
|
add_service(wificond, wificond_service)
|
2016-06-30 23:23:12 +02:00
|
|
|
|
2016-08-23 02:47:36 +02:00
|
|
|
# wificond writes firmware paths to this file.
|
|
|
|
# wificond also changes the owership of this file on startup.
|
|
|
|
allow wificond sysfs_wlan_fwpath:file { w_file_perms setattr };
|
2016-06-29 20:28:20 +02:00
|
|
|
|
|
|
|
set_prop(wificond, wifi_prop)
|
2016-07-22 23:34:26 +02:00
|
|
|
set_prop(wificond, ctl_default_prop)
|
2016-07-01 02:48:12 +02:00
|
|
|
|
|
|
|
# create sockets to set interfaces up and down
|
|
|
|
allow wificond self:udp_socket create_socket_perms;
|
2016-08-23 02:47:13 +02:00
|
|
|
# setting interface state up/down is a privileged ioctl
|
|
|
|
allowxperm wificond self:udp_socket ioctl { SIOCSIFFLAGS };
|
2016-07-19 01:48:50 +02:00
|
|
|
allow wificond self:capability { net_admin net_raw };
|
2016-08-23 02:47:13 +02:00
|
|
|
# allow wificond to speak to nl80211 in the kernel
|
2016-05-17 06:12:17 +02:00
|
|
|
allow wificond self:netlink_socket create_socket_perms_no_ioctl;
|
2016-09-01 02:46:42 +02:00
|
|
|
# newer kernels (e.g. 4.4 but not 4.1) have a new class for sockets
|
2016-05-17 06:12:17 +02:00
|
|
|
allow wificond self:netlink_generic_socket create_socket_perms_no_ioctl;
|
2016-07-01 02:48:12 +02:00
|
|
|
|
|
|
|
r_dir_file(wificond, proc_net)
|
2016-07-21 18:12:28 +02:00
|
|
|
|
|
|
|
# wificond writes out configuration files for wpa_supplicant/hostapd.
|
2016-07-29 19:26:54 +02:00
|
|
|
# wificond also reads pid files out of this directory
|
2016-07-21 18:12:28 +02:00
|
|
|
allow wificond wifi_data_file:dir rw_dir_perms;
|
|
|
|
allow wificond wifi_data_file:file create_file_perms;
|
2016-08-23 02:47:36 +02:00
|
|
|
|
|
|
|
# wificond drops root shortly after starting
|
|
|
|
# wificond changes the ownership of some files before dropping root
|
|
|
|
allow wificond self:capability { setuid setgid setpcap chown };
|
2016-07-29 19:26:54 +02:00
|
|
|
|
2016-08-15 21:58:58 +02:00
|
|
|
# wificond cleans up sockets created by wpa_supplicant and framework
|
|
|
|
allow wificond wpa_socket:dir rw_dir_perms;
|
|
|
|
allow wificond system_wpa_socket:sock_file unlink;
|
|
|
|
allow wificond wpa_socket:sock_file unlink;
|
2016-09-07 22:58:04 +02:00
|
|
|
|
|
|
|
# dumpstate support
|
|
|
|
allow wificond dumpstate:fd use;
|
2016-05-17 06:12:17 +02:00
|
|
|
allow wificond dumpstate:fifo_file write;
|