]> git.ipfire.org Git - thirdparty/util-linux.git/commit
unshare: Add --map-users=all and --map-groups=all
authorChris Webb <chris@arachsys.com>
Thu, 23 Nov 2023 14:06:02 +0000 (14:06 +0000)
committerChris Webb <chris@arachsys.com>
Wed, 29 Nov 2023 21:22:02 +0000 (21:22 +0000)
commit22bef46c3bdf70fcc5d68ef9623a9e420955d7f7
tree6f0e7f72a8380f4045430c4fcdb1daec7aca0530
parentcf22a0c56888aa902cd353c9f05d75f9c4d71245
unshare: Add --map-users=all and --map-groups=all

Accept the special value 'all' for --map-users and --map-groups,
configuring a pass-through mapping of every user or group ID available
in the parent user namespace.

These are invaluable for scripting tests, for example when you want to
remap users leaving groups unchanged, remap groups leaving users unchanged,
or create a pass-through user namespace which maps the same users and
groups as its parent but has no capabilities in that parent namespace.

In the root user namespace, 'all' is equivalent to '0:0:4294967295', but
in child namespaces it may represent a fragmented mapping corresponding
to multiple --map-users or --map-groups options.

Signed-off-by: Chris Webb <chris@arachsys.com>
sys-utils/unshare.1.adoc
sys-utils/unshare.c