common.c: Use _LINUX_CAPABILITY_VERSION_3 in cap_header
authorThomas Deutschmann <whissi@gentoo.org>
Tue, 11 Oct 2016 14:16:23 +0000 (16:16 +0200)
committerFlorian Forster <octo@collectd.org>
Wed, 12 Oct 2016 14:41:00 +0000 (16:41 +0200)
commit5e4f2ae61dc39938c4df857854724ba1d36f3232
tree6381f34d1a37a3af35237044b927e2650fe3ee34
parent9c962b99a3acd77f1d6e2499052b47356819511a
common.c: Use _LINUX_CAPABILITY_VERSION_3 in cap_header

While check_capability() function already requires
_LINUX_CAPABILITY_VERSION_3 via "#ifdef" since commit 448627953c we still
set the cap_header's version to deprecated _LINUX_CAPABILITY_VERSION. This
results in a warning like

 > capability: warning: `collectd' uses 32-bit capabilities (legacy support in use)

from the kernel when a plugin (like iptables) calls our check_capability()
function.

With this commit we will set cap_header to kernel's current capability
version (_LINUX_CAPABILITY_VERSION_3), which is default since
kernel 2.6.26.

Signed-off-by: Florian Forster <octo@collectd.org>
src/daemon/common.c