xref: /aosp_15_r20/system/sepolicy/prebuilts/api/29.0/public/wificond.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1*e4a36f41SAndroid Build Coastguard Worker# wificond
2*e4a36f41SAndroid Build Coastguard Workertype wificond, domain;
3*e4a36f41SAndroid Build Coastguard Workertype wificond_exec, system_file_type, exec_type, file_type;
4*e4a36f41SAndroid Build Coastguard Worker
5*e4a36f41SAndroid Build Coastguard Workerbinder_use(wificond)
6*e4a36f41SAndroid Build Coastguard Workerbinder_call(wificond, system_server)
7*e4a36f41SAndroid Build Coastguard Worker
8*e4a36f41SAndroid Build Coastguard Workeradd_service(wificond, wificond_service)
9*e4a36f41SAndroid Build Coastguard Worker
10*e4a36f41SAndroid Build Coastguard Workerset_prop(wificond, exported_wifi_prop)
11*e4a36f41SAndroid Build Coastguard Workerset_prop(wificond, wifi_prop)
12*e4a36f41SAndroid Build Coastguard Workerset_prop(wificond, ctl_default_prop)
13*e4a36f41SAndroid Build Coastguard Worker
14*e4a36f41SAndroid Build Coastguard Worker# create sockets to set interfaces up and down
15*e4a36f41SAndroid Build Coastguard Workerallow wificond self:udp_socket create_socket_perms;
16*e4a36f41SAndroid Build Coastguard Worker# setting interface state up/down is a privileged ioctl
17*e4a36f41SAndroid Build Coastguard Workerallowxperm wificond self:udp_socket ioctl { SIOCSIFFLAGS SIOCSIFHWADDR };
18*e4a36f41SAndroid Build Coastguard Workerallow wificond self:global_capability_class_set { net_admin net_raw };
19*e4a36f41SAndroid Build Coastguard Worker# allow wificond to speak to nl80211 in the kernel
20*e4a36f41SAndroid Build Coastguard Workerallow wificond self:netlink_socket create_socket_perms_no_ioctl;
21*e4a36f41SAndroid Build Coastguard Worker# newer kernels (e.g. 4.4 but not 4.1) have a new class for sockets
22*e4a36f41SAndroid Build Coastguard Workerallow wificond self:netlink_generic_socket create_socket_perms_no_ioctl;
23*e4a36f41SAndroid Build Coastguard Worker
24*e4a36f41SAndroid Build Coastguard Workerr_dir_file(wificond, proc_net_type)
25*e4a36f41SAndroid Build Coastguard Worker
26*e4a36f41SAndroid Build Coastguard Worker# allow wificond to check permission for dumping logs
27*e4a36f41SAndroid Build Coastguard Workerallow wificond permission_service:service_manager find;
28*e4a36f41SAndroid Build Coastguard Worker
29*e4a36f41SAndroid Build Coastguard Worker# dumpstate support
30*e4a36f41SAndroid Build Coastguard Workerallow wificond dumpstate:fd use;
31*e4a36f41SAndroid Build Coastguard Workerallow wificond dumpstate:fifo_file write;
32