• Home
  • Raw
  • Download

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 traced_perf via the persist.traced_perf.enable
83 set_prop(shell, traced_perf_enabled_prop)
84 # Allow shell to start/stop gsid via ctl.start|stop|restart gsid.
85 set_prop(shell, ctl_gsid_prop)
86 # Allow shell to enable Dynamic System Update
87 set_prop(shell, dynamic_system_prop)
88 # Allow shell to mock an OTA using persist.pm.mock-upgrade
89 set_prop(shell, mock_ota_prop)
93 allow shell boottrace_data_file:dir rw_dir_perms;
94 allow shell boottrace_data_file:file create_file_perms;
95 set_prop(shell, persist_debug_prop)
99 get_prop(shell, serialno_prop)
101 # Allow shell to read the vendor security patch level for CTS
102 get_prop(shell, vendor_security_patch_level_prop)
105 get_prop(shell, device_logging_prop)
108 get_prop(shell, bootloader_boot_reason_prop)
109 get_prop(shell, last_boot_reason_prop)
110 get_prop(shell, system_boot_reason_prop)
113 get_prop(shell, init_perf_lsm_hooks_prop)
115 # allow shell access to services
116 allow shell servicemanager:service_manager list;
117 # don't allow shell to access GateKeeper service
120 allow shell {
135 allow shell dumpstate:binder call;
137 # allow shell to get information from hwservicemanager
139 hwbinder_use(shell)
140 allow shell hwservicemanager:hwservice_manager list;
142 # allow shell to look through /proc/ for lsmod, ps, top, netstat, vmstat.
143 r_dir_file(shell, proc_net_type)
145 allow shell {
163 allow shell sysfs_net:dir r_dir_perms;
165 r_dir_file(shell, cgroup)
166 allow shell domain:dir { search open read getattr };
167 allow shell domain:{ file lnk_file } { open read getattr };
171 allow shell { proc labeledfs }:filesystem getattr;
174 allow shell device:dir getattr;
176 # allow shell to read /proc/pid/attr/current for ps -Z
177 allow shell domain:process getattr;
180 allow shell selinuxfs:dir r_dir_perms;
181 allow shell selinuxfs:file r_file_perms;
183 # enable shell domain to read/write files/dirs for bootchart data
184 # User will creates the start and stop file via adb shell
186 allow shell bootchart_data_file:dir rw_dir_perms;
187 allow shell bootchart_data_file:file create_file_perms;
189 # Make sure strace works for the non-privileged shell user
190 allow shell self:process ptrace;
192 # allow shell to get battery info
193 allow shell sysfs:dir r_dir_perms;
194 allow shell sysfs_batteryinfo:dir r_dir_perms;
195 allow shell sysfs_batteryinfo:file r_file_perms;
198 allow shell ion_device:chr_file rw_file_perms;
204 allow shell dev_type:dir r_dir_perms;
205 allow shell dev_type:chr_file getattr;
208 allow shell proc:lnk_file getattr;
214 allow shell dev_type:blk_file getattr;
217 allow shell file_contexts_file:file r_file_perms;
218 allow shell property_contexts_file:file r_file_perms;
219 allow shell seapp_contexts_file:file r_file_perms;
220 allow shell service_contexts_file:file r_file_perms;
221 allow shell sepolicy_file:file r_file_perms;
223 # Allow shell to start up vendor shell
224 allow shell vendor_shell_exec:file rx_file_perms;
226 # Everything is labeled as rootfs in recovery mode. Allow shell to
229 allow shell rootfs:file rx_file_perms;
236 # Do not allow shell to hard link to any files.
237 # In particular, if shell hard links to app data
240 # bugs, so we want to ensure the shell user never has this
242 neverallow shell file_type:file link;
245 neverallowxperm shell domain:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls;
247 # limit shell access to sensitive char drivers to
249 neverallow shell {
255 # Limit shell to only getattr on blk devices for host side tests.
256 neverallow shell dev_type:blk_file ~getattr;
259 # vector. The shell user can inject events that look like they
263 # their stress tests, and the input command (adb shell input ...) for
265 neverallow shell input_device:chr_file no_w_file_perms;