From 7e5ee54f93c49fef1828b9424fe1172b03b9cbdf Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 27 Nov 2022 22:35:19 +0100 Subject: [PATCH] On POSIX check if UID is 0. --- profiler/src/IsElevated.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/profiler/src/IsElevated.cpp b/profiler/src/IsElevated.cpp index 2f257b72..88d26c4b 100644 --- a/profiler/src/IsElevated.cpp +++ b/profiler/src/IsElevated.cpp @@ -24,9 +24,11 @@ bool IsElevated() #else +#include + bool IsElevated() { - return false; + return getuid() == 0; } #endif