diff options
Diffstat (limited to 'package/utils/busybox/patches')
15 files changed, 26 insertions, 234 deletions
diff --git a/package/utils/busybox/patches/001-resource_h_include.patch b/package/utils/busybox/patches/001-resource_h_include.patch index 5e2f1721c4..33e12c8bd4 100644 --- a/package/utils/busybox/patches/001-resource_h_include.patch +++ b/package/utils/busybox/patches/001-resource_h_include.patch @@ -1,6 +1,6 @@ --- a/include/libbb.h +++ b/include/libbb.h -@@ -40,6 +40,7 @@ +@@ -41,6 +41,7 @@ #include <poll.h> #include <sys/ioctl.h> #include <sys/mman.h> diff --git a/package/utils/busybox/patches/010-networking-fix-uninitialized-memory-when-displaying-.patch b/package/utils/busybox/patches/010-networking-fix-uninitialized-memory-when-displaying-.patch deleted file mode 100644 index eabbf3f908..0000000000 --- a/package/utils/busybox/patches/010-networking-fix-uninitialized-memory-when-displaying-.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Felix Fietkau <nbd@nbd.name> -Date: Mon, 18 Jan 2016 12:03:45 +0100 -Subject: [PATCH] networking: fix uninitialized memory when displaying IPv6 - addresses - -After commit 8e74adab0107658e3dc04ed342206272a284f43e -("libbb: make INET[6]_rresolve use sockaddr2{host,dotted}_noport") -INET_sprint6 uses more than just sin6_addr, it also tries to display the -scope id, which is uninitialized when called from ife_print6. - -Signed-off-by: Felix Fietkau <nbd@nbd.name> ---- - ---- a/networking/interface.c -+++ b/networking/interface.c -@@ -881,6 +881,7 @@ static void ife_print6(struct interface - sprintf(addr6, "%s:%s:%s:%s:%s:%s:%s:%s", - addr6p[0], addr6p[1], addr6p[2], addr6p[3], - addr6p[4], addr6p[5], addr6p[6], addr6p[7]); -+ memset(&sap, 0, sizeof(sap)); - inet_pton(AF_INET6, addr6, - (struct sockaddr *) &sap.sin6_addr); - sap.sin6_family = AF_INET6; diff --git a/package/utils/busybox/patches/020-networking-libiproute-fix-displaying-route-table-for.patch b/package/utils/busybox/patches/020-networking-libiproute-fix-displaying-route-table-for.patch index 60027c48ab..68754dee78 100644 --- a/package/utils/busybox/patches/020-networking-libiproute-fix-displaying-route-table-for.patch +++ b/package/utils/busybox/patches/020-networking-libiproute-fix-displaying-route-table-for.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/networking/libiproute/iprule.c +++ b/networking/libiproute/iprule.c -@@ -119,7 +119,9 @@ static int FAST_FUNC print_rule(const st +@@ -114,7 +114,9 @@ static int FAST_FUNC print_rule(const st printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF])); } diff --git a/package/utils/busybox/patches/030-ip-fix-problem-on-mips64-n64-big-endian-musl-systems.patch b/package/utils/busybox/patches/030-ip-fix-problem-on-mips64-n64-big-endian-musl-systems.patch deleted file mode 100644 index 6e25f55881..0000000000 --- a/package/utils/busybox/patches/030-ip-fix-problem-on-mips64-n64-big-endian-musl-systems.patch +++ /dev/null @@ -1,75 +0,0 @@ -From: Szabolcs Nagy <nsz@port70.net> -Date: Sun, 24 Apr 2016 17:39:02 +0200 -Subject: [PATCH] ip: fix problem on mips64 n64 big endian musl systems - -Use designated initializers for struct msghdr. -The struct layout is non-portable and musl libc does not match what busybox expects. - -Signed-off-by: Szabolcs Nagy <nsz@port70.net> -Tested-by: Waldemar Brodkorb <wbx@openadk.org> -Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> ---- - ---- a/networking/libiproute/libnetlink.c -+++ b/networking/libiproute/libnetlink.c -@@ -71,11 +71,15 @@ int FAST_FUNC rtnl_dump_request(struct r - struct nlmsghdr nlh; - struct sockaddr_nl nladdr; - struct iovec iov[2] = { { &nlh, sizeof(nlh) }, { req, len } }; -+ /* Use designated initializers, struct layout is non-portable */ - struct msghdr msg = { -- (void*)&nladdr, sizeof(nladdr), -- iov, 2, -- NULL, 0, -- 0 -+ .msg_name = (void*)&nladdr, -+ .msg_namelen = sizeof(nladdr), -+ .msg_iov = iov, -+ .msg_iovlen = 2, -+ .msg_control = NULL, -+ .msg_controllen = 0, -+ .msg_flags = 0 - }; - - memset(&nladdr, 0, sizeof(nladdr)); -@@ -104,12 +108,15 @@ static int rtnl_dump_filter(struct rtnl_ - while (1) { - int status; - struct nlmsghdr *h; -- -+ /* Use designated initializers, struct layout is non-portable */ - struct msghdr msg = { -- (void*)&nladdr, sizeof(nladdr), -- &iov, 1, -- NULL, 0, -- 0 -+ .msg_name = (void*)&nladdr, -+ .msg_namelen = sizeof(nladdr), -+ .msg_iov = &iov, -+ .msg_iovlen = 1, -+ .msg_control = NULL, -+ .msg_controllen = 0, -+ .msg_flags = 0 - }; - - status = recvmsg(rth->fd, &msg, 0); -@@ -211,11 +218,15 @@ int FAST_FUNC rtnl_talk(struct rtnl_hand - struct sockaddr_nl nladdr; - struct iovec iov = { (void*)n, n->nlmsg_len }; - char *buf = xmalloc(8*1024); /* avoid big stack buffer */ -+ /* Use designated initializers, struct layout is non-portable */ - struct msghdr msg = { -- (void*)&nladdr, sizeof(nladdr), -- &iov, 1, -- NULL, 0, -- 0 -+ .msg_name = (void*)&nladdr, -+ .msg_namelen = sizeof(nladdr), -+ .msg_iov = &iov, -+ .msg_iovlen = 1, -+ .msg_control = NULL, -+ .msg_controllen = 0, -+ .msg_flags = 0 - }; - - memset(&nladdr, 0, sizeof(nladdr)); diff --git a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch index 5499efded0..4825bc8a67 100644 --- a/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch +++ b/package/utils/busybox/patches/120-remove_uclibc_rpc_check.patch @@ -1,6 +1,6 @@ --- a/util-linux/mount.c +++ b/util-linux/mount.c -@@ -236,9 +236,6 @@ +@@ -237,9 +237,6 @@ #if ENABLE_FEATURE_MOUNT_NFS /* This is just a warning of a common mistake. Possibly this should be a * uclibc faq entry rather than in busybox... */ diff --git a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch index 1083675671..0fdaed502a 100644 --- a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch +++ b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -695,6 +695,7 @@ static int bcast_or_ucast(struct dhcp_pa +@@ -697,6 +697,7 @@ static int bcast_or_ucast(struct dhcp_pa static NOINLINE int send_discover(uint32_t xid, uint32_t requested) { struct dhcp_packet packet; @@ -8,11 +8,11 @@ /* Fill in: op, htype, hlen, cookie, chaddr fields, * random xid field (we override it below), -@@ -712,6 +713,7 @@ static NOINLINE int send_discover(uint32 +@@ -714,6 +715,7 @@ static NOINLINE int send_discover(uint32 */ add_client_options(&packet); + if (msgs++ < 3) - bb_info_msg("Sending discover..."); - return raw_bcast_from_client_config_ifindex(&packet); + bb_error_msg("sending %s", "discover"); + return raw_bcast_from_client_config_ifindex(&packet, INADDR_ANY); } diff --git a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch index f32cea2830..4a9ae9813e 100644 --- a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch +++ b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -1418,6 +1418,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c +@@ -1422,6 +1422,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c /* silence "uninitialized!" warning */ unsigned timestamp_before_wait = timestamp_before_wait; diff --git a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch index f38b128ff8..1e44552c13 100644 --- a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch +++ b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -1101,7 +1101,6 @@ static void perform_renew(void) +@@ -1103,7 +1103,6 @@ static void perform_renew(void) state = RENEW_REQUESTED; break; case RENEW_REQUESTED: /* impatient are we? fine, square 1 */ diff --git a/package/utils/busybox/patches/204-udhcpc_src_ip_rebind.patch b/package/utils/busybox/patches/204-udhcpc_src_ip_rebind.patch deleted file mode 100644 index 21fec5167d..0000000000 --- a/package/utils/busybox/patches/204-udhcpc_src_ip_rebind.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- a/networking/udhcp/dhcpc.c -+++ b/networking/udhcp/dhcpc.c -@@ -673,10 +673,10 @@ static void add_client_options(struct dh - * client reverts to using the IP broadcast address. - */ - --static int raw_bcast_from_client_config_ifindex(struct dhcp_packet *packet) -+static int raw_bcast_from_client_config_ifindex(struct dhcp_packet *packet, uint32_t src_nip) - { - return udhcp_send_raw_packet(packet, -- /*src*/ INADDR_ANY, CLIENT_PORT, -+ /*src*/ src_nip, CLIENT_PORT, - /*dst*/ INADDR_BROADCAST, SERVER_PORT, MAC_BCAST_ADDR, - client_config.ifindex); - } -@@ -687,7 +687,7 @@ static int bcast_or_ucast(struct dhcp_pa - return udhcp_send_kernel_packet(packet, - ciaddr, CLIENT_PORT, - server, SERVER_PORT); -- return raw_bcast_from_client_config_ifindex(packet); -+ return raw_bcast_from_client_config_ifindex(packet, ciaddr); - } - - /* Broadcast a DHCP discover packet to the network, with an optionally requested IP */ -@@ -715,7 +715,7 @@ static NOINLINE int send_discover(uint32 - - if (msgs++ < 3) - bb_info_msg("Sending discover..."); -- return raw_bcast_from_client_config_ifindex(&packet); -+ return raw_bcast_from_client_config_ifindex(&packet, INADDR_ANY); - } - - /* Broadcast a DHCP request message */ -@@ -759,7 +759,7 @@ static NOINLINE int send_select(uint32_t - - addr.s_addr = requested; - bb_info_msg("Sending select for %s...", inet_ntoa(addr)); -- return raw_bcast_from_client_config_ifindex(&packet); -+ return raw_bcast_from_client_config_ifindex(&packet, INADDR_ANY); - } - - /* Unicast or broadcast a DHCP renew message */ -@@ -827,7 +827,7 @@ static NOINLINE int send_decline(/*uint3 - udhcp_add_simple_option(&packet, DHCP_SERVER_ID, server); - - bb_info_msg("Sending decline..."); -- return raw_bcast_from_client_config_ifindex(&packet); -+ return raw_bcast_from_client_config_ifindex(&packet, INADDR_ANY); - } - #endif - diff --git a/package/utils/busybox/patches/210-add_netmsg_util.patch b/package/utils/busybox/patches/210-add_netmsg_util.patch index 23f05755bd..2382698d0f 100644 --- a/package/utils/busybox/patches/210-add_netmsg_util.patch +++ b/package/utils/busybox/patches/210-add_netmsg_util.patch @@ -1,6 +1,6 @@ --- a/include/applets.src.h +++ b/include/applets.src.h -@@ -254,6 +254,7 @@ IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DRO +@@ -229,6 +229,7 @@ IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DRO IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP)) IF_NAMEIF(APPLET(nameif, BB_DIR_SBIN, BB_SUID_DROP)) IF_NC(APPLET(nc, BB_DIR_USR_BIN, BB_SUID_DROP)) @@ -10,7 +10,7 @@ IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP)) --- a/networking/Config.src +++ b/networking/Config.src -@@ -626,6 +626,12 @@ config FEATURE_IPCALC_LONG_OPTIONS +@@ -639,6 +639,12 @@ config FEATURE_IPCALC_LONG_OPTIONS help Support long options for the ipcalc applet. diff --git a/package/utils/busybox/patches/220-add_lock_util.patch b/package/utils/busybox/patches/220-add_lock_util.patch index 047d32ef10..c60f5db392 100644 --- a/package/utils/busybox/patches/220-add_lock_util.patch +++ b/package/utils/busybox/patches/220-add_lock_util.patch @@ -1,16 +1,16 @@ --- a/include/applets.src.h +++ b/include/applets.src.h -@@ -211,6 +211,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, +@@ -196,6 +196,7 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP)) IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP)) IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP)) +IF_LOCK(APPLET(lock, BB_DIR_BIN, BB_SUID_DROP)) - IF_LOGGER(APPLET(logger, BB_DIR_USR_BIN, BB_SUID_DROP)) - /* Needs to be run by root or be suid root - needs to change uid and gid: */ - IF_LOGIN(APPLET(login, BB_DIR_BIN, BB_SUID_REQUIRE)) + IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname)) + IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP)) + IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls)) --- a/miscutils/Config.src +++ b/miscutils/Config.src -@@ -385,6 +385,12 @@ config FEATURE_HDPARM_HDIO_GETSET_DMA +@@ -375,6 +375,12 @@ config FEATURE_HDPARM_HDIO_GETSET_DMA help Enables the 'hdparm -d' option to get/set using_dma flag. @@ -25,9 +25,9 @@ default y --- a/miscutils/Kbuild.src +++ b/miscutils/Kbuild.src -@@ -28,6 +28,7 @@ lib-$(CONFIG_INOTIFYD) += inotifyd.o - lib-$(CONFIG_FEATURE_LAST_SMALL)+= last.o - lib-$(CONFIG_FEATURE_LAST_FANCY)+= last_fancy.o +@@ -33,6 +33,7 @@ lib-$(CONFIG_LAST) += last.o + endif + lib-$(CONFIG_LESS) += less.o +lib-$(CONFIG_LOCK) += lock.o lib-$(CONFIG_MAKEDEVS) += makedevs.o diff --git a/package/utils/busybox/patches/230-ntpd_delayed_resolve.patch b/package/utils/busybox/patches/230-ntpd_delayed_resolve.patch deleted file mode 100644 index b0af08efb5..0000000000 --- a/package/utils/busybox/patches/230-ntpd_delayed_resolve.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- a/networking/ntpd.c -+++ b/networking/ntpd.c -@@ -265,6 +265,7 @@ typedef struct { - typedef struct { - len_and_sockaddr *p_lsa; - char *p_dotted; -+ char *p_hostname; - int p_fd; - int datapoint_idx; - uint32_t lastpkt_refid; -@@ -766,8 +767,9 @@ add_peers(const char *s) - peer_t *p; - - p = xzalloc(sizeof(*p)); -- p->p_lsa = xhost2sockaddr(s, 123); -- p->p_dotted = xmalloc_sockaddr2dotted_noport(&p->p_lsa->u.sa); -+ p->p_hostname = s; -+ p->p_lsa = NULL; -+ p->p_dotted = NULL; - p->p_fd = -1; - p->p_xmt_msg.m_status = MODE_CLIENT | (NTP_VERSION << 3); - p->next_action_time = G.cur_time; /* = set_next(p, 0); */ -@@ -816,6 +818,25 @@ send_query_to_peer(peer_t *p) - * - * Uncomment this and use strace to see it in action: - */ -+ -+ /* See if the peer hostname already resolved yet, if not, retry to resolv and return on failure */ -+ if (!p->p_lsa) -+ { -+ p->p_lsa = host2sockaddr(p->p_hostname, 123); -+ -+ if (p->p_lsa) -+ { -+ p->p_dotted = xmalloc_sockaddr2dotted_noport(&p->p_lsa->u.sa); -+ VERB1 bb_error_msg("resolved peer %s to %s", p->p_hostname, p->p_dotted); -+ } -+ else -+ { -+ set_next(p, RETRY_INTERVAL); -+ VERB1 bb_error_msg("could not resolve peer %s, skipping", p->p_hostname); -+ return; -+ } -+ } -+ - #define PROBE_LOCAL_ADDR /* { len_and_sockaddr lsa; lsa.len = LSA_SIZEOF_SA; getsockname(p->query.fd, &lsa.u.sa, &lsa.len); } */ - - if (p->p_fd == -1) { diff --git a/package/utils/busybox/patches/240-telnetd_intr.patch b/package/utils/busybox/patches/240-telnetd_intr.patch index ccb4ea4224..d52ea3fcc1 100644 --- a/package/utils/busybox/patches/240-telnetd_intr.patch +++ b/package/utils/busybox/patches/240-telnetd_intr.patch @@ -1,6 +1,6 @@ --- a/networking/telnetd.c +++ b/networking/telnetd.c -@@ -331,6 +331,7 @@ make_new_session( +@@ -333,6 +333,7 @@ make_new_session( /* Restore default signal handling ASAP */ bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL); diff --git a/package/utils/busybox/patches/250-date-k-flag.patch b/package/utils/busybox/patches/250-date-k-flag.patch index 111a86156f..b2681a17f9 100644 --- a/package/utils/busybox/patches/250-date-k-flag.patch +++ b/package/utils/busybox/patches/250-date-k-flag.patch @@ -8,10 +8,10 @@ //usage: "\n" //usage: "\nRecognized TIME formats:" //usage: "\n hh:mm[:ss]" -@@ -138,9 +139,8 @@ - //usage: "Wed Apr 12 18:52:41 MDT 2000\n" +@@ -139,9 +140,8 @@ #include "libbb.h" + #include "common_bufsiz.h" -#if ENABLE_FEATURE_DATE_NANO -# include <sys/syscall.h> -#endif @@ -20,7 +20,7 @@ enum { OPT_RFC2822 = (1 << 0), /* R */ -@@ -148,8 +148,9 @@ enum { +@@ -149,8 +149,9 @@ enum { OPT_UTC = (1 << 2), /* u */ OPT_DATE = (1 << 3), /* d */ OPT_REFERENCE = (1 << 4), /* r */ @@ -32,7 +32,7 @@ }; static void maybe_set_utc(int opt) -@@ -167,12 +168,15 @@ static const char date_longopts[] ALIGN1 +@@ -168,12 +169,15 @@ static const char date_longopts[] ALIGN1 /* "universal\0" No_argument "u" */ "date\0" Required_argument "d" "reference\0" Required_argument "r" @@ -48,7 +48,7 @@ struct timespec ts; struct tm tm_time; char buf_fmt_dt2str[64]; -@@ -187,7 +191,7 @@ int date_main(int argc UNUSED_PARAM, cha +@@ -188,7 +192,7 @@ int date_main(int argc UNUSED_PARAM, cha opt_complementary = "d--s:s--d" IF_FEATURE_DATE_ISOFMT(":R--I:I--R"); IF_LONG_OPTS(applet_long_options = date_longopts;) @@ -57,7 +57,7 @@ IF_FEATURE_DATE_ISOFMT("I::D:"), &date_str, &date_str, &filename IF_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt)); -@@ -244,6 +248,31 @@ int date_main(int argc UNUSED_PARAM, cha +@@ -245,6 +249,31 @@ int date_main(int argc UNUSED_PARAM, cha if (*argv) bb_show_usage(); diff --git a/package/utils/busybox/patches/260-arping_missing_includes.patch b/package/utils/busybox/patches/260-arping_missing_includes.patch deleted file mode 100644 index a9d4a62af3..0000000000 --- a/package/utils/busybox/patches/260-arping_missing_includes.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/networking/arping.c -+++ b/networking/arping.c -@@ -24,6 +24,8 @@ - - #include <arpa/inet.h> - #include <net/if.h> -+#include <net/if_arp.h> -+#include <netinet/if_ether.h> - #include <netinet/ether.h> - #include <netpacket/packet.h> - |