byllyfish / syscallfilter

seccomp-bpf whitelist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SycallFilter: seccomp-bpf whitelist

Implements a seccomp-bpf filter that allows only specified system calls. Once the filter is installed, attempting to call an unspecified system call will cause the program to terminate.

SyscallFilter filter;
filter.allow(SYS_open);
filter.allow(SYS_read);
filter.allow(SYS_write);
filter.allow(SYS_close);

std::error_code err = filter.install();

License

This software is licensed under the terms of the MIT License.

About

seccomp-bpf whitelist

License:MIT License


Languages

Language:C++ 85.8%Language:Shell 10.4%Language:CMake 3.9%