From 26e5aab82f5f460a5c1ac95fbf48f5662ae9f94e Mon Sep 17 00:00:00 2001 From: edef Date: Fri, 9 Dec 2022 15:57:01 +0000 Subject: [PATCH] ledger-live-desktop: drop systemd override systemd v252 has loosened the relevant check when in a user namespace, so the patch is no longer necessary. The AppImage runtime FHS provides libudev and libsystemd, so we don't need to provide our own anymore. Change-Id: Iee2bb2dffb390c2190f7fe0115e91436999a609d --- .../blockchains/ledger-live-desktop/default.nix | 12 ------------ .../blockchains/ledger-live-desktop/systemd.patch | 14 -------------- 2 files changed, 26 deletions(-) delete mode 100644 pkgs/applications/blockchains/ledger-live-desktop/systemd.patch diff --git a/pkgs/applications/blockchains/ledger-live-desktop/default.nix b/pkgs/applications/blockchains/ledger-live-desktop/default.nix index 3bed576e5dbf..86815bd55bab 100644 --- a/pkgs/applications/blockchains/ledger-live-desktop/default.nix +++ b/pkgs/applications/blockchains/ledger-live-desktop/default.nix @@ -12,22 +12,10 @@ let appimageContents = appimageTools.extractType2 { inherit pname version src; }; - - # Hotplug events from udevd are fired into the kernel, which then re-broadcasts them over a - # special socket, to every libudev client listening for hotplug when the kernel does that. It will - # try to preserve the uid of the sender but a non-root namespace (like the fhs-env) cant map root - # to a uid, for security reasons, so the uid of the sender becomes nobody and libudev actively - # rejects such messages. This patch disables that bit of security in libudev. - # See: https://github.com/NixOS/nixpkgs/issues/116361 - systemdPatched = systemd.overrideAttrs ({ patches ? [ ], ... }: { - patches = patches ++ [ ./systemd.patch ]; - }); in appimageTools.wrapType2 rec { inherit pname version src; - extraPkgs = pkgs: [ systemdPatched ]; - extraInstallCommands = '' mv $out/bin/${pname}-${version} $out/bin/${pname} install -m 444 -D ${appimageContents}/ledger-live-desktop.desktop $out/share/applications/ledger-live-desktop.desktop diff --git a/pkgs/applications/blockchains/ledger-live-desktop/systemd.patch b/pkgs/applications/blockchains/ledger-live-desktop/systemd.patch deleted file mode 100644 index a70053d71180..000000000000 --- a/pkgs/applications/blockchains/ledger-live-desktop/systemd.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/libsystemd/sd-device/device-monitor.c b/src/libsystemd/sd-device/device-monitor.c -index fd5900704d..f9106fdbe5 100644 ---- a/src/libsystemd/sd-device/device-monitor.c -+++ b/src/libsystemd/sd-device/device-monitor.c -@@ -445,9 +445,6 @@ int device_monitor_receive_device(sd_device_monitor *m, sd_device **ret) { - "sd-device-monitor: No sender credentials received, message ignored."); - - cred = (struct ucred*) CMSG_DATA(cmsg); -- if (cred->uid != 0) -- return log_debug_errno(SYNTHETIC_ERRNO(EAGAIN), -- "sd-device-monitor: Sender uid="UID_FMT", message ignored.", cred->uid); - - if (streq(buf.raw, "libudev")) { - /* udev message needs proper version magic */