From 3d38f83e0c1363ed96889d6565e76bc3e401d9b9 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Fri, 4 Nov 2022 16:28:17 +0000 Subject: [PATCH] freebsd procctl flags update --- libc-test/build.rs | 4 ++++ libc-test/semver/freebsd.txt | 6 +++++- src/unix/bsd/freebsdlike/freebsd/mod.rs | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index df4e7f1cf022c..143446d8f37ce 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2088,6 +2088,10 @@ fn test_freebsd(target: &str) { | "PROC_PROTMAX_FORCE_DISABLE" | "PROC_PROTMAX_NOFORCE" | "PROC_PROTMAX_ACTIVE" + | "PROC_NO_NEW_PRIVS_CTL" + | "PROC_NO_NEW_PRIVS_STATUS" + | "PROC_WXMAP_CTL" + | "PROC_WXMAP_STATUS" if Some(13) > freebsd_ver => { true diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index 09bda1f2dd64f..91656d7bf9ed5 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -911,6 +911,8 @@ POSIX_SPAWN_SETSCHEDULER POSIX_SPAWN_SETSIGDEF POSIX_SPAWN_SETSIGMASK PPPDISC +PROC_NO_NEW_PRIVS_CTL +PROC_NO_NEW_PRIVS_STATUS PROC_PDEATHSIG_CTL PROC_PDEATHSIG_STATUS PROC_REAP_ACQUIRE @@ -924,6 +926,8 @@ PROC_TRACE_CTL PROC_TRACE_STATUS PROC_TRAPCAP_CTL PROC_TRAPCAP_STATUS +PROC_WXMAP_CTL +PROC_WXMAP_STATUS PTHREAD_CREATE_DETACHED PTHREAD_CREATE_JOINABLE PTHREAD_MUTEX_ADAPTIVE_NP @@ -1927,4 +1931,4 @@ xallocx xucred eaccess dirname -basename \ No newline at end of file +basename diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index f34b24c579a45..7e8748b4dfe0c 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -2379,6 +2379,10 @@ pub const PROC_PROTMAX_CTL: ::c_int = 15; pub const PROC_PROTMAX_STATUS: ::c_int = 16; pub const PROC_STACKGAP_CTL: ::c_int = 17; pub const PROC_STACKGAP_STATUS: ::c_int = 18; +pub const PROC_NO_NEW_PRIVS_CTL: ::c_int = 19; +pub const PROC_NO_NEW_PRIVS_STATUS: ::c_int = 20; +pub const PROC_WXMAP_CTL: ::c_int = 21; +pub const PROC_WXMAP_STATUS: ::c_int = 22; pub const PROC_PROCCTL_MD_MIN: ::c_int = 0x10000000; pub const PPROT_SET: ::c_int = 1;