File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed
src/unix/linux_like/linux Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -4661,6 +4661,16 @@ fn test_linux(target: &str) {
4661
4661
// FIXME(linux): Requires >= 6.6 kernel headers.
4662
4662
"PROC_EVENT_NONZERO_EXIT" => true ,
4663
4663
4664
+ // FIXME(linux): Requires >= 6.14 kernel headers.
4665
+ "SECBIT_EXEC_DENY_INTERACTIVE"
4666
+ | "SECBIT_EXEC_DENY_INTERACTIVE_LOCKED"
4667
+ | "SECBIT_EXEC_RESTRICT_FILE"
4668
+ | "SECBIT_EXEC_RESTRICT_FILE_LOCKED"
4669
+ | "SECURE_ALL_UNPRIVILEGED" => true ,
4670
+
4671
+ // FIXME(linux): Value changed in 6.14
4672
+ "SECURE_ALL_BITS" | "SECURE_ALL_LOCKS" => true ,
4673
+
4664
4674
_ => false ,
4665
4675
}
4666
4676
} ) ;
Original file line number Diff line number Diff line change @@ -2776,6 +2776,10 @@ SCTP_STATUS
2776
2776
SCTP_STREAM_RESET_INCOMING
2777
2777
SCTP_STREAM_RESET_OUTGOING
2778
2778
SCTP_UNORDERED
2779
+ SECBIT_EXEC_DENY_INTERACTIVE
2780
+ SECBIT_EXEC_DENY_INTERACTIVE_LOCKED
2781
+ SECBIT_EXEC_RESTRICT_FILE
2782
+ SECBIT_EXEC_RESTRICT_FILE_LOCKED
2779
2783
SECBIT_KEEP_CAPS
2780
2784
SECBIT_KEEP_CAPS_LOCKED
2781
2785
SECBIT_NOROOT
@@ -2815,6 +2819,7 @@ SECCOMP_USER_NOTIF_FLAG_CONTINUE
2815
2819
SECUREBITS_DEFAULT
2816
2820
SECURE_ALL_BITS
2817
2821
SECURE_ALL_LOCKS
2822
+ SECURE_ALL_UNPRIVILEGED
2818
2823
SEEK_DATA
2819
2824
SEEK_HOLE
2820
2825
SELFMAG
Original file line number Diff line number Diff line change @@ -4750,11 +4750,30 @@ pub const SECBIT_NO_CAP_AMBIENT_RAISE: c_int = issecure_mask(SECURE_NO_CAP_AMBIE
4750
4750
pub const SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED : c_int =
4751
4751
issecure_mask ( SECURE_NO_CAP_AMBIENT_RAISE_LOCKED ) ;
4752
4752
4753
+ const SECURE_EXEC_RESTRICT_FILE : c_int = 8 ;
4754
+ const SECURE_EXEC_RESTRICT_FILE_LOCKED : c_int = 9 ;
4755
+
4756
+ pub const SECBIT_EXEC_RESTRICT_FILE : c_int = issecure_mask ( SECURE_EXEC_RESTRICT_FILE ) ;
4757
+ pub const SECBIT_EXEC_RESTRICT_FILE_LOCKED : c_int = issecure_mask ( SECURE_EXEC_RESTRICT_FILE_LOCKED ) ;
4758
+
4759
+ const SECURE_EXEC_DENY_INTERACTIVE : c_int = 10 ;
4760
+ const SECURE_EXEC_DENY_INTERACTIVE_LOCKED : c_int = 11 ;
4761
+
4762
+ pub const SECBIT_EXEC_DENY_INTERACTIVE : c_int = issecure_mask ( SECURE_EXEC_DENY_INTERACTIVE ) ;
4763
+ pub const SECBIT_EXEC_DENY_INTERACTIVE_LOCKED : c_int =
4764
+ issecure_mask ( SECURE_EXEC_DENY_INTERACTIVE_LOCKED ) ;
4765
+
4753
4766
pub const SECUREBITS_DEFAULT : c_int = 0x00000000 ;
4754
- pub const SECURE_ALL_BITS : c_int =
4755
- SECBIT_NOROOT | SECBIT_NO_SETUID_FIXUP | SECBIT_KEEP_CAPS | SECBIT_NO_CAP_AMBIENT_RAISE ;
4767
+ pub const SECURE_ALL_BITS : c_int = SECBIT_NOROOT
4768
+ | SECBIT_NO_SETUID_FIXUP
4769
+ | SECBIT_KEEP_CAPS
4770
+ | SECBIT_NO_CAP_AMBIENT_RAISE
4771
+ | SECBIT_EXEC_RESTRICT_FILE
4772
+ | SECBIT_EXEC_DENY_INTERACTIVE ;
4756
4773
pub const SECURE_ALL_LOCKS : c_int = SECURE_ALL_BITS << 1 ;
4757
4774
4775
+ pub const SECURE_ALL_UNPRIVILEGED : c_int = SECBIT_EXEC_RESTRICT_FILE | SECBIT_EXEC_DENY_INTERACTIVE ;
4776
+
4758
4777
const fn issecure_mask ( x : c_int ) -> c_int {
4759
4778
1 << x
4760
4779
}
You can’t perform that action at this time.
0 commit comments