Nathan Fisher
06b88d2c24
- Split into workspace crates - Split into two binaries `corebox` and `hashbox` - Add `mount` crate to workspace to prepare for third binary `utilbox`
24 lines
571 B
Rust
24 lines
571 B
Rust
use super::Cmd;
|
|
use clap::Command;
|
|
use std::process;
|
|
|
|
#[derive(Debug, Default)]
|
|
pub struct Nologin;
|
|
|
|
impl Cmd for Nologin {
|
|
fn cli(&self) -> clap::Command {
|
|
Command::new("nologin")
|
|
.author("Nathan Fisher")
|
|
.about("Denies a user account login ability")
|
|
}
|
|
|
|
fn run(&self, _matches: &clap::ArgMatches) -> Result<(), Box<dyn std::error::Error>> {
|
|
eprintln!("I'm sorry, I can't let you do that, Dave");
|
|
process::exit(42);
|
|
}
|
|
|
|
fn path(&self) -> Option<shitbox::Path> {
|
|
Some(shitbox::Path::Sbin)
|
|
}
|
|
}
|