From 77041622555d4fa8802aa149490c184f7a69da11 Mon Sep 17 00:00:00 2001 From: belliash Date: Wed, 18 Dec 2019 17:33:53 +0100 Subject: [PATCH] Notice user, that root priviledges are required. --- cpuset.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpuset.c b/cpuset.c index 906ed4a..29a9d2d 100644 --- a/cpuset.c +++ b/cpuset.c @@ -132,6 +132,10 @@ int main(int argc, char *argv[]) { return 1; } } + if(geteuid() != 0) { + printf("This program needs to be launched as root!\n"); + return 1; + } if(action == ACTION_ENABLE) { if(!cpu || !mem) { printf("No CPU or memory pinning specified!\n");