From ffeb2af9209b25c367fd39a7f693188e3715e51b Mon Sep 17 00:00:00 2001 From: snicket2100 <57048005+snicket2100@users.noreply.github.com> Date: Sat, 21 Nov 2020 13:16:51 +0100 Subject: [PATCH] firejail: fixing the 'xdg-dbus-proxy' dependency xdg-dbus-proxy path is hardcoded in the common.h file in the firejail source code. if this binary is not found, dbus filtering capabilities of firejail get limited i.e. you can only entirely disable or entirely enable dbus communication. --- pkgs/os-specific/linux/firejail/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/firejail/default.nix b/pkgs/os-specific/linux/firejail/default.nix index 497314a6d44a..fadf5df7140a 100644 --- a/pkgs/os-specific/linux/firejail/default.nix +++ b/pkgs/os-specific/linux/firejail/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, fetchpatch, which, nixosTests}: +{stdenv, fetchurl, fetchpatch, which, xdg-dbus-proxy, nixosTests}: let s = # Generated upstream information rec { @@ -25,6 +25,10 @@ stdenv.mkDerivation { substituteInPlace etc/firejail.config --replace \ '# follow-symlink-as-user yes' \ 'follow-symlink-as-user no' + + # Fix the path to 'xdg-dbus-proxy' hardcoded in the 'common.h' file + substituteInPlace src/include/common.h \ + --replace '/usr/bin/xdg-dbus-proxy' '${xdg-dbus-proxy}/bin/xdg-dbus-proxy' ''; preConfigure = ''