landlock-sandboxer: remove startup messages for 6.9

This commit is contained in:
Colin 2024-05-30 08:43:39 +00:00
parent 274a7821a7
commit 2233622bb7

View File

@ -15,12 +15,17 @@ stdenv.mkDerivation rec {
version = linux.version;
src = linux.src;
NIX_DEBUG = 6;
buildInputs = [
linuxHeaders # to get the right linux headers!
];
# starting in 6.9, the sandboxer prints diagnostics on startup,
# which is annoying, and also risks breaking some users
postPatch = ''
substituteInPlace samples/landlock/sandboxer.c \
--replace 'fprintf(stderr, "Executing the sandboxed command...\n");' ""
'';
# sourceRoot = "linux-${version}/samples/landlock";
preBuild = ''
cd samples/landlock