don't seal sync_mem
This commit is contained in:
@@ -16,7 +16,7 @@ unsafe impl Send for Agent {}
|
||||
impl Agent {
|
||||
pub(crate) unsafe fn new(agent_path: &Path, keyfile_path: &Path) -> Result<Self> {
|
||||
let data_fd = get_shared_mem_fd();
|
||||
let sync_fd = memfd_create("sync\x00".as_ptr() as *const c_char, MFD_ALLOW_SEALING);
|
||||
let sync_fd = memfd_create("sync\x00".as_ptr() as *const c_char, 0);
|
||||
|
||||
if sync_fd <= 0 {
|
||||
bail!("creating memfd failed");
|
||||
@@ -36,8 +36,6 @@ impl Agent {
|
||||
0,
|
||||
) as *mut usize;
|
||||
|
||||
fcntl(sync_fd, F_ADD_SEALS, F_SEAL_FUTURE_WRITE);
|
||||
|
||||
if sync_mem == MAP_FAILED as *mut usize {
|
||||
bail!("mmap failed");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user