2012-01-04 18:33:27 +01:00
|
|
|
# adbd seclabel is specified in init.rc since
|
|
|
|
# it lives in the rootfs and has no unique file type.
|
|
|
|
type adbd, domain, mlstrustedsubject;
|
|
|
|
allow adbd adb_device:chr_file rw_file_perms;
|
2012-04-03 21:30:28 +02:00
|
|
|
allow adbd qemu_device:chr_file rw_file_perms;
|
2012-01-04 18:33:27 +01:00
|
|
|
allow adbd self:capability { net_raw setgid setuid dac_override sys_boot sys_admin };
|
2013-04-03 06:34:41 +02:00
|
|
|
allow adbd rootfs:file { r_file_perms entrypoint };
|
2012-01-04 18:33:27 +01:00
|
|
|
allow adbd init:process sigchld;
|
|
|
|
allow adbd self:tcp_socket *;
|
|
|
|
allow adbd self:unix_stream_socket *;
|
|
|
|
allow adbd node:tcp_socket node_bind;
|
|
|
|
allow adbd port:tcp_socket name_bind;
|
|
|
|
allow adbd devpts:chr_file rw_file_perms;
|
|
|
|
allow adbd cgroup:dir { write add_name create };
|
|
|
|
allow adbd labeledfs:filesystem remount;
|
|
|
|
allow adbd shell_data_file:dir rw_dir_perms;
|
|
|
|
allow adbd shell_data_file:file create_file_perms;
|
2013-03-26 19:00:13 +01:00
|
|
|
allow adbd sdcard_type:dir create_dir_perms;
|
|
|
|
allow adbd sdcard_type:file create_file_perms;
|
|
|
|
|
2012-01-04 18:33:27 +01:00
|
|
|
allow adbd graphics_device:dir search;
|
|
|
|
allow adbd graphics_device:chr_file r_file_perms;
|
|
|
|
# XXX Run /system/bin/vdc to connect to vold. Run in a separate domain?
|
|
|
|
allow adbd system_file:file rx_file_perms;
|
|
|
|
unix_socket_connect(adbd, vold, vold)
|
|
|
|
# Talk to init via the property socket.
|
|
|
|
unix_socket_connect(adbd, property, init)
|
|
|
|
|
2012-03-07 20:59:01 +01:00
|
|
|
# Run sh in its own domain.
|
|
|
|
domain_auto_trans(adbd, shell_exec, shell)
|
|
|
|
# Do not sanitize the environment of the shell.
|
|
|
|
allow adbd shell:process noatsecure;
|
2012-01-12 14:57:50 +01:00
|
|
|
|
2012-01-04 18:33:27 +01:00
|
|
|
# Perform binder IPC to surfaceflinger (screencap)
|
|
|
|
# XXX Run screencap in a separate domain?
|
|
|
|
binder_use(adbd)
|
|
|
|
binder_call(adbd, surfaceflinger)
|