libcap_progs: fix bash path

* in progs/capsh.c is the bash path hardcoded to '/bin/bash'.
  * this fix removes the absolute path und use 'execvpe' to call 'bash'.
This commit is contained in:
j-keck 2015-02-03 11:11:17 +01:00
parent 236f7fd20d
commit 73ec7f243f

View file

@ -10,8 +10,11 @@ stdenv.mkDerivation rec {
buildInputs = [ libcap ];
prePatch = ''
BASH=$(type -tp bash)
substituteInPlace progs/capsh.c --replace "/bin/bash" "$BASH"
# use relative bash path
substituteInPlace progs/capsh.c --replace "/bin/bash" "bash"
# ensure capsh can find bash in $PATH
substituteInPlace progs/capsh.c --replace execve execvpe
'';
preConfigure = "cd progs";