mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	Print deprecation notice when running SUID
Tracking swaywm/sway@e1db1f8 Add soft deprecation warning to highlight future intent of removing the code which drops SUID privileges. libseat now has a better alternative in the form of seatd-launch which uses the normal seatd daemon & libseat backend and takes care of SUID. Fixes issue #212
This commit is contained in:
		
							parent
							
								
									fa37fba0b0
								
							
						
					
					
						commit
						c7aaa8dd61
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -69,6 +69,9 @@ static void
 | 
			
		|||
drop_permissions(void)
 | 
			
		||||
{
 | 
			
		||||
	if (getuid() != geteuid() || getgid() != getegid()) {
 | 
			
		||||
		wlr_log(WLR_ERROR, "!!! DEPRECATION WARNING: "
 | 
			
		||||
			"SUID privilege drop will be removed in future releases; "
 | 
			
		||||
			"Please migrate to seatd-launch");
 | 
			
		||||
		if (setgid(getgid())) {
 | 
			
		||||
			wlr_log(WLR_ERROR, "unable to drop root group");
 | 
			
		||||
			exit(EXIT_FAILURE);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue