aboutsummaryrefslogtreecommitdiff
path: root/coreutils/chroot.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-04-10 15:43:37 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-04-10 15:43:37 +0000
commit99912ca733dd960f5589227fd999c86e73c8e894 (patch)
tree9df947fc08884d498cf76a02204d74b121064134 /coreutils/chroot.c
parentff131b980d524a33d8a43cefe65e14f64a43f2da (diff)
downloadbusybox-99912ca733dd960f5589227fd999c86e73c8e894.tar.gz
audit small applets and mark some of them as NOFORK.
Put big scary warnings in relevant places.
Diffstat (limited to 'coreutils/chroot.c')
-rw-r--r--coreutils/chroot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index fcd70f21a..874ee917e 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -27,8 +27,9 @@ int chroot_main(int argc, char **argv)
++argv;
if (argc == 2) {
argv -= 2;
- if (!(*argv = getenv("SHELL"))) {
- *argv = (char *) DEFAULT_SHELL;
+ argv[0] = getenv("SHELL");
+ if (!argv[0]) {
+ argv[0] = (char *) DEFAULT_SHELL;
}
argv[1] = (char *) "-i";
}