libcap_progs: fix bash path
* in progs/capsh.c is the bash path hardcoded to '/bin/bash' * this fix set's the path to '/var/run/current-system/sw/bin/bash'
This commit is contained in:
parent
f8038b0c6c
commit
eb54864494
15
pkgs/os-specific/linux/libcap/progs-bash-path.patch
Normal file
15
pkgs/os-specific/linux/libcap/progs-bash-path.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
this patch set the bash path from '/bin/bash' to '/var/run/current-system/sw/bin/bash'
|
||||||
|
|
||||||
|
diff --git a/progs/capsh.c b/progs/capsh.c
|
||||||
|
index 52336d7..fd98a03 100644
|
||||||
|
--- a/progs/capsh.c
|
||||||
|
+++ b/progs/capsh.c
|
||||||
|
@@ -556,7 +556,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
} else if ((!strcmp("--", argv[i])) || (!strcmp("==", argv[i]))) {
|
||||||
|
- argv[i] = strdup(argv[i][0] == '-' ? "/bin/bash" : argv[0]);
|
||||||
|
+ argv[i] = strdup(argv[i][0] == '-' ? "/var/run/current-system/sw/bin/bash" : argv[0]);
|
||||||
|
argv[argc] = NULL;
|
||||||
|
execve(argv[i], argv+i, envp);
|
||||||
|
fprintf(stderr, "execve /bin/bash failed!\n");
|
@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ libcap ];
|
buildInputs = [ libcap ];
|
||||||
|
|
||||||
|
patches = [ ./progs-bash-path.patch ];
|
||||||
|
|
||||||
preConfigure = "cd progs";
|
preConfigure = "cd progs";
|
||||||
|
|
||||||
installFlags = "RAISE_SETFCAP=no";
|
installFlags = "RAISE_SETFCAP=no";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user