]> git.ipfire.org Git - thirdparty/util-linux.git/commit
unshare: Move implementation of --keep-caps option to library function
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 29 Mar 2023 02:36:15 +0000 (13:36 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 29 Mar 2023 02:36:15 +0000 (13:36 +1100)
commitacb72212eb41ca862b8bc29b0106a46a83297fcb
treec19d2fe37584de4f15b2b7717880c3363d5d0c06
parent53d2257dafbd486a88f8de2c3390bcd1509cb0c1
unshare: Move implementation of --keep-caps option to library function

unshare.c open codes some logic to copy the permitted capability set to the
ambient set in order to implement the --keep-caps option.  Move this logic
to lib/caputils.c so that we can reuse it in nsenter.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
include/caputils.h
lib/caputils.c
sys-utils/unshare.c