1 type cnd, domain; 2 type cnd_exec, exec_type, vendor_file_type, file_type; 3 file_type_auto_trans(cnd, socket_device, cnd_socket); 4 5 # cnd is started by init, type transit from init domain to cnd domain 6 init_daemon_domain(cnd) 7 8 #communicating with QTI wlan driver for WFC/ VTiWLAN quality 9 allow cnd self:capability net_bind_service; 10 11 unix_socket_send(cnd, wpa, hal_wifi_supplicant) 12 allow cnd wpa_data_file:dir rw_dir_perms; 13 allow cnd wpa_data_file:sock_file create_file_perms; 14 allow cnd wpa_socket:sock_file write; 15 16 userdebug_or_eng(` 17 allow cnd diag_device:chr_file rw_file_perms; 18 ') 19 20 allow cnd self:udp_socket create_socket_perms; 21 allowxperm cnd self:udp_socket ioctl SIOCGIFMTU; 22 allow cnd self:{ 23 # Allow receiving NETLINK responses from WLAN driver. 24 netlink_socket 25 netlink_generic_socket 26 } create_socket_perms_no_ioctl; 27 28 allow cnd sysfs_timestamp_switch:file r_file_perms; 29 r_dir_file(cnd, sysfs_msm_subsys) 30 r_dir_file(cnd, sysfs_diag) 31 r_dir_file(cnd, sysfs_soc) 32 33 allow cnd proc_meminfo:file r_file_perms; 34 35 set_prop(cnd, cnd_prop) 36 37 allow cnd self:socket create_socket_perms; 38 allowxperm cnd self:socket ioctl msm_sock_ipc_ioctls; 39 40 # allow cnd to access cnd_data_file 41 allow cnd cnd_data_file:file create_file_perms; 42 allow cnd cnd_data_file:sock_file { unlink create setattr }; 43 allow cnd cnd_data_file:dir rw_dir_perms; 44 45 # allow cnd to obtain wakelock 46 wakelock_use(cnd) 47 48 allow cnd ipa_vendor_data_file:dir r_dir_perms; 49 allow cnd ipa_vendor_data_file:file r_file_perms; 50 51 # To register cnd to hwbinder 52 add_hwservice(cnd, hal_cne_hwservice) 53 hwbinder_use(cnd) 54 get_prop(cnd, hwservicemanager_prop) 55 binder_call(cnd, dataservice_app) 56 binder_call(cnd, ims) 57 binder_call(cnd, location) 58 59 dontaudit cnd kernel:system module_request; 60