diff options
author | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-09-01 00:02:56 +0000 |
---|---|---|
committer | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-09-01 00:02:56 +0000 |
commit | 690578389683b5d54fe86ffb87e180956325d515 (patch) | |
tree | 12fe5f9cfc3e8e7042ebb8009737c72d9fbfadae /applets | |
parent | f3d8de821587526b07865e25c0f4ccf8a23b64d8 (diff) | |
download | busybox-w32-690578389683b5d54fe86ffb87e180956325d515.tar.gz busybox-w32-690578389683b5d54fe86ffb87e180956325d515.tar.bz2 busybox-w32-690578389683b5d54fe86ffb87e180956325d515.zip |
Busybox should only multiplex based on argv[1] when it's called as "busybox".
Otherwise if you build busybox without a given applet you get the wrong error
message when you call it via a symlink to that applet.
(You also get the wrong behavior; it tries to use argv[1] as the command
name just like busybox does for _any_ unknown, and although I doubt
"echo rm -rf *" is common usage there's no upside and enough downside to
make me nervous.)
This fixes it.
git-svn-id: svn://busybox.net/trunk/busybox@11301 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'applets')
-rw-r--r-- | applets/applets.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/applets/applets.c b/applets/applets.c index 9db16b41d..ce9ecbbc5 100644 --- a/applets/applets.c +++ b/applets/applets.c | |||
@@ -163,10 +163,6 @@ run_applet_by_name (const char *name, int argc, char **argv) | |||
163 | 163 | ||
164 | exit ((*(applet_using->main)) (argc, argv)); | 164 | exit ((*(applet_using->main)) (argc, argv)); |
165 | } | 165 | } |
166 | /* Just in case they have renamed busybox - Check argv[1] */ | ||
167 | if (recurse_level == 1) { | ||
168 | run_applet_by_name ("busybox", argc, argv); | ||
169 | } | ||
170 | recurse_level--; | 166 | recurse_level--; |
171 | } | 167 | } |
172 | 168 | ||