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 tzdatacheck_exec:file rx_file_perms;
50 allow shell shell_exec:file rx_file_perms;
51 allow shell zygote_exec:file rx_file_perms;
53 r_dir_file(shell, apk_data_file)
56 set_prop(shell, shell_prop)
57 set_prop(shell, ctl_bugreport_prop)
58 set_prop(shell, ctl_dumpstate_prop)
59 set_prop(shell, dumpstate_prop)
60 set_prop(shell, debug_prop)
61 set_prop(shell, powerctl_prop)
62 set_prop(shell, log_tag_prop)
63 set_prop(shell, wifi_log_prop)
65 userdebug_or_eng(`set_prop(shell, log_prop)')
67 userdebug_or_eng(`set_prop(shell, logpersistd_logging_prop)')
71 allow shell boottrace_data_file:dir rw_dir_perms;
72 allow shell boottrace_data_file:file create_file_perms;
73 set_prop(shell, persist_debug_prop)
77 get_prop(shell, serialno_prop)
80 get_prop(shell, device_logging_prop)
82 # allow shell access to services
83 allow shell servicemanager:service_manager list;
84 # don't allow shell to access GateKeeper service
87 allow shell { service_manager_type -gatekeeper_service -incident_service -installd_service -netd_se…
88 allow shell dumpstate:binder call;
90 # allow shell to get information from hwservicemanager
92 hwbinder_use(shell)
93 allow shell hwservicemanager:hwservice_manager list;
95 # allow shell to look through /proc/ for ps, top, netstat
96 r_dir_file(shell, proc)
97 r_dir_file(shell, proc_net)
98 allow shell proc_interrupts:file r_file_perms;
99 allow shell proc_meminfo:file r_file_perms;
100 allow shell proc_stat:file r_file_perms;
101 allow shell proc_timer:file r_file_perms;
102 allow shell proc_zoneinfo:file r_file_perms;
103 r_dir_file(shell, cgroup)
104 allow shell domain:dir { search open read getattr };
105 allow shell domain:{ file lnk_file } { open read getattr };
109 allow shell { proc labeledfs }:filesystem getattr;
112 allow shell device:dir getattr;
114 # allow shell to read /proc/pid/attr/current for ps -Z
115 allow shell domain:process getattr;
118 allow shell selinuxfs:dir r_dir_perms;
119 allow shell selinuxfs:file r_file_perms;
121 # enable shell domain to read/write files/dirs for bootchart data
122 # User will creates the start and stop file via adb shell
124 allow shell bootchart_data_file:dir rw_dir_perms;
125 allow shell bootchart_data_file:file create_file_perms;
127 # Make sure strace works for the non-privileged shell user
128 allow shell self:process ptrace;
130 # allow shell to get battery info
131 allow shell sysfs_batteryinfo:file r_file_perms;
132 allow shell sysfs:dir r_dir_perms;
135 allow shell ion_device:chr_file rw_file_perms;
141 allow shell dev_type:dir r_dir_perms;
142 allow shell dev_type:chr_file getattr;
145 allow shell proc:lnk_file getattr;
151 allow shell dev_type:blk_file getattr;
154 allow shell file_contexts_file:file r_file_perms;
155 allow shell property_contexts_file:file r_file_perms;
156 allow shell seapp_contexts_file:file r_file_perms;
157 allow shell service_contexts_file:file r_file_perms;
158 allow shell sepolicy_file:file r_file_perms;
164 # Do not allow shell to hard link to any files.
165 # In particular, if shell hard links to app data
168 # bugs, so we want to ensure the shell user never has this
170 neverallow shell file_type:file link;
173 neverallowxperm shell domain:{ rawip_socket tcp_socket udp_socket } ioctl priv_sock_ioctls;
175 # limit shell access to sensitive char drivers to
177 neverallow shell {
184 # Limit shell to only getattr on blk devices for host side tests.
185 neverallow shell dev_type:blk_file ~getattr;