libbb: make xchroot do a chdir("/") after chroot

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2012-03-08 00:28:24 +01:00
parent 39c2cb2e93
commit 0687a5b496
6 changed files with 6 additions and 8 deletions

View File

@@ -417,8 +417,7 @@ int chpst_main(int argc UNUSED_PARAM, char **argv)
}
if (opt & OPT_root) {
xchdir(root);
xchroot(".");
xchroot(root);
}
if (opt & OPT_u) {