diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-08 21:00:36 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-08 21:00:36 +0100 |
commit | 681efe20d327e9e6774b174a617d66bbb9d21f48 (patch) | |
tree | 4331e443ee303c24364b1655651c8584db8b51c1 /coreutils | |
parent | 86cf0364bd58e07646a23a1128e4a9ea79189579 (diff) | |
download | busybox-w32-681efe20d327e9e6774b174a617d66bbb9d21f48.tar.gz busybox-w32-681efe20d327e9e6774b174a617d66bbb9d21f48.tar.bz2 busybox-w32-681efe20d327e9e6774b174a617d66bbb9d21f48.zip |
use user's shell instead of hardwired "/bin/sh" (android needs this)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/chroot.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/coreutils/chroot.c b/coreutils/chroot.c index b80a12ee0..5ac2e890e 100644 --- a/coreutils/chroot.c +++ b/coreutils/chroot.c | |||
@@ -23,11 +23,9 @@ int chroot_main(int argc UNUSED_PARAM, char **argv) | |||
23 | ++argv; | 23 | ++argv; |
24 | if (!*argv) { /* no 2nd param (PROG), use shell */ | 24 | if (!*argv) { /* no 2nd param (PROG), use shell */ |
25 | argv -= 2; | 25 | argv -= 2; |
26 | argv[0] = getenv("SHELL"); | 26 | argv[0] = (char *) get_shell_name(); |
27 | if (!argv[0]) { | 27 | argv[1] = (char *) "-i"; /* GNU coreutils 8.4 compat */ |
28 | argv[0] = (char *) DEFAULT_SHELL; | 28 | /*argv[2] = NULL; - already is */ |
29 | } | ||
30 | argv[1] = (char *) "-i"; | ||
31 | } | 29 | } |
32 | 30 | ||
33 | BB_EXECVP_or_die(argv); | 31 | BB_EXECVP_or_die(argv); |