summaryrefslogtreecommitdiffstats
path: root/test/qmi_test_service.te
blob: ed97c2eceed655f61d5408556a3e74b7ad285b8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#must be defined for file_contexts
type qmi_test_service_exec, exec_type, file_type;

userdebug_or_eng(`
  type qmi_test_service, domain;
  domain_auto_trans(shell, qmi_test_service_exec, qmi_test_service)
  domain_auto_trans(adbd, qmi_test_service_exec, qmi_test_service)
  #test is launched from pseudo terminal so output goes there
  allow qmi_test_service devpts:chr_file {read write getattr ioctl};
  #to access smem log
  allow qmi_test_service smem_log_device:chr_file {read write open ioctl};
  #to enable qmuxd interface apis to access diag
  allow qmi_test_service diag_device:chr_file {read write open ioctl};
  #enable accessing the path where qmuxds named sockets are present
  #to interface with qmuxd through unix sockets
  #to access ipc router socket
  allow qmi_test_service qmi_test_service:socket {create bind ioctl read write setopt};
  #enable running test as root user => privileged process
  #enable privileged processes to bypass permission checks
  allow qmi_test_service qmi_test_service:capability {dac_override dac_read_search setgid setuid fsetid};
  #QCCI calls qmuxd API.  The API will internally require this
  qmux_socket(qmi_test_service);
')