minijail: Allow static binaries in a bind mount to run

A previous commit placed a restriction on running static binaries and
using bind mounts.  Remove that restriction by checking if the binary
path is in a bind mount and rebasing the path on to the bind mount
source path so that the executable can be accessed from outside the
chroot.  This is needed so bind mounts can be specified when running a
statically linked init program for Android.

BUG=b/25192613
TEST=security_Minijail0, run a static init with bind mounts.

Change-Id: I801909df67c1bf18d48efcfd54c11aafe4c75e54
Signed-off-by: Dylan Reid <dgreid@google.com>
2 files changed