mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +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
@ -1196,6 +1196,12 @@ int main(int argc, char * argv[])
|
|||||||
return -1;
|
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("Looking Glass (%s)", BUILD_VERSION);
|
||||||
DEBUG_INFO("Locking Method: " LG_LOCK_MODE);
|
DEBUG_INFO("Locking Method: " LG_LOCK_MODE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user