blob: d3f9905df979d68187b8affa27f5d0a2e45d4c95 [file] [log] [blame]
Stephen Smalley2dd4e512012-01-04 12:33:27 -05001# adbd seclabel is specified in init.rc since
2# it lives in the rootfs and has no unique file type.
3type adbd, domain, mlstrustedsubject;
4allow adbd adb_device:chr_file rw_file_perms;
Stephen Smalley2cb1b312012-04-03 15:30:28 -04005allow adbd qemu_device:chr_file rw_file_perms;
Stephen Smalley2dd4e512012-01-04 12:33:27 -05006allow adbd self:capability { net_raw setgid setuid dac_override sys_boot sys_admin };
7allow adbd rootfs:file entrypoint;
8allow adbd init:process sigchld;
9allow adbd self:tcp_socket *;
10allow adbd self:unix_stream_socket *;
11allow adbd node:tcp_socket node_bind;
12allow adbd port:tcp_socket name_bind;
13allow adbd devpts:chr_file rw_file_perms;
14allow adbd cgroup:dir { write add_name create };
15allow adbd labeledfs:filesystem remount;
16allow adbd shell_data_file:dir rw_dir_perms;
17allow adbd shell_data_file:file create_file_perms;
18allow adbd graphics_device:dir search;
19allow adbd graphics_device:chr_file r_file_perms;
20allow adbd log_device:chr_file r_file_perms;
21# XXX Run /system/bin/vdc to connect to vold. Run in a separate domain?
22allow adbd system_file:file rx_file_perms;
23unix_socket_connect(adbd, vold, vold)
24# Talk to init via the property socket.
25unix_socket_connect(adbd, property, init)
26
Stephen Smalleyc83d0082012-03-07 14:59:01 -050027# Run sh in its own domain.
28domain_auto_trans(adbd, shell_exec, shell)
29# Do not sanitize the environment of the shell.
30allow adbd shell:process noatsecure;
Stephen Smalley6261d6d2012-01-12 08:57:50 -050031
Stephen Smalley2dd4e512012-01-04 12:33:27 -050032# Perform binder IPC to surfaceflinger (screencap)
33# XXX Run screencap in a separate domain?
34binder_use(adbd)
35binder_call(adbd, surfaceflinger)