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.
This commit is contained in:
snicket2100 2020-11-21 13:16:51 +01:00
parent 48c25e5dc9
commit ffeb2af920

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, fetchpatch, which, nixosTests}: {stdenv, fetchurl, fetchpatch, which, xdg-dbus-proxy, nixosTests}:
let let
s = # Generated upstream information s = # Generated upstream information
rec { rec {
@ -25,6 +25,10 @@ stdenv.mkDerivation {
substituteInPlace etc/firejail.config --replace \ substituteInPlace etc/firejail.config --replace \
'# follow-symlink-as-user yes' \ '# follow-symlink-as-user yes' \
'follow-symlink-as-user no' '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 = '' preConfigure = ''