[client] stop people running the client as root

This commit is contained in:
Geoffrey McRae 2020-05-29 14:18:02 +10:00
parent 553e2830bb
commit 6d296f2b44
2 changed files with 7 additions and 1 deletions

View file

@ -1 +1 @@
B2-rc2-2-g667ab981ba+1
B2-rc2-3-g553e2830bb+1

View file

@ -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);