diff options
author | Denys Vlasenko | 2011-03-12 06:08:28 +0100 |
---|---|---|
committer | Denys Vlasenko | 2011-03-12 06:08:28 +0100 |
commit | 5c942713b7369d239b1303c0cfc7049d898564d4 (patch) | |
tree | d81670baa8f214eb50b525016a8ec50bc7c7bbd5 /libbb | |
parent | 9ac5596a5154d789964150737a784dc4db98265b (diff) | |
download | busybox-5c942713b7369d239b1303c0cfc7049d898564d4.zip busybox-5c942713b7369d239b1303c0cfc7049d898564d4.tar.gz |
busybox: fail if --install is not given an absolute path
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | 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 |