From 02fdea27b2e85a1d48762acf14858b8b3e51e899 Mon Sep 17 00:00:00 2001 From: MisterY52 <11368116+MisterY52@users.noreply.github.com> Date: Sun, 30 May 2021 09:35:11 +0200 Subject: [PATCH] Added check for root privileges --- apex_dma/apex_dma.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apex_dma/apex_dma.cpp b/apex_dma/apex_dma.cpp index 5bc7dbf..769592e 100644 --- a/apex_dma/apex_dma.cpp +++ b/apex_dma/apex_dma.cpp @@ -722,8 +722,14 @@ static void item_glow_t() item_t = false; } -int main() +int main(int argc, char *argv[]) { + if(geteuid() != 0) + { + printf("Error: %s is not running as root\n", argv[0]); + return 0; + } + const char* cl_proc = "client_ap.exe"; const char* ap_proc = "R5Apex.exe"; //const char* ap_proc = "EasyAntiCheat_launcher.exe";