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:
j-keck 2015-02-02 21:22:06 +01:00
parent f8038b0c6c
commit eb54864494
2 changed files with 17 additions and 0 deletions

View 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");

View File

@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
buildInputs = [ libcap ];
patches = [ ./progs-bash-path.patch ];
preConfigure = "cd progs";
installFlags = "RAISE_SETFCAP=no";