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