]> git.ipfire.org Git - thirdparty/util-linux.git/commit
setpriv: allow using [-+]all for capabilities.
authorÉrico Rolim <erico.erc@gmail.com>
Wed, 18 Nov 2020 14:35:26 +0000 (11:35 -0300)
committerÉrico Rolim <erico.erc@gmail.com>
Fri, 20 Nov 2020 15:45:39 +0000 (12:45 -0300)
commit93de9f687d1640fff963f26b7db474eef3746532
treef352b541caf8a3102b28a9dca618cde2b7c6ddd4
parent57b74b0dcbaf492aa854aa323cf91122739696b2
setpriv: allow using [-+]all for capabilities.

The initial change to lib/caputils that allowed this was commit
5d95818757941bc609e5aeec5e2218f7d35a6e19, which made it possible to
trust the value returned by cap_last_cap().

The error message was also somewhat misleading, since cap_last_cap()
being smaller than CAP_LAST_CAP happens when setpriv itself is built
with kernel headers older than the currently running kernel, not due to
libcap-ng.
sys-utils/setpriv.c