Skip to content

Commit 115f9d5

Browse files
committed
1 parent 2d96246 commit 115f9d5

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3873,6 +3873,7 @@ fn test_linux(target: &str) {
38733873
"linux/sched.h",
38743874
"linux/sctp.h",
38753875
"linux/seccomp.h",
3876+
"linux/securebits.h",
38763877
"linux/sock_diag.h",
38773878
"linux/sockios.h",
38783879
"linux/tls.h",

libc-test/semver/linux.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,6 +2776,17 @@ SCTP_STATUS
27762776
SCTP_STREAM_RESET_INCOMING
27772777
SCTP_STREAM_RESET_OUTGOING
27782778
SCTP_UNORDERED
2779+
SECBIT_NOROOT
2780+
SECBIT_NOROOT_LOCKED
2781+
SECBIT_NO_SETUID_FIXUP
2782+
SECBIT_NO_SETUID_FIXUP_LOCKED
2783+
SECBIT_KEEP_CAPS
2784+
SECBIT_KEEP_CAPS_LOCKED
2785+
SECBIT_NO_CAP_AMBIENT_RAISE
2786+
SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED
2787+
SECUREBITS_DEFAULT
2788+
SECURE_ALL_BITS
2789+
SECURE_ALL_LOCKS
27792790
SECCOMP_ADDFD_FLAG_SEND
27802791
SECCOMP_ADDFD_FLAG_SETFD
27812792
SECCOMP_FILTER_FLAG_LOG

src/unix/linux_like/linux/mod.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4815,6 +4815,26 @@ pub const IN_ONLYDIR: u32 = 0x0100_0000;
48154815
pub const IN_DONT_FOLLOW: u32 = 0x0200_0000;
48164816
pub const IN_EXCL_UNLINK: u32 = 0x0400_0000;
48174817

4818+
// uapi/linux/securebits.h
4819+
pub const SECBIT_NOROOT: c_int = 1 << 0;
4820+
pub const SECBIT_NOROOT_LOCKED: c_int = 1 << 1;
4821+
4822+
pub const SECBIT_NO_SETUID_FIXUP: c_int = 1 << 2;
4823+
pub const SECBIT_NO_SETUID_FIXUP_LOCKED: c_int = 1 << 3;
4824+
4825+
pub const SECBIT_KEEP_CAPS: c_int = 1 << 4;
4826+
pub const SECBIT_KEEP_CAPS_LOCKED: c_int = 1 << 5;
4827+
4828+
pub const SECBIT_NO_CAP_AMBIENT_RAISE: c_int = 1 << 6;
4829+
pub const SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED: c_int = 1 << 7;
4830+
4831+
pub const SECUREBITS_DEFAULT: c_int = 0x00000000;
4832+
pub const SECURE_ALL_BITS: c_int = SECBIT_NOROOT
4833+
| SECBIT_NO_SETUID_FIXUP
4834+
| SECBIT_KEEP_CAPS
4835+
| SECBIT_NO_CAP_AMBIENT_RAISE;
4836+
pub const SECURE_ALL_LOCKS: c_int = SECURE_ALL_BITS << 1;
4837+
48184838
// linux/keyctl.h
48194839
pub const KEY_SPEC_THREAD_KEYRING: i32 = -1;
48204840
pub const KEY_SPEC_PROCESS_KEYRING: i32 = -2;

0 commit comments

Comments
 (0)