mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	client: unset WAYLAND_SOCKET env variable
WAYLAND_SOCKET contains a file descriptor that is an open connection to a Wayland server. It is private to us, and makes no sense to relay the same value (or any value) to our child processes. Unset the environment variable to prevent it from being accidentally relayed to other processes. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
		
							parent
							
								
									cf89b40c4c
								
							
						
					
					
						commit
						58bb064afa
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -352,6 +352,7 @@ wl_display_connect(const char *name)
 | 
				
			||||||
		flags = fcntl(display->fd, F_GETFD);
 | 
							flags = fcntl(display->fd, F_GETFD);
 | 
				
			||||||
		if (flags != -1)
 | 
							if (flags != -1)
 | 
				
			||||||
			fcntl(display->fd, F_SETFD, flags | FD_CLOEXEC);
 | 
								fcntl(display->fd, F_SETFD, flags | FD_CLOEXEC);
 | 
				
			||||||
 | 
							unsetenv("WAYLAND_SOCKET");
 | 
				
			||||||
	} else if (connect_to_socket(display, name) < 0) {
 | 
						} else if (connect_to_socket(display, name) < 0) {
 | 
				
			||||||
		free(display);
 | 
							free(display);
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue