svn commit: trunk/busybox/applets

landley at busybox.net landley at busybox.net
Thu Sep 1 00:02:57 UTC 2005


Author: landley
Date: 2005-08-31 17:02:56 -0700 (Wed, 31 Aug 2005)
New Revision: 11301

Log:
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.


Modified:
   trunk/busybox/applets/applets.c


Changeset:
Modified: trunk/busybox/applets/applets.c
===================================================================
--- trunk/busybox/applets/applets.c	2005-08-31 22:27:45 UTC (rev 11300)
+++ trunk/busybox/applets/applets.c	2005-09-01 00:02:56 UTC (rev 11301)
@@ -163,10 +163,6 @@
 
 	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--;
 }
 



More information about the busybox-cvs mailing list