]> git.ipfire.org Git - thirdparty/systemd.git/commit
capability-util: introduce capability_get() and use it in have_effective_cap()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Oct 2025 14:07:13 +0000 (23:07 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 23 Oct 2025 16:52:59 +0000 (01:52 +0900)
commite1c134ba9ce2e4ca9ffa70fc94a24898b863cc8a
tree1bf55298b932b21db51db301b14cf762622077fd
parente804256b80d1fc01b0fe85efa05731b117607ae3
capability-util: introduce capability_get() and use it in have_effective_cap()

capability_get() is a wrapper of capget() syscall and converts its
result to CapabilityQuintet.

This also introduce have_inheritable_cap(), which is similar to
have_effective_cap(). It is currently unused, but will be used later.
src/basic/capability-util.c
src/basic/capability-util.h