1type cnd, domain, mlstrustedsubject; 2type cnd_exec, exec_type, vendor_file_type, file_type; 3file_type_auto_trans(cnd, socket_device, cnd_socket); 4 5# cnd is started by init, type transit from init domain to cnd domain 6init_daemon_domain(cnd) 7 8#communicating with QTI wlan driver for WFC/ VTiWLAN quality 9allow cnd self:capability net_bind_service; 10unix_socket_send(cnd, wpa, hal_wifi_supplicant) 11allow cnd wpa_data_file:dir w_dir_perms; 12allow cnd wpa_data_file:sock_file create_file_perms; 13 14#allow processing of VoWifi indications from modem over QMI while dozing 15allow cnd self:capability2 block_suspend; 16 17allow cnd self:udp_socket create_socket_perms; 18allow cnd self:{ 19 # Allow receiving NETLINK responses from WLAN driver. 20 netlink_socket 21 netlink_generic_socket 22 qipcrtr_socket 23} create_socket_perms_no_ioctl; 24 25allowxperm cnd self:udp_socket ioctl SIOCGIFMTU; 26 27#allow cnd sysfs_timestamp_switch:file r_file_perms; 28r_dir_file(cnd, sysfs_msm_subsys) 29r_dir_file(cnd, sysfs_diag) 30r_dir_file(cnd, sysfs_soc) 31r_dir_file(cnd, sysfs_ssr) 32r_dir_file(cnd, sysfs_esoc) 33dontaudit cnd sysfs_faceauth:dir search; 34dontaudit cnd sysfs_faceauth:file { open read }; 35 36allow cnd proc_meminfo:file r_file_perms; 37 38set_prop(cnd, cnd_vendor_prop) 39 40# allow cnd to access cnd_data_file 41allow cnd cnd_data_file:file create_file_perms; 42allow cnd cnd_data_file:sock_file { unlink create setattr }; 43allow cnd cnd_data_file:dir rw_dir_perms; 44 45# allow cnd to obtain wakelock 46wakelock_use(cnd) 47 48allow cnd ipa_vendor_data_file:dir r_dir_perms; 49allow cnd ipa_vendor_data_file:file r_file_perms; 50 51# To register cnd to hwbinder 52add_hwservice(cnd, hal_datafactory_hwservice) 53add_hwservice(cnd, hal_mwqemadapter_hwservice) 54hwbinder_use(cnd) 55get_prop(cnd, hwservicemanager_prop) 56binder_call(cnd, dataservice_app) 57#for video call 58binder_call(cnd, ims) 59binder_call(cnd, location) 60userdebug_or_eng(` 61 binder_call(cnd, radio) 62 allow cnd diag_device:chr_file rw_file_perms; 63') 64 65# For WFC call(RAT change into IWLAN) 66binder_call(cnd, qtidataservices_app) 67 68get_prop(cnd, wifi_hal_prop) 69