summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2022-11-29 17:04:24 -0700
committerAlan Somers <asomers@gmail.com>2022-11-29 17:10:49 -0700
commit10f444431eb643e4c69186fa1d5d1aad0c32a271 (patch)
tree3726871c69018c4cd1f36a333a16cbc28579b598
parente4b8fd4f59a87346c870295c8125469c672998aa (diff)
downloadrust-libc-10f444431eb643e4c69186fa1d5d1aad0c32a271.tar.gz
Add more capsicum functions for FreeBSD
These have all been available since at least FreeBSD 9.2.
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs
index 4064a3fe4e..9847030f80 100644
--- a/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -4292,8 +4292,13 @@ extern "C" {
pub fn cpuset_setid(which: cpuwhich_t, id: ::id_t, setid: ::cpusetid_t) -> ::c_int;
pub fn cap_enter() -> ::c_int;
pub fn cap_getmode(modep: *mut ::c_uint) -> ::c_int;
+ pub fn cap_fcntls_get(fd: ::c_int, fcntlrightsp: *mut u32) -> ::c_int;
+ pub fn cap_fcntls_limit(fd: ::c_int, fcntlrights: u32) -> ::c_int;
+ pub fn cap_ioctls_get(fd: ::c_int, cmds: *mut u_long, maxcmds: usize) -> isize;
+ pub fn cap_ioctls_limit(fd: ::c_int, cmds: *const u_long, ncmds: usize) -> ::c_int;
pub fn __cap_rights_init(version: ::c_int, rights: *mut cap_rights_t, ...)
-> *mut cap_rights_t;
+ pub fn __cap_rights_get(version: ::c_int, fd: ::c_int, rightsp: *mut cap_rights_t) -> ::c_int;
pub fn __cap_rights_set(rights: *mut cap_rights_t, ...) -> *mut cap_rights_t;
pub fn __cap_rights_clear(rights: *mut cap_rights_t, ...) -> *mut cap_rights_t;
pub fn __cap_rights_is_set(rights: *const cap_rights_t, ...) -> bool;
@@ -4303,6 +4308,7 @@ extern "C" {
pub fn cap_rights_remove(dst: *mut cap_rights_t, src: *const cap_rights_t)
-> *mut cap_rights_t;
pub fn cap_rights_contains(big: *const cap_rights_t, little: *const cap_rights_t) -> bool;
+ pub fn cap_sandboxed() -> bool;
pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;