X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fexec.c;h=dfd4b05f59a95fc5409ab8b6a86aaba00b49df59;hb=2c7f098e5bef3421f8e2405f6192bff9b563040e;hp=c51465b810064162517a4e3f53bae9107a7a5b19;hpb=e5e5d99350fa54e22f07b90fbc3102df51565ad9;p=collectd.git diff --git a/src/exec.c b/src/exec.c index c51465b8..dfd4b05f 100644 --- a/src/exec.c +++ b/src/exec.c @@ -810,14 +810,14 @@ static int exec_init (void) /* {{{ */ sigaction (SIGCHLD, &sa, NULL); -#ifdef HAVE_SYS_CAPABILITY_H +#if defined(HAVE_SYS_CAPABILITY_H) && defined(CAP_SETUID) && defined(CAP_SETGID) if ((check_capability (CAP_SETUID) != 0) || (check_capability (CAP_SETGID) != 0)) { if (getuid () == 0) WARNING ("exec plugin: Running collectd as root, but the CAP_SETUID " "or CAP_SETGID capabilities are missing. The plugin's read function " - "will probably fail. Is your init system dropping capabilities ?"); + "will probably fail. Is your init system dropping capabilities?"); else WARNING ("exec plugin: collectd doesn't have the CAP_SETUID or " "CAP_SETGID capabilities. If you don't want to run collectd as root, "