projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
libbb: make xchroot do a chdir("/") after chroot
[oweals/busybox.git]
/
libbb
/
xfuncs_printf.c
diff --git
a/libbb/xfuncs_printf.c
b/libbb/xfuncs_printf.c
index 56ee459e45ffa4549692642646f7207ac19de5ce..d8a42ba0bccb00a49fd250606965402cd7830c21 100644
(file)
--- a/
libbb/xfuncs_printf.c
+++ b/
libbb/xfuncs_printf.c
@@
-362,6
+362,7
@@
void FAST_FUNC xchroot(const char *path)
{
if (chroot(path))
bb_perror_msg_and_die("can't change root directory to %s", path);
+ xchdir("/");
}
// Print a warning message if opendir() fails, but don't die.