Skip to content

Commit 54ded47

Browse files
tdryerSteveLauC
andauthored
Add fctrl::SealFlag::F_SEAL_FUTURE_WRITE (#2213)
* Add `fctrl::SealFlag::F_SEAL_FUTURE_WRITE` Add `fctrl::SealFlag::F_SEAL_FUTURE_WRITE`, a file sealing flag available since Linux 5.1 which prevents modification except via shared writable mappings that were created prior to the seal being set. * Add changelog entry * Use `linux_android` alias Co-authored-by: SteveLauC <[email protected]> --------- Co-authored-by: SteveLauC <[email protected]>
1 parent 0ee21e7 commit 54ded47

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

changelog/2213.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added `fctrl::SealFlag::F_SEAL_FUTURE_WRITE`

src/fcntl.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,10 @@ libc_bitflags!(
420420
F_SEAL_GROW;
421421
/// The file contents cannot be modified.
422422
F_SEAL_WRITE;
423+
/// The file contents cannot be modified, except via shared writable mappings that were
424+
/// created prior to the seal being set. Since Linux 5.1.
425+
#[cfg(linux_android)]
426+
F_SEAL_FUTURE_WRITE;
423427
}
424428
);
425429

0 commit comments

Comments
 (0)