Files
simple-rust-tests/__security/secmem-proc/src/main.rs
2022-07-27 23:25:03 +08:00

13 lines
472 B
Rust

/// `secmem-proc` is a crate designed to harden a process against
/// low-privileged attackers running on the same system trying
/// to obtain secret memory contents of the current process.
/// More specifically, the crate disables core dumps and tries
/// to disable tracing on unix-like OSes.
fn main() {
if secmem_proc::harden_process().is_err() {
println!("ERROR: could not harden process, exiting");
return;
}
println!("Hello, world!");
}