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 profman_dump_data_file:dir { search getattr write remove_name };
30 allow shell profman_dump_data_file:file { getattr unlink };
34 allow shell nativetest_data_file:dir r_dir_perms;
35 allow shell nativetest_data_file:file rx_file_perms;
39 unix_socket_connect(shell, dumpstate, dumpstate)
41 allow shell devpts:chr_file rw_file_perms;
42 allow shell tty_device:chr_file rw_file_perms;
43 allow shell console_device:chr_file rw_file_perms;
44 allow shell input_device:dir r_dir_perms;
45 allow shell input_device:chr_file rw_file_perms;
46 r_dir_file(shell, system_file)
47 allow shell system_file:file x_file_perms;
48 allow shell toolbox_exec:file rx_file_perms;
49 allow shell shell_exec:file rx_file_perms;
50 allow shell zygote_exec:file rx_file_perms;
52 r_dir_file(shell, apk_data_file)
55 set_prop(shell, shell_prop)
56 set_prop(shell, ctl_bugreport_prop)
57 set_prop(shell, ctl_dumpstate_prop)
58 set_prop(shell, dumpstate_prop)
59 set_prop(shell, debug_prop)
60 set_prop(shell, powerctl_prop)
61 set_prop(shell, log_tag_prop)
62 set_prop(shell, wifi_log_prop)
64 userdebug_or_eng(`set_prop(shell, log_prop)')
66 userdebug_or_eng(`set_prop(shell, logpersistd_logging_prop)')
70 allow shell boottrace_data_file:dir rw_dir_perms;
71 allow shell boottrace_data_file:file create_file_perms;
72 set_prop(shell, persist_debug_prop)
76 get_prop(shell, serialno_prop)
79 get_prop(shell, device_logging_prop)
81 # allow shell access to services
82 allow shell servicemanager:service_manager list;
83 # don't allow shell to access GateKeeper service
86 allow shell { service_manager_type -gatekeeper_service -incident_service -installd_service -netd_se…
87 allow shell dumpstate:binder call;
89 # allow shell to get information from hwservicemanager
91 hwbinder_use(shell)
92 allow shell hwservicemanager:hwservice_manager list;
94 # allow shell to look through /proc/ for ps, top, netstat
95 r_dir_file(shell, proc)
96 r_dir_file(shell, proc_net)
97 allow shell proc_interrupts:file r_file_perms;
98 allow shell proc_meminfo:file r_file_perms;
99 allow shell proc_stat:file r_file_perms;
100 allow shell proc_timer:file r_file_perms;
101 allow shell proc_zoneinfo:file r_file_perms;
102 r_dir_file(shell, cgroup)
103 allow shell domain:dir { search open read getattr };
104 allow shell domain:{ file lnk_file } { open read getattr };
108 allow shell { proc labeledfs }:filesystem getattr;
111 allow shell device:dir getattr;
113 # allow shell to read /proc/pid/attr/current for ps -Z
114 allow shell domain:process getattr;
117 allow shell selinuxfs:dir r_dir_perms;
118 allow shell selinuxfs:file r_file_perms;
120 # enable shell domain to read/write files/dirs for bootchart data
121 # User will creates the start and stop file via adb shell
123 allow shell bootchart_data_file:dir rw_dir_perms;
124 allow shell bootchart_data_file:file create_file_perms;
126 # Make sure strace works for the non-privileged shell user
127 allow shell self:process ptrace;
129 # allow shell to get battery info
130 allow shell sysfs_batteryinfo:file r_file_perms;
131 allow shell sysfs:dir r_dir_perms;
134 allow shell ion_device:chr_file rw_file_perms;
140 allow shell dev_type:dir r_dir_perms;
141 allow shell dev_type:chr_file getattr;
144 allow shell proc:lnk_file getattr;
150 allow shell dev_type:blk_file getattr;
153 allow shell file_contexts_file:file r_file_perms;
154 allow shell property_contexts_file:file r_file_perms;
155 allow shell seapp_contexts_file:file r_file_perms;
156 allow shell service_contexts_file:file r_file_perms;
157 allow shell sepolicy_file:file r_file_perms;
163 # Do not allow shell to hard link to any files.
164 # In particular, if shell hard links to app data
167 # bugs, so we want to ensure the shell user never has this
169 neverallow shell file_type:file link;
172 neverallowxperm shell domain:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls;
174 # limit shell access to sensitive char drivers to
176 neverallow shell {
183 # Limit shell to only getattr on blk devices for host side tests.
184 neverallow shell dev_type:blk_file ~getattr;