linux: patch request-key binary path

This is necessary for id mapping to work with NFS + Kerberos, and also
touches #68106 and 634638.

Changed files
+32
pkgs
os-specific
top-level
+5
pkgs/os-specific/linux/kernel/patches.nix
···
patch = ./bridge-stp-helper.patch;
};
+
request_key_helper =
+
{ name = "request-key-helper";
+
patch = ./request-key-helper.patch;
+
};
+
p9_fixes =
{ name = "p9-fixes";
patch = ./p9-fixes.patch;
+13
pkgs/os-specific/linux/kernel/request-key-helper.patch
···
+
diff --git a/security/keys/request_key.c b/security/keys/request_key.c
+
index 957b9e3e1492..5436a0d8b81d 100644
+
--- a/security/keys/request_key.c
+
+++ b/security/keys/request_key.c
+
@@ -114,7 +114,7 @@ static int call_usermodehelper_keys(const char *path, char **argv, char **envp,
+
*/
+
static int call_sbin_request_key(struct key *authkey, void *aux)
+
{
+
- static char const request_key[] = "/sbin/request-key";
+
+ static char const request_key[] = "/run/current-system/sw/bin/request-key";
+
struct request_key_auth *rka = get_request_key_auth(authkey);
+
const struct cred *cred = current_cred();
+
key_serial_t prkey, sskey;
+14
pkgs/top-level/all-packages.nix
···
linux_mptcp_94 = callPackage ../os-specific/linux/kernel/linux-mptcp-94.nix {
kernelPatches =
[ kernelPatches.bridge_stp_helper
+
kernelPatches.request_key_helper
kernelPatches.cpu-cgroup-v2."4.11"
kernelPatches.modinst_arg_list_too_long
···
linux_rpi1 = callPackage ../os-specific/linux/kernel/linux-rpi.nix {
kernelPatches = with kernelPatches; [
bridge_stp_helper
+
request_key_helper
rpiVersion = 1;
···
linux_rpi2 = callPackage ../os-specific/linux/kernel/linux-rpi.nix {
kernelPatches = with kernelPatches; [
bridge_stp_helper
+
request_key_helper
rpiVersion = 2;
···
linux_rpi3 = callPackage ../os-specific/linux/kernel/linux-rpi.nix {
kernelPatches = with kernelPatches; [
bridge_stp_helper
+
request_key_helper
rpiVersion = 3;
···
linux_rpi4 = callPackage ../os-specific/linux/kernel/linux-rpi.nix {
kernelPatches = with kernelPatches; [
bridge_stp_helper
+
request_key_helper
rpiVersion = 4;
···
linux_4_4 = callPackage ../os-specific/linux/kernel/linux-4.4.nix {
kernelPatches =
[ kernelPatches.bridge_stp_helper
+
kernelPatches.request_key_helper
kernelPatches.cpu-cgroup-v2."4.4"
kernelPatches.modinst_arg_list_too_long
# https://github.com/NixOS/nixpkgs/issues/42755
···
linux_4_9 = callPackage ../os-specific/linux/kernel/linux-4.9.nix {
kernelPatches =
[ kernelPatches.bridge_stp_helper
+
kernelPatches.request_key_helper
kernelPatches.cpu-cgroup-v2."4.9"
kernelPatches.modinst_arg_list_too_long
···
linux_4_14 = callPackage ../os-specific/linux/kernel/linux-4.14.nix {
kernelPatches =
[ kernelPatches.bridge_stp_helper
+
kernelPatches.request_key_helper
# See pkgs/os-specific/linux/kernel/cpu-cgroup-v2-patches/README.md
# when adding a new linux version
kernelPatches.cpu-cgroup-v2."4.11"
···
linux_4_19 = callPackage ../os-specific/linux/kernel/linux-4.19.nix {
kernelPatches =
[ kernelPatches.bridge_stp_helper
+
kernelPatches.request_key_helper
kernelPatches.modinst_arg_list_too_long
kernelPatches.export_kernel_fpu_functions."4.14"
···
linux_5_3 = callPackage ../os-specific/linux/kernel/linux-5.3.nix {
kernelPatches = [
kernelPatches.bridge_stp_helper
+
kernelPatches.request_key_helper
kernelPatches.export_kernel_fpu_functions."5.3"
···
linux_5_4 = callPackage ../os-specific/linux/kernel/linux-5.4.nix {
kernelPatches = [
kernelPatches.bridge_stp_helper
+
kernelPatches.request_key_helper
linux_testing = callPackage ../os-specific/linux/kernel/linux-testing.nix {
kernelPatches = [
kernelPatches.bridge_stp_helper
+
kernelPatches.request_key_helper
linux_testing_bcachefs = callPackage ../os-specific/linux/kernel/linux-testing-bcachefs.nix {
kernelPatches =
[ kernelPatches.bridge_stp_helper
+
kernelPatches.request_key_helper
kernelPatches.modinst_arg_list_too_long
···
linux_hardkernel_4_14 = callPackage ../os-specific/linux/kernel/linux-hardkernel-4.14.nix {
kernelPatches = [
kernelPatches.bridge_stp_helper
+
kernelPatches.request_key_helper
kernelPatches.modinst_arg_list_too_long