diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-03-08 03:28:24 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-03-08 03:28:24 +0400 |
commit | 0687a5b496a05cbc06f3bcdc517a2e6cabc535df (patch) | |
tree | 55aedfacfddad2faafb75c4bee0d98122325df5c /libbb | |
parent | 39c2cb2e93e2acc75a5eb6dd91d81f79c787acd5 (diff) |
libbb: make xchroot do a chdir("/") after chroot
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/xfuncs_printf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c index 56ee459e4..d8a42ba0b 100644 --- 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. |