]> git.eshelyaron.com Git - emacs.git/commit
Add a helper binary to create a basic Secure Computing filter.
authorPhilipp Stephani <phst@google.com>
Thu, 17 Dec 2020 10:20:55 +0000 (11:20 +0100)
committerPhilipp Stephani <phst@google.com>
Sat, 10 Apr 2021 19:10:16 +0000 (21:10 +0200)
commit1060289f51ee1bf269bb45940892eb272d35af97
tree5f16989652dc6294245f5dc767bbf51cfd9a7983
parent2d17e0124e4232db6344b18cec466eb31920e675
Add a helper binary to create a basic Secure Computing filter.

The binary uses the 'seccomp' helper library.  The library isn't
needed to load the generated Secure Computing filter.

* configure.ac: Check for 'seccomp' header and library.

* lib-src/seccomp-filter.c: New helper binary to generate a generic
Secure Computing filter for GNU/Linux.

* lib-src/Makefile.in (DONT_INSTALL): Add 'seccomp-filter' helper
binary if possible.
(all): Add Secure Computing filter file if possible.
(seccomp-filter$(EXEEXT)): Compile helper binary.
(seccomp-filter.bpf seccomp-filter.pfc): Generate filter files.

* test/src/emacs-tests.el (emacs-tests/seccomp/allows-stdout)
(emacs-tests/seccomp/forbids-subprocess): New unit tests.

* test/Makefile.in (src/emacs-tests.log): Add dependency on the helper
binary.
.gitignore
configure.ac
lib-src/Makefile.in
lib-src/seccomp-filter.c [new file with mode: 0644]
test/Makefile.in
test/src/emacs-resources/seccomp-filter.bpf [new symlink]
test/src/emacs-tests.el