minijail0: move ld_preload communication to a pipe

Moves minijail0 communication over to using a file descriptor instead
of packing it in an environment variable. The primary reasoning is to
allow seccomp filter policies to be passed to a child process.

However, this will make it easier for minijail behavior to stay
consistent across minijail_run and minijail_enter if serialization can
be made more generic.  For instance, -g does not properly traverse a
preload instead relying on inheritance which is inconsistent depending
on pidns usage.

BUG=chromium-os:19459
TEST=tested -[pvrcu] with /bin/cat /proc/self/status

Change-Id: Id1845b86517ce0a6a9d6bcd85f700ea459d7c8f4
Reviewed-on: http://gerrit.chromium.org/gerrit/7890
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Tested-by: Will Drewry <wad@chromium.org>
3 files changed