blob: 1ce8e64eaa725524ce890165679eb93ce324d982 [file] [log] [blame]
Stephen Smalley48759ca2013-10-29 14:42:39 -04001type runas, domain, mlstrustedsubject;
Stephen Smalley01301542013-09-27 10:38:14 -04002type runas_exec, exec_type, file_type;
Stephen Smalleye8848722012-11-13 13:00:05 -05003
4# ndk-gdb invokes adb shell run-as.
5domain_auto_trans(shell, runas_exec, runas)
Stephen Smalley48759ca2013-10-29 14:42:39 -04006allow runas adbd:process sigchld;
Nick Kralevich6c9c5882014-06-12 18:54:10 -07007allow runas shell:fd use;
8allow runas shell:fifo_file { read write };
Stephen Smalley48759ca2013-10-29 14:42:39 -04009allow 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
Stephen Smalley356f4be2014-05-23 11:26:19 -040025allow runas self:process setcurrent;
Stephen Smalley48759ca2013-10-29 14:42:39 -040026allow runas non_system_app_set:process dyntransition; # setcon