commit | 99912ca733dd960f5589227fd999c86e73c8e894 | [log] [tgz] |
---|---|---|
author | Denis Vlasenko <vda.linux@googlemail.com> | Tue Apr 10 15:43:37 2007 +0000 |
committer | Denis Vlasenko <vda.linux@googlemail.com> | Tue Apr 10 15:43:37 2007 +0000 |
tree | 9df947fc08884d498cf76a02204d74b121064134 | |
parent | ff131b980d524a33d8a43cefe65e14f64a43f2da [diff] [blame] |
audit small applets and mark some of them as NOFORK. Put big scary warnings in relevant places.
diff --git a/coreutils/chroot.c b/coreutils/chroot.c index fcd70f2..874ee91 100644 --- a/coreutils/chroot.c +++ b/coreutils/chroot.c
@@ -27,8 +27,9 @@ ++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"; }