* src/nethogs.h: Including files for PATH_MAX and readlink.
* src/nethogs.cpp: Bug fix - make capability detection work correctly when invoking a program in PATH rather than only when invoked explicitly like ./src/nethogs.
This commit is contained in:
@@ -39,6 +39,8 @@
|
|||||||
#include <netinet/udp.h>
|
#include <netinet/udp.h>
|
||||||
|
|
||||||
#if NEEDROOT == 0
|
#if NEEDROOT == 0
|
||||||
|
#include <linux/limits.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/xattr.h>
|
#include <sys/xattr.h>
|
||||||
#include <linux/capability.h>
|
#include <linux/capability.h>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
* like www.adamantix.org: in that case nethogs shouldn't check if it's
|
* like www.adamantix.org: in that case nethogs shouldn't check if it's
|
||||||
* running as root. Take care to give it sufficient privileges though. */
|
* running as root. Take care to give it sufficient privileges though. */
|
||||||
#ifndef NEEDROOT
|
#ifndef NEEDROOT
|
||||||
#define NEEDROOT 1
|
#define NEEDROOT 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEBUG 0
|
#define DEBUG 0
|
||||||
|
|||||||
Reference in New Issue
Block a user