Skip to content

Commit b5b9ef5

Browse files
committed
Add F_SEAL_FUTURE_WRITE on Linux/Android
This was added in Linux 5.1 and will only show up in the next glibc release, thus skip in tests.
1 parent 8e2e498 commit b5b9ef5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

libc-test/build.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,8 @@ fn test_android(target: &str) {
13781378
"SIG_DFL" | "SIG_ERR" | "SIG_IGN" => true, // sighandler_t weirdness
13791379
// FIXME: still necessary?
13801380
"SIGUNUSED" => true, // removed in glibc 2.26
1381+
// FIXME: remove once Android uses kernel headers >= 5.1 which expose this constant
1382+
"F_SEAL_FUTURE_WRITE" => true,
13811383

13821384
_ => false,
13831385
}
@@ -1872,7 +1874,7 @@ fn test_emscripten(target: &str) {
18721874
"F_CANCELLK" | "F_ADD_SEALS" | "F_GET_SEALS" => true,
18731875
// FIXME: is this necessary?
18741876
"F_SEAL_SEAL" | "F_SEAL_SHRINK" | "F_SEAL_GROW"
1875-
| "F_SEAL_WRITE" => true,
1877+
| "F_SEAL_WRITE" | "F_SEAL_FUTURE_WRITE" => true,
18761878
// FIXME: is this necessary?
18771879
"BOTHER" => true,
18781880

@@ -2382,7 +2384,7 @@ fn test_linux(target: &str) {
23822384
"F_CANCELLK" | "F_ADD_SEALS" | "F_GET_SEALS" => true,
23832385
// FIXME: is this necessary?
23842386
"F_SEAL_SEAL" | "F_SEAL_SHRINK" | "F_SEAL_GROW"
2385-
| "F_SEAL_WRITE" => true,
2387+
| "F_SEAL_WRITE" | "F_SEAL_FUTURE_WRITE" => true,
23862388
// FIXME: is this necessary?
23872389
"QFMT_VFS_OLD" | "QFMT_VFS_V0" | "QFMT_VFS_V1"
23882390
if mips =>

src/unix/notbsd/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ pub const F_SEAL_SEAL: ::c_int = 0x0001;
465465
pub const F_SEAL_SHRINK: ::c_int = 0x0002;
466466
pub const F_SEAL_GROW: ::c_int = 0x0004;
467467
pub const F_SEAL_WRITE: ::c_int = 0x0008;
468+
pub const F_SEAL_FUTURE_WRITE: ::c_int = 0x0010;
468469

469470
// TODO(#235): Include file sealing fcntls once we have a way to verify them.
470471

0 commit comments

Comments
 (0)