From 0687a5b496a05cbc06f3bcdc517a2e6cabc535df Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 8 Mar 2012 00:28:24 +0100 Subject: libbb: make xchroot do a chdir("/") after chroot Signed-off-by: Denys Vlasenko --- util-linux/switch_root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util-linux/switch_root.c') diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index db6ae3542..a301b365b 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c @@ -114,7 +114,7 @@ int switch_root_main(int argc UNUSED_PARAM, char **argv) } xchroot("."); // The chdir is needed to recalculate "." and ".." links - xchdir("/"); + /*xchdir("/"); - done in xchroot */ // If a new console specified, redirect stdin/stdout/stderr to it if (console) { -- cgit v1.2.3