Lines Matching refs:shell

1 # Domain for shell processes spawned by ADB or console service.
2 type shell, domain, mlstrustedsubject;
6 net_domain(shell)
9 read_logd(shell)
10 control_logd(shell)
12 allow shell pstorefs:dir search;
13 allow shell pstorefs:file r_file_perms;
16 allow shell rootfs:dir r_dir_perms;
19 allow shell anr_data_file:dir r_dir_perms;
20 allow shell anr_data_file:file r_file_perms;
23 allow shell shell_data_file:dir create_dir_perms;
24 allow shell shell_data_file:file create_file_perms;
25 allow shell shell_data_file:file rx_file_perms;
26 allow shell shell_data_file:lnk_file create_file_perms;
29 allow shell trace_data_file:file { r_file_perms unlink };
30 allow shell trace_data_file:dir { r_dir_perms remove_name write };
33 allow shell profman_dump_data_file:dir { write remove_name r_dir_perms };
34 allow shell profman_dump_data_file:file { unlink r_file_perms };
38 allow shell nativetest_data_file:dir r_dir_perms;
39 allow shell nativetest_data_file:file rx_file_perms;
43 unix_socket_connect(shell, dumpstate, dumpstate)
45 allow shell devpts:chr_file rw_file_perms;
46 allow shell tty_device:chr_file rw_file_perms;
47 allow shell console_device:chr_file rw_file_perms;
49 allow shell input_device:dir r_dir_perms;
50 allow shell input_device:chr_file r_file_perms;
52 r_dir_file(shell, system_file)
53 allow shell system_file:file x_file_perms;
54 allow shell toolbox_exec:file rx_file_perms;
55 allow shell tzdatacheck_exec:file rx_file_perms;
56 allow shell shell_exec:file rx_file_perms;
57 allow shell zygote_exec:file rx_file_perms;
59 r_dir_file(shell, apk_data_file)
62 set_prop(shell, shell_prop)
63 set_prop(shell, ctl_bugreport_prop)
64 set_prop(shell, ctl_dumpstate_prop)
65 set_prop(shell, dumpstate_prop)
66 set_prop(shell, exported_dumpstate_prop)
67 set_prop(shell, debug_prop)
68 set_prop(shell, powerctl_prop)
69 set_prop(shell, log_tag_prop)
70 set_prop(shell, wifi_log_prop)
71 # Allow shell to start/stop traced via the persist.traced.enable
73 set_prop(shell, traced_enabled_prop)
75 userdebug_or_eng(`set_prop(shell, log_prop)')
77 userdebug_or_eng(`set_prop(shell, logpersistd_logging_prop)')
78 # Allow shell to start/stop heapprofd via the persist.heapprofd.enable
80 set_prop(shell, heapprofd_enabled_prop)
81 # Allow shell to start/stop gsid via ctl.start|stop|restart gsid.
82 set_prop(shell, ctl_gsid_prop)
83 # Allow shell to enable Dynamic System Update
84 set_prop(shell, dynamic_system_prop)
88 allow shell boottrace_data_file:dir rw_dir_perms;
89 allow shell boottrace_data_file:file create_file_perms;
90 set_prop(shell, persist_debug_prop)
94 get_prop(shell, serialno_prop)
96 # Allow shell to read the vendor security patch level for CTS
97 get_prop(shell, vendor_security_patch_level_prop)
100 get_prop(shell, device_logging_prop)
103 get_prop(shell, bootloader_boot_reason_prop)
104 get_prop(shell, last_boot_reason_prop)
105 get_prop(shell, system_boot_reason_prop)
107 # allow shell access to services
108 allow shell servicemanager:service_manager list;
109 # don't allow shell to access GateKeeper service
112 allow shell {
126 allow shell dumpstate:binder call;
128 # allow shell to get information from hwservicemanager
130 hwbinder_use(shell)
131 allow shell hwservicemanager:hwservice_manager list;
133 # allow shell to look through /proc/ for lsmod, ps, top, netstat.
134 r_dir_file(shell, proc_net_type)
136 allow shell {
153 allow shell sysfs_net:dir r_dir_perms;
155 r_dir_file(shell, cgroup)
156 allow shell domain:dir { search open read getattr };
157 allow shell domain:{ file lnk_file } { open read getattr };
161 allow shell { proc labeledfs }:filesystem getattr;
164 allow shell device:dir getattr;
166 # allow shell to read /proc/pid/attr/current for ps -Z
167 allow shell domain:process getattr;
170 allow shell selinuxfs:dir r_dir_perms;
171 allow shell selinuxfs:file r_file_perms;
173 # enable shell domain to read/write files/dirs for bootchart data
174 # User will creates the start and stop file via adb shell
176 allow shell bootchart_data_file:dir rw_dir_perms;
177 allow shell bootchart_data_file:file create_file_perms;
179 # Make sure strace works for the non-privileged shell user
180 allow shell self:process ptrace;
182 # allow shell to get battery info
183 allow shell sysfs:dir r_dir_perms;
184 allow shell sysfs_batteryinfo:dir r_dir_perms;
185 allow shell sysfs_batteryinfo:file r_file_perms;
188 allow shell ion_device:chr_file rw_file_perms;
194 allow shell dev_type:dir r_dir_perms;
195 allow shell dev_type:chr_file getattr;
198 allow shell proc:lnk_file getattr;
204 allow shell dev_type:blk_file getattr;
207 allow shell file_contexts_file:file r_file_perms;
208 allow shell property_contexts_file:file r_file_perms;
209 allow shell seapp_contexts_file:file r_file_perms;
210 allow shell service_contexts_file:file r_file_perms;
211 allow shell sepolicy_file:file r_file_perms;
213 # Allow shell to start up vendor shell
214 allow shell vendor_shell_exec:file rx_file_perms;
216 # Everything is labeled as rootfs in recovery mode. Allow shell to
219 allow shell rootfs:file rx_file_perms;
226 # Do not allow shell to hard link to any files.
227 # In particular, if shell hard links to app data
230 # bugs, so we want to ensure the shell user never has this
232 neverallow shell file_type:file link;
235 neverallowxperm shell domain:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls;
237 # limit shell access to sensitive char drivers to
239 neverallow shell {
245 # Limit shell to only getattr on blk devices for host side tests.
246 neverallow shell dev_type:blk_file ~getattr;
249 # vector. The shell user can inject events that look like they
253 # their stress tests, and the input command (adb shell input ...) for
255 neverallow shell input_device:chr_file no_w_file_perms;