Displaying 1 result from an estimated 1 matches for "e3e6791".
Did you mean:
136791
2008 Jul 13
1
bunch of small fixes
...directory
/usr/lib/klibc/bin/chroot / /bin/pwd
/home/max
./src/klibc/usr/utils/static/chroot / pwd
/
Cc: Colin Watson <cjwatson at ubuntu.com>
Signed-off-by: maximilian attems <max at stro.at>
diff --git a/usr/utils/chroot.c b/usr/utils/chroot.c
index e3e6791..bc1b94f 100644
--- a/usr/utils/chroot.c
+++ b/usr/utils/chroot.c
@@ -16,8 +16,13 @@ int main(int argc, char *argv[], char *envp[])
return 1;
}
- if (execve(argv[2], argv + 2, envp) == -1) {
- perror("execve");
+ if (chdir("/") == -1) {
+ perror("chdir");
+ r...