From 94f00041f0cd3916be55bc90367a3e160717533f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 4 Sep 2022 13:46:35 +0200 Subject: [PATCH] nixos/paperless: Allow mbind syscall in paperless-web.services After uploading a document through the webinterface I started seeing it killed through the SYSBUS signal. Inspecting the call trace led me to liblapack's memory allocator, that uses the mbind syscall on Linux. --- nixos/modules/services/misc/paperless.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix index fbf1338a0dff..c17bde0da33c 100644 --- a/nixos/modules/services/misc/paperless.nix +++ b/nixos/modules/services/misc/paperless.nix @@ -287,8 +287,8 @@ in AmbientCapabilities = "CAP_NET_BIND_SERVICE"; CapabilityBoundingSet = "CAP_NET_BIND_SERVICE"; - # gunicorn needs setuid - SystemCallFilter = defaultServiceConfig.SystemCallFilter ++ [ "@setuid" ]; + # gunicorn needs setuid, liblapack needs mbind + SystemCallFilter = defaultServiceConfig.SystemCallFilter ++ [ "@setuid mbind" ]; # Needs to serve web page PrivateNetwork = false; };