pub struct Shim {
pub root: PathBuf,
pub user: String,
pub acl_file: Option<PathBuf>,
pub handoff: Option<PathBuf>,
}Expand description
One invocation’s configuration, all of it from the flags the operator wrote into the forced command.
Fields§
§root: PathBufRepository root, the same directory the daemon serves.
user: StringThe choir user this key belongs to. Written by the operator into
the key’s own authorized_keys line; the client cannot reach it.
acl_file: Option<PathBuf>The ACL file (D29), re-read on every invocation so an edited grant
takes effect on the next command rather than on a restart. None
falls back to the ACL the daemon named in the Handoff, and
only when that is absent too does this become the daemon’s
authenticate-only behaviour: any registered key reaches every
repository.
handoff: Option<PathBuf>The daemon’s Handoff file: where a push reports itself, and
which ACL the daemon is enforcing. None refuses pushes.
Implementations§
Source§impl Shim
impl Shim
Sourcepub fn decide(&self, original: &str) -> Result<Exec, String>
pub fn decide(&self, original: &str) -> Result<Exec, String>
Resolves one SSH_ORIGINAL_COMMAND into the git invocation to
become, or the message to fail with.
§Errors
Every refusal path: an unparseable or unserved command, a name that is not a repository, a missing grant, a repository that is not there, and a push with nowhere to send the sequencer callback.