Commit 99dd7733 authored by williangaspar's avatar williangaspar
parent e653297a
#include <iostream>
#include <signal.h>
#include <sys/resource.h>
#include <unistd.h>
#include "bpforc.h"
#include "bpftrace.h"
......@@ -54,6 +55,12 @@ static void enforce_infinite_rlimit() {
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;
Driver driver;
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