1
0
mirror of https://github.com/projectatomic/bubblewrap.git synced 2026-02-06 18:46:08 +01:00
Commit Graph

28 Commits

Author SHA1 Message Date
Giuseppe Scrivano
6724b418e9 bubblewrap: add option --userns-block-fd
It allows to configure the user namespace from outside.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #101
Approved by: alexlarsson
2017-06-29 23:02:31 +00:00
Giuseppe Scrivano
71660f4101 bubblewrap: add --cap-add and --cap-drop
When using namespaces, permit to leave some capabilities in the
sandbox.  This can be helpful to run a system instance of systemd.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #101
Approved by: alexlarsson
2017-06-29 23:02:31 +00:00
Giuseppe Scrivano
6e778109aa bubblewrap: add --as-pid-1
It allows to run a process with PID=1 in the new pid namespace.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2017-06-13 22:13:51 +02:00
Marek Jarycki
b6370de0fc Add --die-with-parent
In scenarios such as running bwrap in test frameworks (`bwrap make check`),
one wants all of the processes to go away if the parent process
dies, or if the bwrap process is directly killed.

This ensures that in all cases (both with `--unshare-pid` and without), we use
`prctl(PR_SET_PDEATHSIG)` on both our outer and inner init procesesses if
`--die-with-parent` is specified.

Tests-by: Colin Walters <walters@verbum.org>

Closes: #165
Approved by: emdej
2017-02-27 21:15:11 +00:00
valoq
6388977429 Added --unshare-all to manpage
Updated the manpage to include the new --unshare-all option
Closes: #161
Approved by: cgwalters
2017-01-21 20:13:34 +00:00
Alexander Larsson
06a7f31fe4 Make the call to setsid() optional, with --new-session
This means we stay compatible with apps using the old bwrap, yet
still makes it easy to avoid CVE-2017-5226 in apps using bwrap.

Also, recommend that applications not using --new-session should
use a seccomp filter for the TIOCSTI ioctl to avoid the input
injection issue.

Closes: #154
Approved by: cgwalters
2017-01-17 13:43:49 +00:00
Colin Walters
9d368eece4 man: Correct namespace user -> mount
Closes: #141

Closes: #144
Approved by: valoq
2017-01-10 15:51:33 +00:00
Alexander Larsson
da38d86508 Add --ro-bind-data, which is the same as --bind-data but readonly
I need this for flatpak to create a sandbox-specific file that
the app can't modify.

Closes: #98
Approved by: alexlarsson
2016-09-07 09:31:24 +00:00
Chad Versace
d5fdb96ee0 manpage: Document option --unshare-user-try
Closes: #96
Approved by: rhatdan
2016-09-02 12:54:37 +00:00
Chad Versace
500e86860a Fix --unshare-user in manpage
The manpage lists non-existent option --share-user. It should be
--unshare-user.

Closes: #95
Approved by: rhatdan
2016-09-02 12:52:06 +00:00
Yawning Angel
75f86d30ef Add --hostname HOSTNAME.
This makes `--unshare-uts` actually useful by allowing the user to
specify a custom hostname for the newly created UTS namespace.

Implements #93.

Closes: #94
Approved by: alexlarsson
2016-09-02 09:33:58 +00:00
Alexander Larsson
3ebe54af1b Merge pull request #92 from giuseppe/bwrap-oci-hooks
Add `--block-fd` and `--info-fd` so to be able to manage OCI hooks.
2016-08-26 14:56:35 +02:00
Giuseppe Scrivano
beb8aa1a74 Implement info-fd
Add an interface for retrieving information about the child process.

For now the only information exported is the child pid, it is needed to
manage prestart OCI hooks, as the container pid must be provided to the
hook process.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2016-08-26 14:51:22 +02:00
Giuseppe Scrivano
f206c6d072 Implement block-fd
it is useful to manage OCI prestart hooks, as the container process is
blocked on block_fd until the hooks are processed.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2016-08-26 14:50:28 +02:00
Giuseppe Scrivano
e4188b1d24 Add --remount-ro DEST
This allows to remount a mount point as read only.

It will allow us, by remounting / after other mount points are created,
to handle a readonly rootfs as specified in the OCI specs:

https://github.com/opencontainers/runtime-spec/blob/master/config.md#root-configuration

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2016-08-12 12:26:46 +02:00
Mrunal Patel
f41af1ff04 Add support for --try-unshare-cgroup flag
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>

This flag will unshare cgroups only if supported else will skip it.

Closes: #62
Approved by: alexlarsson
2016-05-12 20:20:35 +00:00
Mrunal Patel
9d3c07c0c7 Add support for --unshare-cgroup
This requires linux kernel version 4.6 or higher.
We check for the presence of /proc/self/ns/cgroup
to determine if it is supported or not.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>

Closes: #62
Approved by: alexlarsson
2016-05-12 20:20:35 +00:00
Mrunal Patel
f525e670b8 Update documentation for --mqueue
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>

Closes: #59
Approved by: alexlarsson
2016-05-07 06:37:50 +00:00
Alexander Larsson
8a53e3a664 Add --tmpfs argument
This is very useful if you want to cover some area of the filesystem,
or if you want to make some part of a read-only tree writable.

Closes: #42
Approved by: cgwalters
2016-05-06 11:05:11 +00:00
Dan Walsh
506fb1b162 Add SELinux Support
Signed-off-by: Dan Walsh <dwalsh@redhat.com>

Pull request: #25
Approved by: alexlarsson
2016-03-22 09:33:46 +00:00
Alexander Larsson
81d3aa11f5 Clarify filesystem ops in manpage 2016-03-08 17:11:45 +01:00
Alexander Larsson
4b87d00edf Merge pull request #18 from matthiasclasen/man
Some more documentation work
2016-03-08 17:08:33 +01:00
Matthias Clasen
2ecee82f19 docs: Some more intro
Explain that bwrap is not really an end-user tool.
2016-03-08 10:28:40 -05:00
Matthias Clasen
502e388616 docs: Add an Environment section
Only HOME appears here, but still.
2016-03-08 10:24:12 -05:00
Matthias Clasen
eaa7f3f8dc docs: Explain --seccomp data format
Well, at least point to the libseccomp api that generates it.
2016-03-08 10:17:48 -05:00
Matthias Clasen
122f3ffa4c docs: Add details about options
Document the effect of repeated options.
2016-03-08 10:17:10 -05:00
Alexander Larsson
08b93a15a2 fix up manpage 2016-03-08 15:30:55 +01:00
Matthias Clasen
cb8262c651 Add a man page for bwrap
This does use docbook stylesheets and xsltproc. If we want to
avoid that build dependency, we can just generate it once and
be done.
2016-03-07 17:28:36 -05:00