aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2019-10-28 14:17:41 +0000
committerSean Young <sean@mess.org>2019-10-28 14:47:48 +0000
commitdf74253ba81f39f5945f05f671356aa8fc2a0972 (patch)
tree8e077614418cdd5660ac43793ae134fe2f778823
parent7be954b74136a6bf31fc025c24d4f1db03630cea (diff)
50-rc_keymap.conf prevents debian testing from bootingcond-bpf
If SystemCallFilter is not set for systemd-udevd, then 50-rc_keymap.conf restricts the service to _only_ the bpf syscall, preventing the system from booting. Signed-off-by: Sean Young <sean@mess.org>
-rw-r--r--configure.ac6
-rw-r--r--utils/keytable/Makefile.am2
2 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 01a24a28..8585a79d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -521,6 +521,12 @@ AM_CONDITIONAL([WITH_BPF], [test x$enable_bpf != xno -a x$libelf_pkgcon
AS_IF([test x$enable_libdvbv5 = xno], [AC_SUBST([ENFORCE_LIBDVBV5_STATIC], ["-static"])])
AS_IF([test x$enable_libv4l = xno], [AC_SUBST([ENFORCE_LIBV4L_STATIC], ["-static"])])
+# Since systemd v239, udevd is not allowed to execute BPF systems calls;
+# add an override to allow bpf(2) in that case. On earlier versions, the
+# override will restrict udevd to bpf syscall only and will stop the system
+# from booting. This is also true on current debian versions.
+AM_CONDITIONAL([HAVE_UDEVDSYSCALLFILTER], [grep -s SystemCallFilter $with_systemdsystemunitdir/systemd-udevd.service])
+
# misc
if test "x$linux_os" = "xyes"; then
diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am
index dfcd7609..4724897e 100644
--- a/utils/keytable/Makefile.am
+++ b/utils/keytable/Makefile.am
@@ -3,7 +3,9 @@ man_MANS = ir-keytable.1 rc_keymap.5
sysconf_DATA = rc_maps.cfg
keytablesystem_DATA = $(srcdir)/rc_keymaps/*
udevrules_DATA = 70-infrared.rules
+if HAVE_UDEVDSYSCALLFILTER
systemdsystemunit_DATA = 50-rc_keymap.conf
+endif
ir_keytable_SOURCES = keytable.c parse.h ir-encode.c ir-encode.h toml.c toml.h keymap.c keymap.h

Privacy Policy