pub enum Error {
Spawn {
program: String,
source: Error,
},
CommandFailed {
program: String,
status: String,
stderr: String,
},
Timeout {
program: String,
seconds: u64,
},
NoMachinePrincipal {
keytab: PathBuf,
},
NoMachinePrincipalForRealm {
realm: String,
keytab: PathBuf,
},
KeytabUnreadable {
keytab: PathBuf,
source: Error,
},
KeytabMissing {
keytab: PathBuf,
},
GroupNotFound(String),
CacheStillInvalid(PathBuf),
RefusingSharedDir(PathBuf),
RefusingSymlink(PathBuf),
Io(Error),
}Expand description
Errors produced by this crate.
Variants§
Spawn
The program could not be spawned at all (missing binary, permissions…).
CommandFailed
The program ran but exited non-zero.
Timeout
The program hung past the per-command cap and was killed. Typical cause: a half-up network where the KDC resolves but packets go nowhere, so kinit sits in its own retry cycle indefinitely.
NoMachinePrincipal
The keytab holds no NAME$@REALM (machine sAMAccountName) entry.
NoMachinePrincipalForRealm
The keytab has machine principals, but none in the requested realm.
KeytabUnreadable
The keytab exists but cannot be read — machine keytabs are root-only. (The io::Error is the source, not embedded here, so error chains don’t print it twice.)
KeytabMissing
The keytab does not exist at all — most likely not AD-joined.
GroupNotFound(String)
The group to share the ticket cache with does not exist.
CacheStillInvalid(PathBuf)
Renew and mint both ran, yet the cache still fails klist -s.
Refusing to take ownership of a shared system directory.
RefusingSymlink(PathBuf)
Refusing to operate through a symlink.
Io(Error)
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
Whether retrying shortly might succeed (a network / KDC hiccup) versus a permanent setup or join problem that needs an operator to fix.
Setup errors (missing/unreadable keytab, no matching principal, missing
group, refused path, missing tool) are permanent. A kinit/klist
failure is classified from the KDC’s message: a stale/disabled/deleted
machine account is permanent; unreachable-KDC / clock-skew / network is
transient. Unknown states default to transient — a retry is cheap.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()