diff options
author | Stefan Kreutz <mail@skreutz.com> | 2023-05-18 21:56:36 +0200 |
---|---|---|
committer | Stefan Kreutz <mail@skreutz.com> | 2023-05-18 21:56:36 +0200 |
commit | be6e70ffde1ef213166b19330cf9418f9bad2f3b (patch) | |
tree | 50b41659573041fae9c135858417ee8989df505d | |
parent | 49f0bc6c310751b11cf72e893858ca19e9a2e9a4 (diff) | |
download | wpa-psk-be6e70ffde1ef213166b19330cf9418f9bad2f3b.tar |
Use clap without wrap_help feature
With the wrap_help feature, clap tries to determine the terminal width
using the terminal-size crate. This involves access to the temporary
directory, violating the stdio pledge on OpenBSD and thus aborting the
process.
This commit disables clap's wrap_help feature to keep the simple stdio
pledge. Another solution could to pledge stdio and tmppath.
-rw-r--r-- | Cargo.lock | 11 | ||||
-rw-r--r-- | wpa-psk-cli/CHANGELOG.md | 4 | ||||
-rw-r--r-- | wpa-psk-cli/Cargo.toml | 2 |
3 files changed, 5 insertions, 12 deletions
@@ -127,7 +127,6 @@ dependencies = [ "bitflags", "clap_lex", "strsim", - "terminal_size", ] [[package]] @@ -436,16 +435,6 @@ dependencies = [ ] [[package]] -name = "terminal_size" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" -dependencies = [ - "rustix", - "windows-sys", -] - -[[package]] name = "termtree" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/wpa-psk-cli/CHANGELOG.md b/wpa-psk-cli/CHANGELOG.md index 1143585..54ff7ad 100644 --- a/wpa-psk-cli/CHANGELOG.md +++ b/wpa-psk-cli/CHANGELOG.md @@ -10,6 +10,10 @@ The format is based on [Keep A Changelog][] and this project adheres to ## Unreleased +### Fixed + +- Abort on OpenBSD when printing help. + ## [0.1.3] - 2023-05-14 ### Changed diff --git a/wpa-psk-cli/Cargo.toml b/wpa-psk-cli/Cargo.toml index 4e1309f..a59ee2b 100644 --- a/wpa-psk-cli/Cargo.toml +++ b/wpa-psk-cli/Cargo.toml @@ -12,7 +12,7 @@ categories = ["command-line-utilities"] publish = true [dependencies] -clap = { version = "4.2.7", features = ["derive", "wrap_help"] } +clap = { version = "4.2.7", features = ["derive"] } wpa-psk = { path = "../wpa-psk", version = "0.2.2" } [target.'cfg(target_os = "openbsd")'.dependencies] |