diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-25 18:25:24 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-25 18:25:24 +0000 |
commit | 737d131e5e7a795ef771f987d7b02cbf4fa670d6 (patch) | |
tree | 0a7acc833d9ee4fa873ec4c15ff60b692bef420e /applets/applets.c | |
parent | 52226771760063acdc89ef4f8e531b595ae4232b (diff) | |
download | busybox-w32-737d131e5e7a795ef771f987d7b02cbf4fa670d6.tar.gz busybox-w32-737d131e5e7a795ef771f987d7b02cbf4fa670d6.tar.bz2 busybox-w32-737d131e5e7a795ef771f987d7b02cbf4fa670d6.zip |
support "#!/bin/busybox"-style wrappers. Needed for SELinux.
Patch by Yuichi Nakamura <ynakam@hitachisoft.jp>
Diffstat (limited to 'applets/applets.c')
-rw-r--r-- | applets/applets.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/applets/applets.c b/applets/applets.c index 6de6db3cd..c2040b9a3 100644 --- a/applets/applets.c +++ b/applets/applets.c | |||
@@ -600,9 +600,10 @@ static int busybox_main(char **argv) | |||
600 | /* "busybox <applet> arg1 arg2 ..." */ | 600 | /* "busybox <applet> arg1 arg2 ..." */ |
601 | argv++; | 601 | argv++; |
602 | } | 602 | } |
603 | /* we want "<argv[0]>: applet not found", not "busybox: ..." */ | 603 | /* We support "busybox /a/path/to/applet args..." too. Allows for |
604 | applet_name = argv[0]; | 604 | * "#!/bin/busybox"-style wrappers */ |
605 | run_applet_and_exit(argv[0], argv); | 605 | applet_name = bb_get_last_path_component(argv[0]); |
606 | run_applet_and_exit(applet_name, argv); | ||
606 | bb_error_msg_and_die("applet not found"); | 607 | bb_error_msg_and_die("applet not found"); |
607 | } | 608 | } |
608 | 609 | ||