From: Rob Landley Date: Thu, 1 Sep 2005 00:02:56 +0000 (-0000) Subject: Busybox should only multiplex based on argv[1] when it's called as "busybox". X-Git-Tag: 1_1_0~800 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=91397707645a63cf2e8290d21f5fc5e41dfa4a25;p=oweals%2Fbusybox.git 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. --- 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) exit ((*(applet_using->main)) (argc, argv)); } - /* Just in case they have renamed busybox - Check argv[1] */ - if (recurse_level == 1) { - run_applet_by_name ("busybox", argc, argv); - } recurse_level--; }