X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fcommon.h;h=720e5f1bc0a408f097fe1d586b5bbb26dda9bcce;hb=d3ba4d04f6c5d22ba97ea81cdca2e2acd04dfec1;hp=5ad2b50dc9d78778fb8b20f1577c3c6d33c48779;hpb=727a4b977ec6549d94da3f694bf3fe8b0121db58;p=collectd.git diff --git a/src/daemon/common.h b/src/daemon/common.h index 5ad2b50d..720e5f1b 100644 --- a/src/daemon/common.h +++ b/src/daemon/common.h @@ -375,4 +375,12 @@ int strtogauge (const char *string, gauge_t *ret_value); int strarray_add (char ***ret_array, size_t *ret_array_len, char const *str); void strarray_free (char **array, size_t array_len); +#ifdef HAVE_SYS_CAPABILITY_H +/** Check if the current process benefits from the capability passed in + * argument. Returns zero if it does, less than zero if it doesn't or on error. + * See capabilities(7) for the list of possible capabilities. + * */ +int check_capability (int capability); +#endif /* HAVE_SYS_CAPABILITY_H */ + #endif /* COMMON_H */