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:
parent
236f7fd20d
commit
73ec7f243f
|
@ -10,8 +10,11 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ libcap ];
|
buildInputs = [ libcap ];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
BASH=$(type -tp bash)
|
# use relative bash path
|
||||||
substituteInPlace progs/capsh.c --replace "/bin/bash" "$BASH"
|
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";
|
preConfigure = "cd progs";
|
||||||
|
|
Loading…
Reference in New Issue