type ims, domain;
type ims_exec, exec_type, vendor_file_type, file_type;

init_daemon_domain(ims)
net_domain(ims)

get_prop(ims, hwservicemanager_prop)
set_prop(ims, ims_prop)

unix_socket_connect(ims, netmgrd, netmgrd)

allow ims sysfs_soc:dir search;
allow ims sysfs_soc:file r_file_perms;
allow ims sysfs_timestamp_switch:file r_file_perms;

allow ims self:capability net_bind_service;

userdebug_or_eng(`
  allow ims diag_device:chr_file rw_file_perms;
')

allow ims ion_device:chr_file r_file_perms;

unix_socket_connect(ims, cnd, cnd)

allow ims self:socket create_socket_perms;
allow ims ims_socket:sock_file write;
allow ims self:netlink_generic_socket create_socket_perms_no_ioctl;
allow ims netmgrd_socket:dir search;
allow ims netmgrd_socket:sock_file w_file_perms;
allow ims radio_vendor_data_file:dir rw_dir_perms;
allow ims radio_vendor_data_file:file create_file_perms;
allowxperm ims self:socket ioctl msm_sock_ipc_ioctls;
allowxperm ims self:udp_socket ioctl RMNET_IOCTL_EXTENDED;

r_dir_file(ims, sysfs_msm_subsys)
r_dir_file(ims, sysfs_diag)

hwbinder_use(ims)
allow ims hal_cne_hwservice:hwservice_manager find;
binder_call(ims, cnd)

dontaudit ims kernel:system module_request;