From baa243d508601dc42123df4074419a1b8286c77a Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Sun, 22 Dec 2019 19:50:41 -0500 Subject: [PATCH] linux: Fix request-key for 4.4 and 4.9 --- pkgs/os-specific/linux/kernel/patches.nix | 5 +++++ .../linux/kernel/request-key-helper-updated.patch | 13 +++++++++++++ pkgs/top-level/all-packages.nix | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 pkgs/os-specific/linux/kernel/request-key-helper-updated.patch diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index 4ec232d6255..2af64c2ddc4 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -11,6 +11,11 @@ patch = ./request-key-helper.patch; }; + request_key_helper_updated = + { name = "request-key-helper-updated"; + patch = ./request-key-helper-updated.patch; + }; + p9_fixes = { name = "p9-fixes"; patch = ./p9-fixes.patch; diff --git a/pkgs/os-specific/linux/kernel/request-key-helper-updated.patch b/pkgs/os-specific/linux/kernel/request-key-helper-updated.patch new file mode 100644 index 00000000000..aabb9e801be --- /dev/null +++ b/pkgs/os-specific/linux/kernel/request-key-helper-updated.patch @@ -0,0 +1,13 @@ +diff --git a/security/keys/request_key.c b/security/keys/request_key.c +index 88172c163953..4da74a1eebb2 100644 +--- a/security/keys/request_key.c ++++ b/security/keys/request_key.c +@@ -161,7 +161,7 @@ static int call_sbin_request_key(struct key_construction *cons, + + /* set up the argument list */ + i = 0; +- argv[i++] = "/sbin/request-key"; ++ argv[i++] = "/run/current-system/sw/bin/request-key"; + argv[i++] = (char *) op; + argv[i++] = key_str; + argv[i++] = uid_str; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5d4ad15d44f..a7e405e20cb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16221,7 +16221,7 @@ in linux_4_4 = callPackage ../os-specific/linux/kernel/linux-4.4.nix { kernelPatches = [ kernelPatches.bridge_stp_helper - kernelPatches.request_key_helper + kernelPatches.request_key_helper_updated kernelPatches.cpu-cgroup-v2."4.4" kernelPatches.modinst_arg_list_too_long # https://github.com/NixOS/nixpkgs/issues/42755 @@ -16235,7 +16235,7 @@ in linux_4_9 = callPackage ../os-specific/linux/kernel/linux-4.9.nix { kernelPatches = [ kernelPatches.bridge_stp_helper - kernelPatches.request_key_helper + kernelPatches.request_key_helper_updated kernelPatches.cpu-cgroup-v2."4.9" kernelPatches.modinst_arg_list_too_long ];