Skip to content

nevun/perl-Linux-Seccomp_bpf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

seccomp module for perl

overview

This module allows you easily whitelist systemcalls in your perl programs. An example program is provided in examples/

The module only exports one function, scmp_bpf_install_filter, which takes a list as an argument..

Example:

use strict;
use Linux::Seccomp_bpf;

my @whitelist = (#"write",
                 "exit_group",
                 "rt_sigaction",
                 "read",);
print "foo\n";
&scmp_bpf_install_filter(@whitelist);
#program dies now, there is no write syscall anymore.
print "bar\n";

limitations

Module currently only allows for restriction of syscalls, not arguments.

credits

special thanks to mue for hacking on this.

About

filter syscalls in perl programs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.4%
  • Perl 2.1%
  • XS 1.4%
  • Shell 0.1%