#[non_exhaustive]pub enum HostIdentityReason {
NoExpectation,
UidMismatch {
host: Option<u32>,
client: u32,
},
PidUnavailable,
Unreadable(String),
ExecutableMismatch,
HostChanged(String),
Refused(String),
Unverified {
platform: &'static str,
detail: &'static str,
},
Query(String),
NotLocalPeer,
}Expand description
Why a host was refused. Always the host’s identity, never a connection problem.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoExpectation
The expectation names no executable, so no host can match. Fails closed.
UidMismatch
The host runs as another user than this client.
The OS did not report the host’s process id (a BSD, or a pid namespace that hides it).
Unreadable(String)
The kernel would not describe the host process (permission, or the call failed).
ExecutableMismatch
The host’s executable is not one of the expected executables.
HostChanged(String)
The process behind the socket exited or changed while it was being identified, so the pid could not be proven to name one process throughout.
Refused(String)
The executable matched but the caller’s extra verification refused the host.
Unverified
Identifying the host is not implemented for this platform. Fails closed: it never means “assume it is the right one”.
Query(String)
The OS could not answer the peer-credential query.
NotLocalPeer
The caller is not a local app (a remote device has no OS peer), so there is no process to identify. Fails closed.