@cryptotaxi247 / netdata-1 / commits / 3d2d518b1

remove macros to detect if certain capabilities are supported by system; fixes #1689

Costa Tsaousis (ktsaou) committed Jan 31, 2017 at 21:03 UTC 3d2d518b13e0372c5b92befd7c490951fcdea525
1 file changed -14
src/apps_plugin.c
-14
@@ -3026,20 +3026,6 @@ static int am_i_running_as_root() {
3026
3027 #ifdef HAVE_CAPABILITY
3028 static int check_capabilities() {
3029 - if(!CAP_IS_SUPPORTED(CAP_DAC_READ_SEARCH)) {
3030 - error("This system does not support CAP_DAC_READ_SEARCH capability. Please setuid to root apps.plugin.");
3031 - return 0;
3032 - }
3033 - else if(debug)
3034 - info("System has CAP_DAC_READ_SEARCH capability.");
3035 -
3036 - if(!CAP_IS_SUPPORTED(CAP_SYS_PTRACE)) {
3037 - error("This system does not support CAP_SYS_PTRACE capability. Please setuid to root apps.plugin.");
3038 - return 0;
3039 - }
3040 - else if(debug)
3041 - info("System has CAP_SYS_PTRACE capability.");
3042 -
3029 cap_t caps = cap_get_proc();
3030 if(!caps) {
3031 error("Cannot get current capabilities.");