]> git.ipfire.org Git - thirdparty/util-linux.git/commit
setpriv: proxy function to update capabilities
authorPatrick Steinhardt <ps@pks.im>
Sat, 24 Jun 2017 14:04:32 +0000 (16:04 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 27 Jun 2017 12:59:19 +0000 (14:59 +0200)
commit8a5af72c22fa3e06f8d449ccec3da24d08624bbf
tree609bfd6e68e1836948462ba87cb21a37ecee6160
parent30129e2f5824b6c8f77c792c31298912678cd66f
setpriv: proxy function to update capabilities

libcap-ng provides a function to update capabilities with
`capng_update`. As libcap-ng has not yet been updated to enable
modification of ambient capabilities, we cannot use it to update this
set, though. In order to allow easily extending the logic to also handle
ambient capability sets, we create a new function `cap_update`. Right
now, it simply calls out to `capng_update` for all supported capability
types.

Reviewed-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
sys-utils/setpriv.c