1type wcnss_service, domain;
2type wcnss_service_exec, exec_type, vendor_file_type, file_type;
3
4init_daemon_domain(wcnss_service)
5net_domain(wcnss_service)
6
7vndbinder_use(wcnss_service)
8binder_call(wcnss_service, per_mgr)
9
10allow wcnss_service per_mgr_service:service_manager find;
11
12allow wcnss_service vendor_shell_exec:file rx_file_perms;
13allow wcnss_service vendor_toolbox_exec:file rx_file_perms;
14
15allow wcnss_service proc_net_type:file { getattr w_file_perms };
16
17allow wcnss_service self:socket create_socket_perms;
18allowxperm wcnss_service self:socket ioctl msm_sock_ipc_ioctls;
19allowxperm wcnss_service self:udp_socket ioctl { SIOCIWFIRSTPRIV_05 SIOCSIFFLAGS };
20allow wcnss_service self:netlink_generic_socket create_socket_perms_no_ioctl;
21allow wcnss_service self:netlink_socket create_socket_perms_no_ioctl;
22
23allow wcnss_service cnss_vendor_data_file:dir create_dir_perms;
24allow wcnss_service cnss_vendor_data_file:file create_file_perms;
25
26r_dir_file(wcnss_service, sysfs_msm_subsys)
27# pkt logging for cnss_diag
28userdebug_or_eng(`
29  r_dir_file(wcnss_service, proc_wifi_dbg)
30  r_dir_file(wcnss_service, sysfs_diag)
31  allow wcnss_service sysfs_timestamp_switch:file r_file_perms;
32  allow wcnss_service diag_device:chr_file rw_file_perms;
33')
34dontaudit wcnss_service diag_device:chr_file rw_file_perms;
35
36allow wcnss_service sysfs_soc:dir search;
37allow wcnss_service sysfs_soc:file r_file_perms;
38
39# request_firmware causes a denial for /firmware. It can be safely ignored
40dontaudit wcnss_service firmware_file:dir search;
41
42r_dir_file(wcnss_service, sysfs_net)
43