check_permissions(void)
{
- int ret = 0;
-
if (getuid() == 0) {
/* We have everything we need */
return 0;
#else /* HAVE_SYS_CAPABILITY_H && CAP_SYS_RAWIO */
}
+ int ret = 0;
+
if (check_capability(CAP_SYS_RAWIO) != 0) {
WARNING("turbostat plugin: Collectd doesn't have the "
"CAP_SYS_RAWIO capability. If you don't want to run "