]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: capabilities: export capget and __user_cap_header_struct
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Fri, 31 May 2024 16:01:07 +0000 (18:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 26 Jun 2024 05:38:21 +0000 (07:38 +0200)
commitfcf1a0bcf539f71b2f7bea1e6070cbddf61531d1
tree84f005d3458835450faa34075440869c105a0861
parenta14c7d194ad27f9f84c9d42aab953a162999252a
MINOR: capabilities: export capget and __user_cap_header_struct

To be able to show process capabilities before applying its configuration and
also at runtime in 'show dev' command output, we need to export the wrapper
around capget() syscall. It also seems more handy to place
__user_cap_header_struct in .data section and declare it as globally
accessible, as we always fill it with the same values. This avoids allocate
and fill these 8 bytes each time on the stack frame, when capget() or capset()
wrappers are called.
include/haproxy/linuxcap.h
src/linuxcap.c