diff options
author | Galen Guyer <galen@galenguyer.com> | 2022-11-17 15:22:22 -0500 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2022-11-17 15:22:22 -0500 |
commit | 9ac1daf2e77869a52d20aa59436b00c653d2587d (patch) | |
tree | 6f1e3ad63a76bfb4a95a8dfb49290ad479f1d2fa | |
parent | 47b9c18aba5025ecf21ab669c69010552498f407 (diff) |
Drop all capabilities on program start
-rw-r--r-- | Cargo.lock | 13 | ||||
-rw-r--r-- | Cargo.toml | 3 | ||||
-rw-r--r-- | src/cli.rs | 1 |
3 files changed, 15 insertions, 2 deletions
@@ -26,6 +26,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] +name = "caps" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190baaad529bcfbde9e1a19022c42781bdb6ff9de25721abdb8fd98c0807730b" +dependencies = [ + "libc", + "thiserror", +] + +[[package]] name = "cc" version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -146,8 +156,9 @@ dependencies = [ [[package]] name = "hancock" -version = "1.4.0" +version = "1.5.0" dependencies = [ + "caps", "clap", "dirs", "dotenvy", @@ -1,7 +1,7 @@ [package] name = "hancock" authors = ["Galen Guyer <galen@galenguyer.com>"] -version = "1.4.0" +version = "1.5.0" edition = "2021" license = "MIT" @@ -15,6 +15,7 @@ path = "src/cli.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +caps = "0.5.5" clap = { version = "3.1.6", features = ["cargo", "derive", "env", "wrap_help"] } dirs = "4.0.0" dotenvy = "0.15.1" @@ -20,6 +20,7 @@ pub enum Commands { } fn main() { + caps::clear(None, caps::CapSet::Permitted).expect("Unable to clear capabilities"); let env_file = match Path::new(".env").exists() { true => Some(String::from(".env")), false => { |