Skip to main content

validate_remote_socket

Function validate_remote_socket 

Source
pub fn validate_remote_socket(path: &str) -> SshCliResult<()>
Expand description

Rejects a remote socket path that cannot be valid on any POSIX host.

Deliberately minimal: the socket lives on the server, so anything beyond clearly-impossible input would be this machine second-guessing a filesystem it cannot see. Checking Path::exists locally would be actively wrong — it would pass or fail based on paths that have nothing to do with the remote host.

§Errors

SshCliError::InvalidArgument (exit 64) for an empty path, a relative path, or one containing a NUL byte.