]> 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)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 9 Feb 2021 23:40:57 +0000 (23:40 +0000)
commit8bf68f78d8a3c470e5a326989aa3e78385e1e79b
tree680f3a66c996d15c2aff77078aa058f9653ed326
parentdb59b66c70fcf290196eeada26025567c9087f66
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.

(cherry picked from commit 93de9f687d1640fff963f26b7db474eef3746532)
sys-utils/setpriv.c