diff --git a/init_shell.te b/init_shell.te new file mode 100644 index 0000000000000000000000000000000000000000..a2f6a3c5c1ef687b44726a92c2b797a2df0c6a3b --- /dev/null +++ b/init_shell.te @@ -0,0 +1,14 @@ +# Restricted domain for shell processes spawned by init +type init_shell, domain, mlstrustedsubject; +domain_auto_trans(init, shell_exec, init_shell) +allow init_shell rootfs:dir r_dir_perms; +allow init_shell devpts:chr_file rw_file_perms; +allow init_shell tty_device:chr_file rw_file_perms; +allow init_shell console_device:chr_file rw_file_perms; +allow init_shell input_device:chr_file rw_file_perms; +allow init_shell system_file:file x_file_perms; +allow init_shell shell_exec:file rx_file_perms; +allow init_shell zygote_exec:file rx_file_perms; + +# setprop toolbox command +unix_socket_connect(init_shell, property, init) diff --git a/shell.te b/shell.te index acf123bba56ffb12a17c3f8e91a3d5cf8ac2a5e4..78702077c2d102d1db7629663dcae39362499ae1 100644 --- a/shell.te +++ b/shell.te @@ -1,6 +1,6 @@ +# Domain for shell processes spawned by ADB type shell, domain, mlstrustedsubject; type shell_exec, file_type; -domain_auto_trans(init, shell_exec, shell) allow shell rootfs:dir r_dir_perms; allow shell devpts:chr_file rw_file_perms; allow shell tty_device:chr_file rw_file_perms;