d22987b4da
Motivation: Domain is overly permissive. Start removing permissions from domain and assign them to the domain_deprecated attribute. Domain_deprecated and domain can initially be assigned to all domains. The goal is to not assign domain_deprecated to new domains and to start removing domain_deprecated where it is not required or reassigning the appropriate permissions to the inheriting domain when necessary. Bug: 25433265 Change-Id: I8b11cb137df7bdd382629c98d916a73fe276413c
49 lines
1.7 KiB
Text
49 lines
1.7 KiB
Text
# rild - radio interface layer daemon
|
|
type rild, domain, domain_deprecated;
|
|
type rild_exec, exec_type, file_type;
|
|
|
|
init_daemon_domain(rild)
|
|
net_domain(rild)
|
|
allow rild self:netlink_route_socket nlmsg_write;
|
|
allow rild kernel:system module_request;
|
|
allow rild self:capability { setuid net_admin net_raw };
|
|
allow rild alarm_device:chr_file rw_file_perms;
|
|
allow rild cgroup:dir create_dir_perms;
|
|
allow rild radio_device:chr_file rw_file_perms;
|
|
allow rild radio_device:blk_file r_file_perms;
|
|
allow rild mtd_device:dir search;
|
|
allow rild efs_file:dir create_dir_perms;
|
|
allow rild efs_file:file create_file_perms;
|
|
allow rild shell_exec:file rx_file_perms;
|
|
allow rild bluetooth_efs_file:file r_file_perms;
|
|
allow rild bluetooth_efs_file:dir r_dir_perms;
|
|
allow rild radio_data_file:dir rw_dir_perms;
|
|
allow rild radio_data_file:file create_file_perms;
|
|
allow rild sdcard_type:dir r_dir_perms;
|
|
allow rild system_data_file:dir r_dir_perms;
|
|
allow rild system_data_file:file r_file_perms;
|
|
allow rild system_file:file x_file_perms;
|
|
# XXX Run toolbox. Might not be needed.
|
|
allow rild toolbox_exec:file rx_file_perms;
|
|
auditallow rild toolbox_exec:file rx_file_perms;
|
|
|
|
# property service
|
|
set_prop(rild, radio_prop)
|
|
set_prop(rild, net_radio_prop)
|
|
set_prop(rild, system_radio_prop)
|
|
auditallow rild net_radio_prop:property_service set;
|
|
auditallow rild system_radio_prop:property_service set;
|
|
|
|
# Read/Write to uart driver (for GPS)
|
|
allow rild gps_device:chr_file rw_file_perms;
|
|
|
|
allow rild tty_device:chr_file rw_file_perms;
|
|
|
|
# Allow rild to create and use netlink sockets.
|
|
allow rild self:netlink_socket create_socket_perms;
|
|
allow rild self:netlink_kobject_uevent_socket create_socket_perms;
|
|
|
|
# Access to wake locks
|
|
wakelock_use(rild)
|
|
|
|
allow rild self:socket create_socket_perms;
|