device_google_gs101/whitechapel/vendor/google/dmd.te
Eddie Tashjian 8066a9f471 Fix modem logging configuration.
Missing binder configuration for dmd to return responses to modem
logging control binary, for cases when it needs to get log mask
configuration information.

Bug: 184605350
Test: Check logging works with selinux enabled.
Change-Id: Ia9a80870927fd890266f702b091343b4b4018673
2021-04-06 16:42:03 -07:00

31 lines
No EOL
984 B
Text

type dmd, domain;
type dmd_exec, vendor_file_type, exec_type, file_type;
init_daemon_domain(dmd)
# Grant to access serial device for external logging tool
allow dmd serial_device:chr_file rw_file_perms;
# Grant to access radio device
allow dmd radio_device:chr_file rw_file_perms;
# Grant to access slog dir/file
allow dmd vendor_slog_file:dir create_dir_perms;
allow dmd vendor_slog_file:file create_file_perms;
# Grant to access tcp socket
allow dmd node:tcp_socket node_bind;
allow dmd self:tcp_socket { create_socket_perms_no_ioctl listen accept bind };
# Grant to access log related properties
set_prop(dmd, vendor_diag_prop)
set_prop(dmd, vendor_slog_prop)
set_prop(dmd, vendor_modem_prop)
get_prop(dmd, vendor_persist_config_default_prop)
# Grant to access hwservice manager
get_prop(dmd, hwservicemanager_prop)
add_hwservice(dmd, hal_vendor_oem_hwservice)
binder_call(dmd, hwservicemanager)
binder_call(dmd, modem_diagnostic_app)
binder_call(dmd, modem_logging_control)