mirror of
				https://github.com/gnif/LookingGlass.git
				synced 2025-11-03 22:22:08 +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:
		@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user