runas.te revision f1b92488f561d4fd27c6d4360f4d0ab3f3127203
1type runas, domain, mlstrustedsubject; 2type runas_exec, exec_type, file_type; 3 4# ndk-gdb invokes adb shell run-as. 5domain_auto_trans(shell, runas_exec, runas) 6allow runas adbd:process sigchld; 7allow runas shell:fd use; 8allow runas shell:fifo_file { read write }; 9allow runas devpts:chr_file { read write ioctl }; 10 11# run-as reads package information. 12allow runas system_data_file:file r_file_perms; 13 14# run-as checks and changes to the app data dir. 15dontaudit runas self:capability dac_override; 16allow runas app_data_file:dir { getattr search }; 17 18# run-as switches to the app UID/GID. 19allow runas self:capability { setuid setgid }; 20 21# run-as switches to the app security context. 22# read /seapp_contexts and /data/security/seapp_contexts 23security_access_policy(runas) 24selinux_check_context(runas) # validate context 25allow runas non_system_app_set:process dyntransition; # setcon 26