feat: added the ability to set CAP_SETUID

This commit is contained in:
Andrew Rioux
2025-02-09 01:11:23 -05:00
parent 8d47ac128d
commit becd0c2f56
6 changed files with 66 additions and 118 deletions

View File

@@ -1,34 +1,13 @@
use std::{
io::{prelude::*, Error, SeekFrom},
io::{prelude::*, Error},
path::Path,
slice,
};
use sparse_actions::payload_types::{Parameters, XOR_KEY};
use sparse_actions::payload_types::XOR_KEY;
mod pe_types;
use pe_types::*;
macro_rules! dbgX {
() => {
eprintln!("[{}:{}:{}]", file!(), line!(), column!())
};
($val:expr $(,)?) => {
// Use of `match` here is intentional because it affects the lifetimes
// of temporaries - https://stackoverflow.com/a/48732525/1063961
match $val {
tmp => {
eprintln!("[{}:{}:{}] {} = {:X?}",
file!(), line!(), column!(), stringify!($val), &tmp);
tmp
}
}
};
($($val:expr),+ $(,)?) => {
($(dbgX!($val)),+,)
};
}
#[cfg(not(debug_assertions))]
pub const SPARSE_LIBRARY: &'static [u8] = include_bytes!(std::env!("SPARSE_LIBRARY"));
#[cfg(debug_assertions)]