• Nick Kralevich's avatar
    runas: allow pipe communication from the shell · f1b92488
    Nick Kralevich authored
    run-as won't communicate with shell via pipes. Allow it.
    
      nnk@nnk:~$ adb shell "cat /dev/zero | run-as com.google.foo sh -c 'cat'"
      /system/bin/sh: cat: <stdout>: Broken pipe
    
      <4>[ 1485.483517] type=1400 audit(1402623577.085:25): avc: denied { read } for pid=6026 comm="run-as" path="pipe:[29823]" dev="pipefs" ino=29823 scontext=u:r:runas:s0 tcontext=u:r:shell:s0 tclass=fifo_file
    
    read is definitely needed. Not sure about write, but adding it just
    in case.
    
    (cherry picked from commit 6c9c5888)
    
    Change-Id: Ifed6314588723063531982b45a56b902dfe32ea9
    f1b92488
runas.te 876 Bytes