diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-03-08 00:28:24 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-03-08 00:28:24 +0100 |
commit | 0687a5b496a05cbc06f3bcdc517a2e6cabc535df (patch) | |
tree | 55aedfacfddad2faafb75c4bee0d98122325df5c /util-linux/switch_root.c | |
parent | 39c2cb2e93e2acc75a5eb6dd91d81f79c787acd5 (diff) | |
download | busybox-w32-0687a5b496a05cbc06f3bcdc517a2e6cabc535df.tar.gz busybox-w32-0687a5b496a05cbc06f3bcdc517a2e6cabc535df.tar.bz2 busybox-w32-0687a5b496a05cbc06f3bcdc517a2e6cabc535df.zip |
libbb: make xchroot do a chdir("/") after chroot
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/switch_root.c')
-rw-r--r-- | util-linux/switch_root.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
114 | } | 114 | } |
115 | xchroot("."); | 115 | xchroot("."); |
116 | // The chdir is needed to recalculate "." and ".." links | 116 | // The chdir is needed to recalculate "." and ".." links |
117 | xchdir("/"); | 117 | /*xchdir("/"); - done in xchroot */ |
118 | 118 | ||
119 | // If a new console specified, redirect stdin/stdout/stderr to it | 119 | // If a new console specified, redirect stdin/stdout/stderr to it |
120 | if (console) { | 120 | if (console) { |