File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
src/unix/linux_like/linux Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -3873,6 +3873,7 @@ fn test_linux(target: &str) {
3873
3873
"linux/sched.h" ,
3874
3874
"linux/sctp.h" ,
3875
3875
"linux/seccomp.h" ,
3876
+ "linux/securebits.h" ,
3876
3877
"linux/sock_diag.h" ,
3877
3878
"linux/sockios.h" ,
3878
3879
"linux/tls.h" ,
Original file line number Diff line number Diff line change @@ -2776,6 +2776,17 @@ SCTP_STATUS
2776
2776
SCTP_STREAM_RESET_INCOMING
2777
2777
SCTP_STREAM_RESET_OUTGOING
2778
2778
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
2779
2790
SECCOMP_ADDFD_FLAG_SEND
2780
2791
SECCOMP_ADDFD_FLAG_SETFD
2781
2792
SECCOMP_FILTER_FLAG_LOG
Original file line number Diff line number Diff line change @@ -4815,6 +4815,26 @@ pub const IN_ONLYDIR: u32 = 0x0100_0000;
4815
4815
pub const IN_DONT_FOLLOW : u32 = 0x0200_0000 ;
4816
4816
pub const IN_EXCL_UNLINK : u32 = 0x0400_0000 ;
4817
4817
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
+
4818
4838
// linux/keyctl.h
4819
4839
pub const KEY_SPEC_THREAD_KEYRING : i32 = -1 ;
4820
4840
pub const KEY_SPEC_PROCESS_KEYRING : i32 = -2 ;
You can’t perform that action at this time.
0 commit comments