Use nix crate instead of interacting with libc directly, drop privileges

This commit is contained in:
B. Blechschmidt 2023-04-01 02:19:20 +02:00
parent 3dc7fde5e9
commit 15703a4823
6 changed files with 232 additions and 127 deletions

View file

@ -35,6 +35,12 @@ pub enum Error {
#[error("&String {0}")]
RefString(String),
#[error("nix::errno::Errno {0:?}")]
OSError(#[from] nix::errno::Errno),
#[error("std::num::ParseIntError {0:?}")]
IntParseError(#[from] std::num::ParseIntError),
}
impl From<&str> for Error {