aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Lucangeli Obes <jorgelo@google.com>2016-01-28 23:55:41 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-01-28 23:55:41 +0000
commitd569b1e6c811ddd39fcb46a74f386ae63af650de (patch)
tree48df689cce7391e75b042ff373ef18def4588696
parent7c6899c198c3a3c68268243a2f46050d13bf622f (diff)
parent6c755d2e50ac66fff04148386c29fb851122422f (diff)
downloadminijail-d569b1e6c811ddd39fcb46a74f386ae63af650de.tar.gz
Merge "Don't die() on bind mounts."
-rw-r--r--Android.mk2
-rw-r--r--libminijail.c5
2 files changed, 2 insertions, 5 deletions
diff --git a/Android.mk b/Android.mk
index 186e569..5cd0499 100644
--- a/Android.mk
+++ b/Android.mk
@@ -45,7 +45,7 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES
generated_sources_dir := $(local-generated-sources-dir)
my_gen := $(generated_sources_dir)/$(TARGET_ARCH)/libsyscalls.c
-# We need the quotes so the shell script treat them as one argument.
+# We need the quotes so the shell script treats the following as one argument.
my_cc := "$(lastword $(CLANG)) \
$(addprefix -isystem ,$(TARGET_C_INCLUDES)) \
$(CLANG_TARGET_GLOBAL_CFLAGS)"
diff --git a/libminijail.c b/libminijail.c
index 0806d17..2164186 100644
--- a/libminijail.c
+++ b/libminijail.c
@@ -569,7 +569,7 @@ int API minijail_mount(struct minijail *j, const char *src, const char *dest,
goto error;
m->flags = flags;
- info("mount %s -> %s type %s", src, dest, type);
+ info("mount %s -> %s type '%s'", src, dest, type);
/*
* Force vfs namespacing so the mounts don't leak out into the
@@ -1344,9 +1344,6 @@ void API minijail_enter(const struct minijail *j)
pdie("unshare(net)");
}
- if (j->mounts_head && !(j->flags.chroot || j->flags.pivot_root))
- die("can't bind-mount without chroot or pivot_root");
-
if (j->flags.chroot && enter_chroot(j))
pdie("chroot");