disable coredumps for process
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use libc::{
|
||||
c_int, c_void, mmap, prctl, MAP_FAILED, MAP_SHARED, PROT_READ, PROT_WRITE,
|
||||
c_int, c_void, mmap, prctl, MAP_FAILED, MAP_SHARED, PROT_READ, PROT_WRITE, PR_SET_DUMPABLE,
|
||||
PR_SET_SPECULATION_CTRL, PR_SPEC_FORCE_DISABLE, PR_SPEC_STORE_BYPASS,
|
||||
};
|
||||
use std::fs::File;
|
||||
@@ -26,6 +26,10 @@ fn main() {
|
||||
);
|
||||
}
|
||||
|
||||
unsafe {
|
||||
assert!(prctl(PR_SET_DUMPABLE, 0) == 0);
|
||||
}
|
||||
|
||||
let args: Vec<String> = env::args().collect();
|
||||
|
||||
let shared_fd: c_int = args[0]
|
||||
|
||||
Reference in New Issue
Block a user