Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 1 | # rild - radio interface layer daemon |
| 2 | type rild, domain; |
Nick Kralevich | 623975f | 2014-01-11 01:31:03 -0800 | [diff] [blame] | 3 | permissive_or_unconfined(rild) |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 4 | type rild_exec, exec_type, file_type; |
| 5 | |
| 6 | init_daemon_domain(rild) |
| 7 | net_domain(rild) |
Stephen Smalley | dcbab90 | 2013-10-29 14:42:39 -0400 | [diff] [blame] | 8 | allow rild self:netlink_route_socket { setopt write }; |
| 9 | allow rild kernel:system module_request; |
| 10 | unix_socket_connect(rild, property, init) |
| 11 | unix_socket_connect(rild, qemud, qemud) |
| 12 | allow rild self:capability { setuid net_admin net_raw }; |
| 13 | allow rild alarm_device:chr_file rw_file_perms; |
| 14 | allow rild cgroup:dir create_dir_perms; |
| 15 | allow rild radio_device:chr_file rw_file_perms; |
| 16 | allow rild radio_device:blk_file r_file_perms; |
| 17 | allow rild qemu_device:chr_file rw_file_perms; |
| 18 | allow rild mtd_device:dir search; |
| 19 | allow rild efs_file:dir create_dir_perms; |
| 20 | allow rild efs_file:file create_file_perms; |
| 21 | allow rild shell_exec:file rx_file_perms; |
| 22 | allow rild bluetooth_efs_file:file r_file_perms; |
| 23 | allow rild bluetooth_efs_file:dir r_dir_perms; |
| 24 | allow rild radio_data_file:dir rw_dir_perms; |
| 25 | allow rild radio_data_file:file create_file_perms; |
| 26 | allow rild sdcard_type:dir r_dir_perms; |
| 27 | allow rild system_data_file:dir create_dir_perms; |
| 28 | allow rild system_data_file:file create_file_perms; |
| 29 | allow rild system_file:file x_file_perms; |
| 30 | dontaudit rild self:capability sys_admin; |
| 31 | |
| 32 | # property service |
| 33 | allow rild rild_prop:property_service set; |
| 34 | allow rild radio_prop:property_service set; |
| 35 | |
| 36 | # Read/Write to uart driver (for GPS) |
| 37 | allow rild gps_device:chr_file rw_file_perms; |
| 38 | |
| 39 | allow rild tty_device:chr_file rw_file_perms; |
| 40 | |
| 41 | # Allow rild to create, bind, read, write to itself through a netlink socket |
| 42 | allow rild self:netlink_socket { create bind read write }; |
| 43 | |
| 44 | allow rild self:netlink_kobject_uevent_socket { bind create getopt read setopt }; |
William Roberts | ec7d39b | 2013-09-28 18:46:21 -0400 | [diff] [blame] | 45 | |
| 46 | # Access to wake locks |
| 47 | allow rild sysfs_wake_lock:file rw_file_perms; |
Robert Craig | aa37683 | 2013-12-05 17:24:03 -0500 | [diff] [blame] | 48 | |
| 49 | allow rild self:socket create_socket_perms; |