diff options
| author | Philipp Stephani | 2020-12-17 11:20:55 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2021-04-10 21:01:46 +0200 |
| commit | f3a7536aa29e6690c66f69174079ba51d40c0443 (patch) | |
| tree | 5f16989652dc6294245f5dc767bbf51cfd9a7983 /configure.ac | |
| parent | 2d17e0124e4232db6344b18cec466eb31920e675 (diff) | |
| download | emacs-scratch/seccomp-helper-binary.tar.gz emacs-scratch/seccomp-helper-binary.zip | |
Add a helper binary to create a basic Secure Computing filter.scratch/seccomp-helper-binary
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.
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 684788a4d33..0c4772a2b96 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -4181,6 +4181,11 @@ AC_SUBST([LIBS_MAIL]) | |||
| 4181 | 4181 | ||
| 4182 | AC_CHECK_HEADERS([linux/seccomp.h], [HAVE_SECCOMP=yes]) | 4182 | AC_CHECK_HEADERS([linux/seccomp.h], [HAVE_SECCOMP=yes]) |
| 4183 | 4183 | ||
| 4184 | LIBSECCOMP= | ||
| 4185 | AC_CHECK_HEADER([seccomp.h], | ||
| 4186 | [AC_CHECK_LIB([seccomp], [seccomp_init], [LIBSECCOMP=-lseccomp])]) | ||
| 4187 | AC_SUBST([LIBSECCOMP]) | ||
| 4188 | |||
| 4184 | OLD_LIBS=$LIBS | 4189 | OLD_LIBS=$LIBS |
| 4185 | LIBS="$LIB_PTHREAD $LIB_MATH $LIBS" | 4190 | LIBS="$LIB_PTHREAD $LIB_MATH $LIBS" |
| 4186 | AC_CHECK_FUNCS(accept4 fchdir gethostname \ | 4191 | AC_CHECK_FUNCS(accept4 fchdir gethostname \ |