1type cbd, domain; 2type cbd_exec, vendor_file_type, exec_type, file_type; 3init_daemon_domain(cbd) 4 5set_prop(cbd, vendor_modem_prop) 6set_prop(cbd, vendor_cbd_prop) 7set_prop(cbd, vendor_rild_prop) 8get_prop(cbd, telephony_modem_prop) 9 10# Allow cbd to set gid/uid from too to radio 11allow cbd self:capability { setgid setuid }; 12 13allow cbd mnt_vendor_file:dir r_dir_perms; 14 15allow cbd kmsg_device:chr_file rw_file_perms; 16 17allow cbd vendor_shell_exec:file execute_no_trans; 18allow cbd vendor_toolbox_exec:file execute_no_trans; 19 20# Allow cbd to access modem block device 21allow cbd block_device:dir search; 22allow cbd modem_block_device:blk_file r_file_perms; 23 24# Allow cbd to access sysfs chosen files 25allow cbd sysfs_chosen:file r_file_perms; 26allow cbd sysfs_chosen:dir r_dir_perms; 27 28allow cbd radio_device:chr_file rw_file_perms; 29 30allow cbd proc_cmdline:file r_file_perms; 31 32allow cbd persist_modem_file:dir create_dir_perms; 33allow cbd persist_modem_file:file create_file_perms; 34allow cbd persist_file:dir search; 35 36allow cbd radio_vendor_data_file:dir create_dir_perms; 37allow cbd radio_vendor_data_file:file create_file_perms; 38 39# Allow cbd to operate with modem EFS file/dir 40allow cbd modem_efs_file:dir create_dir_perms; 41allow cbd modem_efs_file:file create_file_perms; 42 43# Allow cbd to operate with modem userdata file/dir 44allow cbd modem_userdata_file:dir create_dir_perms; 45allow cbd modem_userdata_file:file create_file_perms; 46 47# Allow cbd to access modem image file/dir 48allow cbd modem_img_file:dir r_dir_perms; 49allow cbd modem_img_file:file r_file_perms; 50allow cbd modem_img_file:lnk_file r_file_perms; 51 52# Allow cbd to collect crash info 53allow cbd sscoredump_vendor_data_crashinfo_file:dir create_dir_perms; 54allow cbd sscoredump_vendor_data_crashinfo_file:file create_file_perms; 55 56userdebug_or_eng(` 57 r_dir_file(cbd, vendor_slog_file) 58 59 allow cbd kernel:system syslog_read; 60 61 allow cbd sscoredump_vendor_data_coredump_file:dir create_dir_perms; 62 allow cbd sscoredump_vendor_data_coredump_file:file create_file_perms; 63') 64 65