wangxl | 5b6293a | 2015-02-03 21:10:20 +0800 | [diff] [blame^] | 1 | type qmuxd, domain; |
| 2 | type qmuxd_exec, exec_type, file_type; |
| 3 | net_domain(qmuxd) |
| 4 | init_daemon_domain(qmuxd) |
| 5 | |
| 6 | userdebug_or_eng(` |
| 7 | domain_auto_trans(shell, qmuxd_exec, qmuxd) |
| 8 | domain_auto_trans(adbd, qmuxd_exec, qmuxd) |
| 9 | ') |
| 10 | |
| 11 | #Allow qmuxd to operate on various qmux device sockets |
| 12 | #allow qmuxd qmux_radio_socket:dir { write add_name remove_name search }; |
| 13 | #allow qmuxd qmux_radio_socket:sock_file { create setattr getattr write unlink }; |
| 14 | #allow qmuxd qmux_audio_socket:dir { write add_name remove_name search }; |
| 15 | #allow qmuxd qmux_audio_socket:sock_file { create setattr getattr write unlink }; |
| 16 | #allow qmuxd qmux_gps_socket:dir { write add_name remove_name search }; |
| 17 | #allow qmuxd qmux_gps_socket:sock_file { create setattr getattr write unlink }; |
| 18 | #allow qmuxd qmux_bluetooth_socket:dir { write add_name remove_name search }; |
| 19 | #allow qmuxd qmux_bluetooth_socket:sock_file { create setattr getattr write unlink }; |
| 20 | |
| 21 | qmux_socket(qmuxd); |
| 22 | |
| 23 | #Allow logging |
| 24 | allow qmuxd diag_device:chr_file { rw_file_perms }; |
| 25 | |
| 26 | #Allow operation in platform specific transports |
| 27 | allow qmuxd smd_device:chr_file { rw_file_perms }; |
| 28 | allow qmuxd hsic_device:chr_file { rw_file_perms }; |
| 29 | |
| 30 | #Allow qmuxd to operate in platform specific transports |
| 31 | allow qmuxd sysfs_smd_open_timeout:file w_file_perms; |
| 32 | allow qmuxd sysfs_wake_lock:file { append open }; |
| 33 | |
| 34 | #Allow qmuxd to write in hsic specific transport |
| 35 | allow qmuxd sysfs:file w_file_perms; |
| 36 | |
| 37 | allow qmuxd self:capability { setuid setgid setpcap dac_override }; |
| 38 | |
| 39 | #Allow qmuxd to have the CAP_BLOCK_SUSPEND capability |
| 40 | allow qmuxd qmuxd:capability2 { block_suspend }; |
| 41 | |
| 42 | allow qmuxd sysfs_esoc:dir r_dir_perms; |
| 43 | allow qmuxd sysfs_hsic_modem_wait:file w_file_perms; |
| 44 | allow qmuxd sysfs_esoc:lnk_file read; |
| 45 | |
| 46 | r_dir_file(qmuxd, sysfs_ssr); |
| 47 | allow qmuxd mhi_device:chr_file rw_file_perms; |