Commit 99dd7733 authored by williangaspar's avatar williangaspar
parent e653297a
#include <iostream> #include <iostream>
#include <signal.h> #include <signal.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <unistd.h>
#include "bpforc.h" #include "bpforc.h"
#include "bpftrace.h" #include "bpftrace.h"
...@@ -54,6 +55,12 @@ static void enforce_infinite_rlimit() { ...@@ -54,6 +55,12 @@ static void enforce_infinite_rlimit() {
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
if (geteuid() != 0)
{
std::cerr << "ERROR: bpftrace currently only supports running as the root user." << std::endl;
exit(0);
}
int err; int err;
Driver driver; Driver driver;
char *pid_str = NULL; char *pid_str = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment