Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more capsicum functions for FreeBSD #3022

Merged
merged 2 commits into from Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions libc-test/semver/freebsd.txt
Expand Up @@ -1509,6 +1509,23 @@ bpf_program
bpf_stat
bpf_version
bsearch
cap_enter
cap_getmode
cap_fcntls_get
cap_fcntls_limit
cap_ioctls_get
cap_ioctls_limit
__cap_rights_init
__cap_rights_get
__cap_rights_set
__cap_rights_clear
__cap_rights_is_set
cap_rights_is_valid
cap_rights_limit
cap_rights_merge
cap_rights_remove
cap_rights_contains
cap_sandboxed
cfmakesane
chflags
chflagsat
Expand Down
6 changes: 6 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Expand Up @@ -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;
Expand All @@ -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;

Expand Down