Auto merge of #880 - Mic92:seccomp, r=alexcrichton

Add SECCOMP_MODE_* flags on Linux
This commit is contained in:
bors 2017-12-19 14:56:51 +00:00
commit d5af3c6f41
3 changed files with 9 additions and 0 deletions

View File

@ -250,6 +250,7 @@ fn main() {
if linux || android {
cfg.header("sys/fsuid.h");
cfg.header("linux/seccomp.h");
// DCCP support
if !uclibc && !musl && !emscripten {

View File

@ -861,6 +861,10 @@ pub const NETLINK_TX_RING: ::c_int = 7;
pub const GRND_NONBLOCK: ::c_uint = 0x0001;
pub const GRND_RANDOM: ::c_uint = 0x0002;
pub const SECCOMP_MODE_DISABLED: ::c_uint = 0;
pub const SECCOMP_MODE_STRICT: ::c_uint = 1;
pub const SECCOMP_MODE_FILTER: ::c_uint = 2;
pub const NLA_F_NESTED: ::c_int = 1 << 15;
pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14;
pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER);

View File

@ -1084,6 +1084,10 @@ pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4;
pub const GRND_NONBLOCK: ::c_uint = 0x0001;
pub const GRND_RANDOM: ::c_uint = 0x0002;
pub const SECCOMP_MODE_DISABLED: ::c_uint = 0;
pub const SECCOMP_MODE_STRICT: ::c_uint = 1;
pub const SECCOMP_MODE_FILTER: ::c_uint = 2;
pub const ITIMER_REAL: ::c_int = 0;
pub const ITIMER_VIRTUAL: ::c_int = 1;
pub const ITIMER_PROF: ::c_int = 2;