Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in --pidns help? #531

Closed
hadess opened this issue Oct 6, 2022 · 2 comments
Closed

Typo in --pidns help? #531

hadess opened this issue Oct 6, 2022 · 2 comments

Comments

@hadess
Copy link

hadess commented Oct 6, 2022

bubblewrap.c:           "    --pidns FD                   Use this user namespace (as parent namespace if using --unshare-pid)\n"

But --unshare-pid says:

bubblewrap.c:           "    --unshare-pid                Create new pid namespace\n"

The help should probably read Use this pid namespace.

@smcv
Copy link
Collaborator

smcv commented Oct 27, 2022

At first I thought your issue report was suggesting that the (as parent namespace...) suffix is untrue and should be deleted. But actually I think the issue you're reporting is that it says Use this user namespace, where it should say Use this pid namespace?

If this had been a one-word PR (possibly created via Github's web UI without actually compiling anything), it would have been obvious what you meant, and I'd likely have merged it by now.

For the record, the suffix in parentheses is also true, with the four possible modes being:

  1. bwrap: stay in the current pid namespace
  2. bwrap --unshare-pid: unshare the pid namespace, creating a new pid namespace which is a child of the current one (Flatpak normally uses this)
  3. bwrap --pidns=5: join the pid namespace provided via fd 5 (flatpak-spawn --share-pids uses this)
  4. bwrap --pidns=5 --unshare-pid: first join the pid namespace provided via fd 5, and then unshare the pid namespace, creating a new pid namespace which is a child of the one that was provided (flatpak-spawn --expose-pids uses this)

@smcv smcv closed this as completed in 7391152 Oct 27, 2022
@hadess
Copy link
Author

hadess commented Oct 27, 2022

I'll bear that in mind for next time. Thanks

zeyusteel added a commit to zeyusteel/bubblewrap-annotated that referenced this issue Nov 8, 2022
bubblewrap 0.7.0

New features:

* `--size` option controls the size of a subsequent `--tmpfs` (containers#509)
* Better error messages if a mount operation fails (containers#472)
* Better error message if creating the new user namespace fails with
  `ENOSPC` (containers#487)
* When building as a Meson subproject, a `RUNPATH` can be set on the
  executable to make it easier to bundle its `libcap` dependency

Bug fixes:

* When building with Autotools, ensure initial setup for `pkg-config`
  is not disabled by `--with-bash-completion-dir=PATH` (containers#316, containers#342, containers#441)
* Fix test failures when running as uid 0 but with limited capabilities
  (containers#510)
* Use POSIX `command -v` in preference to non-standard `which` (containers#527)
* Fix a copy/paste error in `--help` (containers#531)

Git-EVTag-v0-SHA512: f4f6e2a92493461c2c39bacc1c3003167162113c88d2142f2041dcb830f3bd3a7df541aad361d1e6ce99576d66bd7eac1065340406e294cd4769b9c4c81c2a2c
brandsimon pushed a commit to brandsimon/bubblewrap that referenced this issue Mar 19, 2023
--pidns acts on a pid namespace, not a user namespace.

Resolves: containers#531
Thanks: hadess
Signed-off-by: Simon McVittie <smcv@collabora.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants