mirror of
				https://git.proxmox.com/git/proxmox
				synced 2025-10-31 03:54:56 +00:00 
			
		
		
		
	daemon: try to remove existing unix socket in bind directly
We tried this unconditionally on start-up in the PDM for the priv. API daemon, but we actually only want to clean-up on fresh bind, not on restoring the FD on daemon reload. Otherwise the unprivileged daemon cannot connect to the privileged one anymore after the latter got reloaded. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
		
							parent
							
								
									7648aabf42
								
							
						
					
					
						commit
						1db49cb269
					
				| @ -303,6 +303,11 @@ impl Listenable for tokio::net::UnixListener { | ||||
|             let addr = addr.as_pathname().ok_or_else(|| { | ||||
|                 io::Error::new(io::ErrorKind::Other, "missing path for unix socket") | ||||
|             })?; | ||||
|             match std::fs::remove_file(addr) { | ||||
|                 Ok(()) => (), | ||||
|                 Err(err) if err.kind() == io::ErrorKind::NotFound => (), | ||||
|                 Err(err) => Err(err)?, | ||||
|             } | ||||
|             Self::bind(addr) | ||||
|         }) | ||||
|     } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Thomas Lamprecht
						Thomas Lamprecht