aboutsummaryrefslogtreecommitdiff
path: root/libbb/appletlib.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-03-12 06:08:28 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-03-12 06:08:28 +0100
commit5c942713b7369d239b1303c0cfc7049d898564d4 (patch)
treed81670baa8f214eb50b525016a8ec50bc7c7bbd5 /libbb/appletlib.c
parent9ac5596a5154d789964150737a784dc4db98265b (diff)
downloadbusybox-w32-5c942713b7369d239b1303c0cfc7049d898564d4.tar.gz
busybox-w32-5c942713b7369d239b1303c0cfc7049d898564d4.tar.bz2
busybox-w32-5c942713b7369d239b1303c0cfc7049d898564d4.zip
busybox: fail if --install is not given an absolute path
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r--libbb/appletlib.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 69cac2e9a..fc84d36ec 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -721,10 +721,9 @@ static int busybox_main(char **argv)
721 * In such case, better use argv[0] as symlink target 721 * In such case, better use argv[0] as symlink target
722 * if it is a full path name. 722 * if it is a full path name.
723 */ 723 */
724 if (argv[0][0] == '/') 724 if (argv[0][0] != '/')
725 busybox = argv[0]; 725 bb_error_msg_and_die("'%s' is not an absolute path", argv[0]);
726 else 726 busybox = argv[0];
727 busybox = bb_busybox_exec_path;
728 } 727 }
729 /* busybox --install [-s] [DIR]: 728 /* busybox --install [-s] [DIR]:
730 * -s: make symlinks 729 * -s: make symlinks