aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2020-09-02 16:12:47 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-09-02 16:12:47 +0000
commitc4824f9d8be75e72f9a1967bf8ab0f027c7b492e (patch)
treec9366f9010b021f20fcd61ed51f6605d68af23f6
parent0b2dca4529900b8dc5d4068ed4bffee24012ac01 (diff)
parentc9b0799ea728d00eea97d7c721b400663f15c7b2 (diff)
downloadplatform_external_minijail-c4824f9d8be75e72f9a1967bf8ab0f027c7b492e.tar.gz
platform_external_minijail-c4824f9d8be75e72f9a1967bf8ab0f027c7b492e.tar.bz2
platform_external_minijail-c4824f9d8be75e72f9a1967bf8ab0f027c7b492e.zip
minijail0: add hint to -b for optional destination am: c9b0799ea7
Original change: https://android-review.googlesource.com/c/platform/external/minijail/+/1416571 Change-Id: I70433c432b1c14d8d2cbee927e715c49df986563
-rw-r--r--minijail0.14
-rw-r--r--minijail0_cli.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/minijail0.1 b/minijail0.1
index 820d3ca0..9a00e73f 100644
--- a/minijail0.1
+++ b/minijail0.1
@@ -12,12 +12,14 @@ Runs PROGRAM inside a sandbox.
Run using the alternate syscall table named \fItable\fR. Only available on kernels
and architectures that support the \fBPR_ALT_SYSCALL\fR option of \fBprctl\fR(2).
.TP
-\fB-b <src>[,<dest>[,<writeable>]]
+\fB-b <src>[,[dest][,<writeable>]]
Bind-mount \fIsrc\fR into the chroot directory at \fIdest\fR, optionally writeable.
The \fIsrc\fR path must be an absolute path.
+
If \fIdest\fR is not specified, it will default to \fIsrc\fR.
If the destination does not exist, it will be created as a file or directory
based on the \fIsrc\fR type (including missing parent directories).
+
To create a writable bind-mount set \fIwritable\fR to \fB1\fR. If not specified
it will default to \fB0\fR (read-only).
.TP
diff --git a/minijail0_cli.c b/minijail0_cli.c
index 22da7fd7..940bd3c5 100644
--- a/minijail0_cli.c
+++ b/minijail0_cli.c
@@ -527,7 +527,7 @@ static void usage(const char *progn)
/* clang-format off */
printf("Usage: %s [-dGhHiIKlLnNprRstUvyYz]\n"
" [-a <table>]\n"
- " [-b <src>[,<dest>[,<writeable>]]] [-k <src>,<dest>,<type>[,<flags>[,<data>]]]\n"
+ " [-b <src>[,[dest][,<writeable>]]] [-k <src>,<dest>,<type>[,<flags>[,<data>]]]\n"
" [-c <caps>] [-C <dir>] [-P <dir>] [-e[file]] [-f <file>] [-g <group>]\n"
" [-m[<uid> <loweruid> <count>]*] [-M[<gid> <lowergid> <count>]*] [--profile <name>]\n"
" [-R <type,cur,max>] [-S <file>] [-t[size]] [-T <type>] [-u <user>] [-V <file>]\n"