platform_system_sepolicy/procrank.te
Jeff Vander Stoep af16c40ce6 allow procrank to write to bug report
avc: denied { write } for pid=14742 comm="procrank" path="/data/data/com.android.shell/files/bugreports/bugreport-2015-07-02-22-17-43.txt.tmp" dev="dm-2" ino=44479 scontext=u:r:procrank:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0

Bug: 22400298
Change-Id: Ibf5dcf9f7edf416e977577afc32bbbef62e50974
2015-07-10 11:13:16 -07:00

17 lines
650 B
Text

# File types must be defined for file_contexts.
type procrank_exec, exec_type, file_type;
userdebug_or_eng(`
type procrank, domain, mlstrustedsubject;
domain_auto_trans(shell, procrank_exec, procrank)
domain_auto_trans(dumpstate, procrank_exec, procrank)
allow procrank self:capability sys_ptrace;
allow procrank devpts:chr_file { read write getattr ioctl };
allow procrank dumpstate:unix_stream_socket { read write getattr };
r_dir_file(procrank, domain)
allow procrank { shell dumpstate }:fd use;
allow procrank adbd:process sigchld;
# allow procrank write to bugreport.
allow procrank shell_data_file:file w_file_perms;
')