don't seal sync_mem

This commit is contained in:
2025-10-27 10:15:55 +01:00
parent b72ea11712
commit 6b60e04513

View File

@@ -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");
}