Skip to content

Commit 0006343

Browse files
authored
linux/fs: add F_SEAL_EXEC (#1417)
* cargo: update libc to 0.2.171 This is required to pick up `F_SEAL_EXEC` on Linux. * linux/fs: add F_SEAL_EXEC
1 parent df61816 commit 0006343

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ compiler_builtins = { version = '0.1.49', optional = true }
3232
[target.'cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))'.dependencies]
3333
linux-raw-sys = { version = "0.9.2", default-features = false, features = ["general", "errno", "ioctl", "no_std", "elf"] }
3434
libc_errno = { package = "errno", version = "0.3.10", default-features = false, optional = true }
35-
libc = { version = "0.2.168", default-features = false, optional = true }
35+
libc = { version = "0.2.171", default-features = false, optional = true }
3636

3737
# Dependencies for platforms where only libc is supported:
3838
#
3939
# On all other Unix-family platforms, and under Miri, we always use the libc
4040
# backend, so enable its dependencies unconditionally.
4141
[target.'cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64")))))))'.dependencies]
4242
libc_errno = { package = "errno", version = "0.3.10", default-features = false }
43-
libc = { version = "0.2.168", default-features = false }
43+
libc = { version = "0.2.171", default-features = false }
4444

4545
# Additional dependencies for Linux with the libc backend:
4646
#
@@ -66,7 +66,7 @@ default-features = false
6666

6767
[dev-dependencies]
6868
tempfile = "3.5.0"
69-
libc = "0.2.168"
69+
libc = "0.2.171"
7070
libc_errno = { package = "errno", version = "0.3.10", default-features = false }
7171
serial_test = "2.0.0"
7272
memoffset = "0.9.0"

src/backend/libc/fs/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,9 @@ bitflags! {
736736
/// `F_SEAL_FUTURE_WRITE` (since Linux 5.1)
737737
#[cfg(linux_kernel)]
738738
const FUTURE_WRITE = bitcast!(c::F_SEAL_FUTURE_WRITE);
739+
/// `F_SEAL_EXEC` (since Linux 6.3)
740+
#[cfg(linux_kernel)]
741+
const EXEC = bitcast!(c::F_SEAL_EXEC);
739742

740743
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
741744
const _ = !0;

src/backend/linux_raw/fs/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,8 @@ bitflags! {
496496
const WRITE = linux_raw_sys::general::F_SEAL_WRITE;
497497
/// `F_SEAL_FUTURE_WRITE` (since Linux 5.1)
498498
const FUTURE_WRITE = linux_raw_sys::general::F_SEAL_FUTURE_WRITE;
499+
/// `F_SEAL_EXEC` (since Linux 6.3)
500+
const EXEC = linux_raw_sys::general::F_SEAL_EXEC;
499501

500502
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
501503
const _ = !0;

0 commit comments

Comments
 (0)