mm(1): updates to use new unveil api

This commit is contained in:
Emma Tebibyte 2024-09-11 02:32:32 -06:00
parent 0b3ed37c38
commit 7498b283ce
Signed by: emma
GPG Key ID: 06FA419A1698C270

View File

@ -115,7 +115,7 @@ fn main() -> ExitCode {
#[cfg(target_os="openbsd")] { #[cfg(target_os="openbsd")] {
for input in &ins { for input in &ins {
let perms = UnveilPerms::new(vec!['r']); let perms = UnveilPerms::new(['r']);
if let Err(e) = unveil(Some(&input), Some(perms)) { if let Err(e) = unveil(Some(&input), Some(perms)) {
return err(&argv[0], e, Some(EX_OSERR)); return err(&argv[0], e, Some(EX_OSERR));
@ -123,7 +123,7 @@ fn main() -> ExitCode {
} }
for output in &outs { for output in &outs {
let perms = UnveilPerms::new(vec!['c', 'w']); let perms = UnveilPerms::new(['c', 'w']);
if let Err(e) = unveil(Some(&output), Some(perms)) { if let Err(e) = unveil(Some(&output), Some(perms)) {
return err(&argv[0], e, Some(EX_OSERR)); return err(&argv[0], e, Some(EX_OSERR));