crash_reporter: Support crashes from arbitrary users

In order to read the /proc/<pid> files from non-root users without
using CAP_SYS_PTRACE and CAP_DAC_OVERRIDE, use setresuid(..) and
setresgid(..) to switch to the process's user to copy off necessary
files for generating the breakpad minidump.

Bug: 24678424
Change-Id: I4a43583033587441394483ce678c40c4161808b9
2 files changed