From 6d296f2b4492d721697a96197f7e351ce5ad1619 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 29 May 2020 14:18:02 +1000 Subject: [PATCH] [client] stop people running the client as root --- VERSION | 2 +- client/src/main.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 0bad939d..aa20a806 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B2-rc2-2-g667ab981ba+1 \ No newline at end of file +B2-rc2-3-g553e2830bb+1 \ No newline at end of file diff --git a/client/src/main.c b/client/src/main.c index 82ad775c..87399fa6 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1586,6 +1586,12 @@ static void lg_shutdown() int main(int argc, char * argv[]) { + if (getuid() == 0) + { + DEBUG_ERROR("Do not run looking glass as root!"); + return -1; + } + DEBUG_INFO("Looking Glass (" BUILD_VERSION ")"); DEBUG_INFO("Locking Method: " LG_LOCK_MODE);