X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fiptables.c;h=f6911221df8739f31d77710eb59802a4d9fff1d4;hb=806091e395886da83acf2435e90648bdf2cf2ed5;hp=66dbab7fbf9913eeb9a7f9af08bbac96e56095ea;hpb=43954e07f30d05b2da8319749400c9bf4d01c23c;p=collectd.git diff --git a/src/iptables.c b/src/iptables.c index 66dbab7f..f6911221 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -28,7 +28,6 @@ #include "common.h" #include "plugin.h" -#include "configfile.h" #include #include @@ -505,14 +504,14 @@ static int iptables_shutdown (void) static int iptables_init (void) { -#ifdef HAVE_SYS_CAPABILITY_H +#if defined(HAVE_SYS_CAPABILITY_H) && defined(CAP_NET_ADMIN) if (check_capability (CAP_NET_ADMIN) != 0) { if (getuid () == 0) WARNING ("iptables plugin: Running collectd as root, but the " "CAP_NET_ADMIN capability is missing. The plugin's read " "function will probably fail. Is your init system dropping " - "capabilities ?"); + "capabilities?"); else WARNING ("iptables plugin: collectd doesn't have the CAP_NET_ADMIN " "capability. If you don't want to run collectd as root, try "