[git commit master 1/1] busybox: fail if --install is not given an absolute path

Denys Vlasenko vda.linux at googlemail.com
Sat Mar 12 05:08:28 UTC 2011


commit: http://git.busybox.net/busybox/commit/?id=5c942713b7369d239b1303c0cfc7049d898564d4
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 libbb/appletlib.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 69cac2e..fc84d36 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -721,10 +721,9 @@ static int busybox_main(char **argv)
 			 * In such case, better use argv[0] as symlink target
 			 * if it is a full path name.
 			 */
-			if (argv[0][0] == '/')
-				busybox = argv[0];
-			else
-				busybox = bb_busybox_exec_path;
+			if (argv[0][0] != '/')
+				bb_error_msg_and_die("'%s' is not an absolute path", argv[0]);
+			busybox = argv[0];
 		}
 		/* busybox --install [-s] [DIR]:
 		 * -s: make symlinks
-- 
1.7.3.4



More information about the busybox-cvs mailing list