Commit Graph

53 Commits

Author SHA1 Message Date
Hannu Nyman
d674422a81 busybox: update to 1.28.2
Update busybox to 1.28.2, refresh patches and default config.

* modify 230-add_nslookup_lede.patch as opt_complementary was removed
    Also move nslookup_longopts variable declaration to be inside
    the same conditional as the function itself.
* modify 250-date-k-flag.patch to match upstream (opt_complementary)
* remove 600-cve-2017-16544.patch that is upstreamed

Notes about config changes:
* Some applet-specific LONG_OPTIONS config options were removed
* Config help text indentation changed, caused lots of
  text formatting changes for convert_menuconfig.pl
* convert_defaults.pl moved lots of defaults around, summary of
  actual changes below

New applets/features:
---------------------
ARCH
HEXEDIT
MINIPS
NETCAT
NUKE
RESUME
RUN_INIT
SETFATTR

New options:
------------
FEATURE_CATN
FEATURE_CROND_SPECIAL_TIMES
FEATURE_LIBBUSYBOX_STATIC
FEATURE_SETPRIV_CAPABILITIES
FEATURE_SETPRIV_CAPABILITY_NAMES
FEATURE_SETPRIV_DUMP
FEATURE_SH_READ_FRAC
FEATURE_SWAPONOFF_LABEL
FEATURE_VOLUMEID_MINIX
FEATURE_XARGS_SUPPORT_ARGS_FILE
FEATURE_XARGS_SUPPORT_PARALLEL
HUSH_GETOPTS
HUSH_READONLY
HUSH_TIMES

Removed:
--------
FEATURE_HAVE_RPC
MSH

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-04-03 23:26:45 +02:00
Matthias Schiffer
b8d9a064f0
busybox: remove i386-specific build flags
busybox tries to be smart and passes a number of additional flags to the
compiler. Unfortunately, the i386-specific flags break ABI compatiblity
with libc.

Fixes busybox crashes observed on x86-generic with GCC 7.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-03-12 12:49:03 +01:00
Kevin Darbyshire-Bryant
b61a648e4a busybox: clean up patch fuzz
Refresh patches to tidy up fuzz.  No functional changes

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2018-01-05 10:35:51 +01:00
John Crispin
7c0a2bc930 busybox: backport cve-2017-16544 fix
In the add_match function in libbb/lineedit.c in BusyBox through 1.27.2,
the tab autocomplete feature of the shell, used to get a list of filenames
in a directory, does not sanitize filenames and results in executing any
escape sequence in the terminal. This could potentially result in code
execution, arbitrary file writes, or other attacks.

Fixes: FS#1181 - CVE-2017-16544:

Backport the patch from:
https://git.busybox.net/busybox/commit/?id=c3797d40a1c57352192c6106cc0f435e7d9c11e8
https://nvd.nist.gov/vuln/detail/CVE-2017-16544

Signed-off-by: Derek Werthmuller <thewerthfam@gmail.com>
Signed-off-by: John Crispin <john@phrozen.org>
2018-01-02 07:14:08 +01:00
Zoltan HERPAI
d1ba483472 merge: busybox: update CONFIG_NSLOOKUP in busybox config and respective patch
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2017-12-08 19:41:18 +01:00
Magnus Kroken
89f8a01dab busybox: update to 1.27.2
Refresh patches, delete patches backported from upstream.

This fixes ntpd sync issues (ntpd would not sync if the first provided
peer address was unreachable).

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-08-30 22:34:41 +02:00
Daniel Golle
a3c0d5f70a busybox: move passwd applet to /bin
busybox currently installs passwd into /usr/bin which prevents its
'full' shadow-utils variant from being installed.
Move the passwd applet to /bin to avoid that collision.
shadow also provides /usr/bin/login which doesn't collide with busybox
as the busybox login applet is installed at /bin/login.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-08-30 18:12:48 +02:00
Daniel Golle
a63eb74bce busybox: move traceroute applets to /bin
busybox currently installs traceroute and traceroute6 into /usr/bin
which prevents their 'full' iputils variants from being installed.
Move those applets to /bin so they can coexist with their iputils
siblings using the same PATH convention already applied for coreutils
and other drop-in 'full' versions.
Refresh existing patch while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-08-30 18:12:48 +02:00
Stefan Tomanek
de6ff15129 busybox: backport 'ip rule suppress_{prefixlength, ifgroup}'
This is a backport from the busybox repository
(192dce4b84fb32346ebc5194de7daa5da3b8d1b4); it enables the use of the
suppress_{prefixlength,ifgroup} flags for policy routing rules.

Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
2017-06-24 13:11:19 +02:00
Jo-Philipp Wich
76871a8dbb busybox: nslookup_lede: mimic output format of old Busybox applet
When invoking "nslookup_lede" with a domain argument and without explicit
query type, issue both A and AAAA queries and display the resulting IP
addresses in a numbered list style, similar to how the old BusyBox nslookup
used to output the records.

This is required for compatibility with certain scripts.

Ref: https://forum.lede-project.org/t/nslookup-ipv6-in-lede-17-01-1

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-27 10:44:28 +02:00
Jo-Philipp Wich
f1e3285461 busybox: nslookup_lede: fix compatibility with v1.25
The ":*" optstring syntax was only recently introduced with BusyBox v1.26,
older versions need a corresponding hint in the "opt_complementary" variable
to denote flag values that should be stored as llist entries.

Add the required opt_complementary entry to fix random SIGBUS, SIGILL or
SIGSEGV related crashes on BusyBox 1.25.x when attempting to use the "-q"
flag of the "nslookup_lede" applet.

Ref: https://forum.lede-project.org/t/nslookup-ipv6-in-lede-17-01-1

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-27 10:44:28 +02:00
Jo-Philipp Wich
8ed5c6d3b1 busybox: fix build of nslookup_lede applet without IPv6 (#728)
Protect any IPv6 related with appropriate guards to fix compilation with
disabled IPv6 support in Busybox.

Fixes #728.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-21 13:20:24 +02:00
Florian Fainelli
7ae58bebc8 busybox: Move libresolv detection to LEDE Makefile
Since the LEDE nslookup applet is already specific to LEDE, move the
libresolv detection into the busybox Makefile that LEDE uses.

This fixes builds with external toolchains that don't automatically
search for headers and/or libraries without being told so.

Fixes: de5b8e5d2f ("busybox: add musl compatible nslookup replacement")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-04-12 09:12:18 -07:00
Jo-Philipp Wich
de5b8e5d2f busybox: add musl compatible nslookup replacement
Add an alternative nslookup applet implementation which is compatible with
musl libc wrt. name server selection and which supports a number of additional
features such as query type selection.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-10 13:19:54 +02:00
Yousong Zhou
f3474ca130 busybox: vi: backporting patches to fix ZZ and :x command
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-03-25 13:18:10 +08:00
Magnus Kroken
84da2a677a busybox: update to 1.26.2
Refresh patches, delete patches that have been applied upstream.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [fix defaults]
2017-01-29 14:09:38 +01:00
Magnus Kroken
5d2a9d2a3a busybox: convert netmsg and lock applet to "new style" applet definition
The "new style" busybox applet approach moves all config and build
definitions related to an applet to its .c file. This makes the
patches easier to maintain, as they only add new files to the busybox
build directory, without modifying BusyBox files.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2017-01-29 14:09:36 +01:00
Stijn Tintel
39f8e46bb4 busybox: add upstream patch to fix send_to_from
This fixes ntpd when queries are sent to secondary IPv4 IP addresses.
See https://bugs.busybox.net/show_bug.cgi?id=9146

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-10-15 20:45:10 +03:00
Stijn Tintel
859d30d521 busybox: update to version 1.25.1
Dropped upstream patches:
000-busybox-1.25.0-gzip.patch
000-busybox-1.25.0-ip.patch
000-busybox-1.25.0-ntpd.patch

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-10-15 20:45:10 +03:00
Kevin Darbyshire-Bryant
78ae7d8efd busybox: v1.25.0 upstream patches
Include upstream patches for gzip, ip & ntpd.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2016-09-27 17:50:22 +02:00
Jo-Philipp Wich
8badcba229 iproute: properly support high routing table IDs
The Linux kernel uses two distinct fields to denote the routing table ID in
use by network routes; the 8 bit `rtm_table` member of `struct rtmsg` and the
32 bit `RTA_TABLE` netlink attribute.

If a routing table ID is larger than 255, the `RT_TABLE` attribute must be used
and the `rtm_table` field has to be set to the special `RT_TABLE_UNSPEC` value.

This commit adds a patch which...
 - switches the *_n2a() and *_a2n() functions of rt_names.c to use dynamically
   sized, name-sorted arrays instead of fixed arrays limited to 1024 slots in
   order to support IDs up to 65535
 - adds proper handling of high table IDs to iprule.c and iproute.c when
   adding, removing and dumping ip rules and network routes

After this change, the Busybox ip applet fully supports IP rules with high ID
numbers, using the same logic as the full iproute2.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-09-27 16:23:06 +02:00
Hauke Mehrtens
06fa1c46fc busybox: update to version 1.25.0
The following patches were removed:
010-networking-fix-uninitialized-memory-when-displaying-.patch
  https://git.busybox.net/busybox/commit/?id=f2c043acfcf9dad9fd3d65821b81f89986bbe54e

030-ip-fix-problem-on-mips64-n64-big-endian-musl-systems.patch
  https://git.busybox.net/busybox/commit/?id=4ab372d49a6e82b0bf097dedb96d26330c5f2d5f

204-udhcpc_src_ip_rebind.patch
  https://git.busybox.net/busybox/commit/?id=abe8f7515aded80889d78c2c1c8947997918cf90

230-ntpd_delayed_resolve.patch
  https://git.busybox.net/busybox/commit/?id=c8641962e4cbde48108ddfc1c105e3320778190d
  https://git.busybox.net/busybox/commit/?id=e4caf1dd9ce8569371a0eeb77ccf02a572dc0f11

260-arping_missing_includes.patch
  Not needed any more, still builds with musl for me.
  Add in 92fd6e6f1a "busybox: fix arping applet building on musl"

The Kconfig files were updated with these commands:
cd config
../convert_menuconfig.pl .../build_dir/target-*/busybox-1.25.0
cd ..
./convert_defaults.pl < .../build_dir/target-*/busybox-1.25.0/.config > Config-defaults.in

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-09-20 22:37:02 +02:00
Hauke Mehrtens
8b5e128250 busybox: libnetlink: fix alignment of netlink messages
A padding to align a message should not only be added between
different attributes of a netlink message, but also at the end of the
message to pad it to the correct size.

Without this patch the following command does not work and returns an
error code:
ip link add type nlmon

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-09-16 23:00:01 +02:00
Felix Fietkau
7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-07 08:58:42 +02:00
Felix Fietkau
46b79085b6 busybox: fix issues with the ip command on mips64
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-12 16:05:23 +02:00
Jo-Philipp Wich
5a7c064bdb busybox: fix setting the kernel timezone
The settimeofday() syscall wrapper provided by musl filters out the timezone
argument, breaking the ability to set the kernel timezone through the function.

Adjust busybox patch to issue the syscall directly in order to circumvent the
problem.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-03-31 15:26:42 +02:00
Felix Fietkau
1510870ad1 busybox: fix route tables in ip rule show output
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48649
2016-02-07 20:15:21 +00:00
Felix Fietkau
e0bfd25295 busybox: fix broken IPv6 address displaying in ifconfig
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48306
2016-01-18 11:11:26 +00:00
Felix Fietkau
1cfa2a6747 busybox: fix non-portable invocation of mktemp
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47289
2015-10-30 15:18:22 +00:00
Felix Fietkau
e35d42e890 busybox: update to version 1.24.1
Patches applied upstream and dropped:
280-fix_find_regression.patch
300-ip-addr-improvements.patch

Fixed upstream:
290-ash-fix-a-regression-in-handling-local-variables.patch (see thread: http://lists.busybox.net/pipermail/busybox/2015-April/082783.html)

Signed-off-by: Magnus Kroken <mkroken@gmail.com>

SVN-Revision: 47288
2015-10-30 15:18:17 +00:00
Felix Fietkau
3670f4128d busybox: lock: implement -n "Fail rather than wait"
lock -n is similiar to flock -n. If the lock was already taken,
fail with exit code = 1 and write error message to stderr.

example:
if ! lock -n /tmp/foo ; then
	echo lock exits.
else
	echo lock was free. But is locked now.
fi
> lock was free. But is locked now.
> lock exists.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

SVN-Revision: 46836
2015-09-09 20:36:10 +00:00
Steven Barth
1fb987e3b8 busybox: fix ip applet and netlink behavior
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46833
2015-09-09 10:38:16 +00:00
Felix Fietkau
0d031aecdf busybox: fix an ash regression in handling local variables
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45471
2015-04-17 00:01:29 +00:00
Felix Fietkau
c99d9afff3 busybox: fix regression in handling non-existant find path arguments (#19439)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45321
2015-04-09 08:02:33 +00:00
Felix Fietkau
c31df6e995 busybox: update to version 1.23.2
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45272
2015-04-04 17:52:02 +00:00
John Crispin
eff1859f8e busybox: Minor fix for glibc 2.21 compatibility
Signed-off-by: Jeff Waugh <jdub@bethesignal.org>

SVN-Revision: 44700
2015-03-12 19:50:23 +00:00
Jo-Philipp Wich
5f65074523 busybox: fix build on FreeBSD 10.1
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44284
2015-02-05 23:32:17 +00:00
Nicolas Thill
1fe7cd5ed9 busybox: add 2 upstream fixes
Signed-off-by: Nicolas Thill <nico@openwrt.org>

SVN-Revision: 43191
2014-11-06 04:44:06 +00:00
Jo-Philipp Wich
2ab0dae991 busybox: make high ASCII chars printable (#7993)
Currently busybox utils like "ls" fail to display filenames containing UTF-8
characters, replacing any special characters with "?".

Change libbb's printable_string() function to allow high ASCII characters so
that unicode filenames are displayed correctls.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 43084
2014-10-27 11:22:15 +00:00
Steven Barth
8f8dc0959c busybox: remove redundant 6rd-patch
SVN-Revision: 40882
2014-05-29 21:50:32 +00:00
Steven Barth
50b663de47 busybox: udhcpc source IP rebind patch
Patch sets the source IP address of DHCP request messages during rebind to the IP address
assigned to the udhcpc client. Source address 0.0.0.0 can only be used by a client prior
to obtaining its IP address (see RFC2131 § 4.1). Source IP address behavior lines up now with
the ISC dhcp client implementation for DHCP request messages during rebind and DHCP release
messages.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

SVN-Revision: 40878
2014-05-29 10:35:34 +00:00
Felix Fietkau
f4f553efa7 busybox: update to 1.22.1
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40852
2014-05-25 17:42:09 +00:00
Felix Fietkau
a54791f2ba busybox: remove obsolete httpd patches
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40851
2014-05-25 17:42:02 +00:00
Felix Fietkau
63f69d0bb9 busybox: remove obsolete insmod patches
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40850
2014-05-25 17:41:59 +00:00
Felix Fietkau
7a13084797 busybox: drop a udhcpc patch that has been superseded by upstream changes a long time ago
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40849
2014-05-25 17:41:55 +00:00
Felix Fietkau
c1187357dc busybox: remove obsolete init patch
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40848
2014-05-25 17:41:52 +00:00
Felix Fietkau
5e341d0d0d busybox: use a config option instead of a patch to select the cron directory
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40847
2014-05-25 17:41:48 +00:00
John Crispin
1966d4942c busybox: backport dd conv=swab from 1.22
Some boards have the WLAN EEPROM stored in flash in big-endian format,
whereas the driver requires the EEPROM in little-endian format. The
conv=swab option in dd is particularly useful in this case. This patch
backports this feature from busybox-1.22 based on the following commits:

commit    b941316ae5313be523b64f0a9151ee4decb2b35b dd: support conv=swab
commit    8395bd3f52f8ed46fa3ffc316b2d113afa748bae dd: fix example in a
comment. No code changes.
commit    5b9910f0a4a1b7976c46e6f849aaa263180e5521 dd: fail if swab is
attempted on odd-sized block
commit    0ff0b320a2dbb5e0b5fa245ffd9b2648d7026843 dd: code shrink

v2: include the commit messages from upstream

Signed-off-by: Matti Laakso <malaakso@elisanet.fi>

SVN-Revision: 40327
2014-03-30 09:16:47 +00:00
Felix Fietkau
dc7ecef0be busybox: remove obsolete brctl linux 2.4 compat patch
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39987
2014-03-21 15:54:34 +00:00
Felix Fietkau
a66d9b7907 busybox: remove obsolete awk include() patch
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39986
2014-03-21 15:54:30 +00:00