UploadCrashes: run in the main mount namespace

When debugd launches, it places itself into a new mount namespace at
boot time.  That means that any tools it invokes won't have access to
all the user mounts.  Normally this is a good thing, but this makes
sending crashes a lot less useful to the end user as they often want
to trigger user crashes in addition to system crashes.

For now, wrap the crash_sender call with nsenter so that we run in
the same mount namespace as init (which should be the same namespace
that user mounts are made in).  We probably want this logic to get
merged into minijail in some way.

BUG=chromium:376639
TEST=generated a chrome crash; invoked new crash_sender via debugd; saw user crash get uploaded
TEST=`cbuildbot x86-generic-full` works

Change-Id: I9a3e2673ed285daab16dcc301b069f7fccd8769a
Previous-Reviewed-on: https://chromium-review.googlesource.com/201374
(cherry picked from commit f8908cf13ec151af8e4c9405f3c0d9d6881f87d1)
Reviewed-on: https://chromium-review.googlesource.com/201377
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
1 file changed
tree: 68e7b4c9ae1a565e709b24435f68fced862f317f
  1. doc/
  2. share/
  3. src/
  4. .gitignore
  5. debugd.gyp
  6. OWNERS
  7. README