From 99912ca733dd960f5589227fd999c86e73c8e894 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 10 Apr 2007 15:43:37 +0000 Subject: audit small applets and mark some of them as NOFORK. Put big scary warnings in relevant places. --- coreutils/chroot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'coreutils/chroot.c') 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"; } -- cgit v1.2.3