mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 14:21:57 +00:00
[client] main: prevent the user from launching looking glass as setuid
We don't want to encourage craziness of people making the client suid to bypass permission issues on the shm file. Note: I see no evidence of this happening in the wild, but let's be proactive.
This commit is contained in:
parent
72ccd44681
commit
64c906b801
1 changed files with 6 additions and 0 deletions
|
@ -1196,6 +1196,12 @@ int main(int argc, char * argv[])
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (getuid() != geteuid())
|
||||
{
|
||||
DEBUG_ERROR("Do not run looking glass as setuid!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
DEBUG_INFO("Looking Glass (%s)", BUILD_VERSION);
|
||||
DEBUG_INFO("Locking Method: " LG_LOCK_MODE);
|
||||
|
||||
|
|
Loading…
Reference in a new issue