aboutsummaryrefslogtreecommitdiffstats
path: root/package/busybox/patches
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2011-10-21 23:08:45 +0000
committerNicolas Thill <nico@openwrt.org>2011-10-21 23:08:45 +0000
commit3af110207d9034668fe9b714eb2074d280a57cce (patch)
treeaeaf726e05602de4a3b53c1a471a8d14de9f5453 /package/busybox/patches
parenta2797eb1a808a7999c0a33f160be5a5648af4a2a (diff)
downloadupstream-3af110207d9034668fe9b714eb2074d280a57cce.tar.gz
upstream-3af110207d9034668fe9b714eb2074d280a57cce.tar.bz2
upstream-3af110207d9034668fe9b714eb2074d280a57cce.zip
[package] busybox: update to 1.19.2 (thanks to Peter Wagner)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28513 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/busybox/patches')
-rw-r--r--package/busybox/patches/000-upstream-android.patch11
-rw-r--r--package/busybox/patches/000-upstream-buildsys.patch19
-rw-r--r--package/busybox/patches/000-upstream-chpasswd.patch55
-rw-r--r--package/busybox/patches/000-upstream-crond.patch12
-rw-r--r--package/busybox/patches/000-upstream-inetd.patch47
-rw-r--r--package/busybox/patches/000-upstream-syslogd.patch20
-rw-r--r--package/busybox/patches/000-upstream-tail.patch43
-rw-r--r--package/busybox/patches/000-upstream-tftp.patch12
-rw-r--r--package/busybox/patches/001-init_avoid_loop_opening_tty.patch2
-rw-r--r--package/busybox/patches/003-brctl_show_fix.patch4
-rw-r--r--package/busybox/patches/110-wget_getopt_fix.patch2
-rw-r--r--package/busybox/patches/200-etc_crontabs.patch4
-rw-r--r--package/busybox/patches/240-udhcpc_retries.patch4
-rw-r--r--package/busybox/patches/241-udhcpc-oversized_packets.patch12
-rw-r--r--package/busybox/patches/242-udhcpc_msgs.patch4
-rw-r--r--package/busybox/patches/243-udhcpc_changed_ifindex.patch2
-rw-r--r--package/busybox/patches/244-udhcpc_add_6rd_option.patch18
-rw-r--r--package/busybox/patches/250-ash_export-n.patch4
-rw-r--r--package/busybox/patches/300-netmsg.patch43
-rw-r--r--package/busybox/patches/310-passwd_access.patch2
-rw-r--r--package/busybox/patches/340-lock_util.patch35
-rw-r--r--package/busybox/patches/350-httpd_redir.patch50
-rw-r--r--package/busybox/patches/410-httpd_cgi_headers.patch2
-rw-r--r--package/busybox/patches/440-httpd_chdir.patch2
-rw-r--r--package/busybox/patches/470-insmod_search.patch30
-rw-r--r--package/busybox/patches/480-mount_union.patch16
-rw-r--r--package/busybox/patches/490-mount_disable_check.patch2
-rw-r--r--package/busybox/patches/510-awk_include.patch14
-rw-r--r--package/busybox/patches/524-udhcpc_renew.patch2
-rw-r--r--package/busybox/patches/802-brctl_linux24.patch8
-rw-r--r--package/busybox/patches/803-id_getgrouplist.patch10
-rw-r--r--package/busybox/patches/902-telnetd_intr.patch6
-rw-r--r--package/busybox/patches/910-insmod-q-flag.patch10
33 files changed, 349 insertions, 158 deletions
diff --git a/package/busybox/patches/000-upstream-android.patch b/package/busybox/patches/000-upstream-android.patch
new file mode 100644
index 0000000000..865b095a73
--- /dev/null
+++ b/package/busybox/patches/000-upstream-android.patch
@@ -0,0 +1,11 @@
+--- a/include/platform.h
++++ b/include/platform.h
+@@ -433,7 +433,7 @@ typedef unsigned smalluint;
+ # undef HAVE_STPCPY
+ #endif
+
+-#if defined(ANDROID)
++#if defined(ANDROID) || defined(__ANDROID__)
+ # undef HAVE_DPRINTF
+ # undef HAVE_GETLINE
+ # undef HAVE_STPCPY
diff --git a/package/busybox/patches/000-upstream-buildsys.patch b/package/busybox/patches/000-upstream-buildsys.patch
new file mode 100644
index 0000000000..1d5a1c2308
--- /dev/null
+++ b/package/busybox/patches/000-upstream-buildsys.patch
@@ -0,0 +1,19 @@
+--- a/applets/applet_tables.c
++++ b/applets/applet_tables.c
+@@ -80,8 +80,15 @@ int main(int argc, char **argv)
+
+ printf("#define NUM_APPLETS %u\n", NUM_APPLETS);
+ if (NUM_APPLETS == 1) {
++ char *dash_to_underscore, *p;
+ printf("#define SINGLE_APPLET_STR \"%s\"\n", applets[0].name);
+- printf("#define SINGLE_APPLET_MAIN %s_main\n", applets[0].name);
++ /* Example: "ether-wake" -> "ether_wake" */
++ p = dash_to_underscore = strdup(applets[0].name);
++ p--;
++ while (*++p)
++ if (*p == '-')
++ *p = '_';
++ printf("#define SINGLE_APPLET_MAIN %s_main\n", dash_to_underscore);
+ }
+ printf("\n");
+
diff --git a/package/busybox/patches/000-upstream-chpasswd.patch b/package/busybox/patches/000-upstream-chpasswd.patch
new file mode 100644
index 0000000000..75b0c4ddde
--- /dev/null
+++ b/package/busybox/patches/000-upstream-chpasswd.patch
@@ -0,0 +1,55 @@
+--- a/loginutils/chpasswd.c
++++ b/loginutils/chpasswd.c
+@@ -33,9 +33,8 @@ static const char chpasswd_longopts[] AL
+ int chpasswd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+ int chpasswd_main(int argc UNUSED_PARAM, char **argv)
+ {
+- char *name, *pass;
+- char salt[sizeof("$N$XXXXXXXX")];
+- int opt, rc;
++ char *name;
++ int opt;
+
+ if (getuid() != 0)
+ bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
+@@ -45,6 +44,10 @@ int chpasswd_main(int argc UNUSED_PARAM,
+ opt = getopt32(argv, "em");
+
+ while ((name = xmalloc_fgetline(stdin)) != NULL) {
++ char *free_me;
++ char *pass;
++ int rc;
++
+ pass = strchr(name, ':');
+ if (!pass)
+ bb_error_msg_and_die("missing new password");
+@@ -52,7 +55,10 @@ int chpasswd_main(int argc UNUSED_PARAM,
+
+ xuname2uid(name); /* dies if there is no such user */
+
++ free_me = NULL;
+ if (!(opt & OPT_ENC)) {
++ char salt[sizeof("$N$XXXXXXXX")];
++
+ crypt_make_salt(salt, 1);
+ if (opt & OPT_MD5) {
+ salt[0] = '$';
+@@ -60,7 +66,7 @@ int chpasswd_main(int argc UNUSED_PARAM,
+ salt[2] = '$';
+ crypt_make_salt(salt + 3, 4);
+ }
+- pass = pw_encrypt(pass, salt, 0);
++ free_me = pass = pw_encrypt(pass, salt, 0);
+ }
+
+ /* This is rather complex: if user is not found in /etc/shadow,
+@@ -81,8 +87,7 @@ int chpasswd_main(int argc UNUSED_PARAM,
+ bb_info_msg("Password for '%s' changed", name);
+ logmode = LOGMODE_STDIO;
+ free(name);
+- if (!(opt & OPT_ENC))
+- free(pass);
++ free(free_me);
+ }
+ return EXIT_SUCCESS;
+ }
diff --git a/package/busybox/patches/000-upstream-crond.patch b/package/busybox/patches/000-upstream-crond.patch
new file mode 100644
index 0000000000..446bc6931b
--- /dev/null
+++ b/package/busybox/patches/000-upstream-crond.patch
@@ -0,0 +1,12 @@
+--- a/miscutils/crond.c
++++ b/miscutils/crond.c
+@@ -861,7 +861,8 @@ int crond_main(int argc UNUSED_PARAM, ch
+
+ /* "-b after -f is ignored", and so on for every pair a-b */
+ opt_complementary = "f-b:b-f:S-L:L-S" IF_FEATURE_CROND_D(":d-l")
+- ":l+:d+"; /* -l and -d have numeric param */
++ /* -l and -d have numeric param */
++ ":l+" IF_FEATURE_CROND_D(":d+");
+ opts = getopt32(argv, "l:L:fbSc:" IF_FEATURE_CROND_D("d:"),
+ &G.log_level, &G.log_filename, &G.crontab_dir_name
+ IF_FEATURE_CROND_D(,&G.log_level));
diff --git a/package/busybox/patches/000-upstream-inetd.patch b/package/busybox/patches/000-upstream-inetd.patch
new file mode 100644
index 0000000000..dc71c7e771
--- /dev/null
+++ b/package/busybox/patches/000-upstream-inetd.patch
@@ -0,0 +1,47 @@
+--- a/networking/inetd.c
++++ b/networking/inetd.c
+@@ -1278,6 +1278,7 @@ int inetd_main(int argc UNUSED_PARAM, ch
+ sep->se_count = 0;
+ rearm_alarm(); /* will revive it in RETRYTIME sec */
+ restore_sigmask(&omask);
++ maybe_close(new_udp_fd);
+ maybe_close(accepted_fd);
+ continue; /* -> check next fd in fd set */
+ }
+@@ -1298,17 +1299,18 @@ int inetd_main(int argc UNUSED_PARAM, ch
+ bb_perror_msg("vfork"+1);
+ sleep(1);
+ restore_sigmask(&omask);
++ maybe_close(new_udp_fd);
+ maybe_close(accepted_fd);
+ continue; /* -> check next fd in fd set */
+ }
+ if (pid == 0)
+ pid--; /* -1: "we did fork and we are child" */
+ }
+- /* if pid == 0 here, we never forked */
++ /* if pid == 0 here, we didn't fork */
+
+ if (pid > 0) { /* parent */
+ if (sep->se_wait) {
+- /* tcp wait: we passed listening socket to child,
++ /* wait: we passed socket to child,
+ * will wait for child to terminate */
+ sep->se_wait = pid;
+ remove_fd_from_set(sep->se_fd);
+@@ -1345,9 +1347,13 @@ int inetd_main(int argc UNUSED_PARAM, ch
+ setsid();
+ /* "nowait" udp */
+ if (new_udp_fd >= 0) {
+- len_and_sockaddr *lsa = xzalloc_lsa(sep->se_family);
++ len_and_sockaddr *lsa;
++ int r;
++
++ close(new_udp_fd);
++ lsa = xzalloc_lsa(sep->se_family);
+ /* peek at the packet and remember peer addr */
+- int r = recvfrom(ctrl, NULL, 0, MSG_PEEK|MSG_DONTWAIT,
++ r = recvfrom(ctrl, NULL, 0, MSG_PEEK|MSG_DONTWAIT,
+ &lsa->u.sa, &lsa->len);
+ if (r < 0)
+ goto do_exit1;
diff --git a/package/busybox/patches/000-upstream-syslogd.patch b/package/busybox/patches/000-upstream-syslogd.patch
new file mode 100644
index 0000000000..c5f1fdd9a0
--- /dev/null
+++ b/package/busybox/patches/000-upstream-syslogd.patch
@@ -0,0 +1,20 @@
+--- a/sysklogd/syslogd.c
++++ b/sysklogd/syslogd.c
+@@ -278,7 +278,7 @@ static void parse_syslogdcfg(const char
+ parser_t *parser;
+
+ parser = config_open2(file ? file : "/etc/syslog.conf",
+- file ? xfopen_for_read : fopen_or_warn_stdin);
++ file ? xfopen_for_read : fopen_for_read);
+ if (!parser)
+ /* didn't find default /etc/syslog.conf */
+ /* proceed as if we built busybox without config support */
+@@ -678,7 +678,7 @@ static void timestamp_and_log(int pri, c
+ if (LOG_PRI(pri) < G.logLevel) {
+ #if ENABLE_FEATURE_IPC_SYSLOG
+ if ((option_mask32 & OPT_circularlog) && G.shbuf) {
+- log_to_shmem(msg);
++ log_to_shmem(G.printbuf);
+ return;
+ }
+ #endif
diff --git a/package/busybox/patches/000-upstream-tail.patch b/package/busybox/patches/000-upstream-tail.patch
new file mode 100644
index 0000000000..92805939ff
--- /dev/null
+++ b/package/busybox/patches/000-upstream-tail.patch
@@ -0,0 +1,43 @@
+--- a/coreutils/tail.c
++++ b/coreutils/tail.c
+@@ -203,7 +203,7 @@ int tail_main(int argc, char **argv)
+ int fd = fds[i];
+
+ if (ENABLE_FEATURE_FANCY_TAIL && fd < 0)
+- continue; /* may happen with -E */
++ continue; /* may happen with -F */
+
+ if (nfiles > header_threshhold) {
+ tail_xprint_header(fmt, argv[i]);
+@@ -252,14 +252,14 @@ int tail_main(int argc, char **argv)
+ * Used only by +N code ("start from Nth", 1-based): */
+ seen = 1;
+ newlines_seen = 0;
+- while ((nread = tail_read(fd, buf, tailbufsize-taillen)) > 0) {
++ while ((nread = tail_read(fd, buf, tailbufsize - taillen)) > 0) {
+ if (G.from_top) {
+ int nwrite = nread;
+ if (seen < count) {
+ /* We need to skip a few more bytes/lines */
+ if (COUNT_BYTES) {
+ nwrite -= (count - seen);
+- seen = count;
++ seen += nread;
+ } else {
+ char *s = buf;
+ do {
+--- a/testsuite/tail.tests
++++ b/testsuite/tail.tests
+@@ -14,4 +14,12 @@ testing "tail: +N with N > file length"
+ "0\n" \
+ "" "qw"
+
++testing "tail: -c +N with largish N" \
++ "
++ dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8200 | wc -c;
++ dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8208 | wc -c;
++ " \
++ "8185\n8177\n" \
++ "" ""
++
+ exit $FAILCOUNT
diff --git a/package/busybox/patches/000-upstream-tftp.patch b/package/busybox/patches/000-upstream-tftp.patch
new file mode 100644
index 0000000000..c1f08bdd3a
--- /dev/null
+++ b/package/busybox/patches/000-upstream-tftp.patch
@@ -0,0 +1,12 @@
+--- a/networking/tftp.c
++++ b/networking/tftp.c
+@@ -813,7 +813,8 @@ int tftpd_main(int argc UNUSED_PARAM, ch
+ goto err;
+ }
+ mode = local_file + strlen(local_file) + 1;
+- if (mode >= block_buf + result || strcmp(mode, "octet") != 0) {
++ /* RFC 1350 says mode string is case independent */
++ if (mode >= block_buf + result || strcasecmp(mode, "octet") != 0) {
+ goto err;
+ }
+ # if ENABLE_FEATURE_TFTP_BLOCKSIZE
diff --git a/package/busybox/patches/001-init_avoid_loop_opening_tty.patch b/package/busybox/patches/001-init_avoid_loop_opening_tty.patch
index 1097720c33..4db64c34be 100644
--- a/package/busybox/patches/001-init_avoid_loop_opening_tty.patch
+++ b/package/busybox/patches/001-init_avoid_loop_opening_tty.patch
@@ -1,6 +1,6 @@
--- a/init/init.c
+++ b/init/init.c
-@@ -572,8 +572,11 @@ static void run_actions(int action_type)
+@@ -573,8 +573,11 @@ static void run_actions(int action_type)
/* Only run stuff with pid == 0. If pid != 0,
* it is already running
*/
diff --git a/package/busybox/patches/003-brctl_show_fix.patch b/package/busybox/patches/003-brctl_show_fix.patch
index 57e35d495d..8177fb01c6 100644
--- a/package/busybox/patches/003-brctl_show_fix.patch
+++ b/package/busybox/patches/003-brctl_show_fix.patch
@@ -1,6 +1,6 @@
--- a/networking/brctl.c
+++ b/networking/brctl.c
-@@ -105,7 +105,7 @@ int brctl_main(int argc UNUSED_PARAM, ch
+@@ -129,7 +129,7 @@ int brctl_main(int argc UNUSED_PARAM, ch
"setageing\0" "setfd\0" "sethello\0" "setmaxage\0"
"setpathcost\0" "setportprio\0" "setbridgeprio\0"
)
@@ -9,7 +9,7 @@
enum { ARG_addbr = 0, ARG_delbr, ARG_addif, ARG_delif
IF_FEATURE_BRCTL_FANCY(,
-@@ -113,7 +113,7 @@ int brctl_main(int argc UNUSED_PARAM, ch
+@@ -137,7 +137,7 @@ int brctl_main(int argc UNUSED_PARAM, ch
ARG_setageing, ARG_setfd, ARG_sethello, ARG_setmaxage,
ARG_setpathcost, ARG_setportprio, ARG_setbridgeprio
)
diff --git a/package/busybox/patches/110-wget_getopt_fix.patch b/package/busybox/patches/110-wget_getopt_fix.patch
index d9ae982a6a..e679870b92 100644
--- a/package/busybox/patches/110-wget_getopt_fix.patch
+++ b/package/busybox/patches/110-wget_getopt_fix.patch
@@ -1,6 +1,6 @@
--- a/networking/wget.c
+++ b/networking/wget.c
-@@ -597,7 +597,7 @@ int wget_main(int argc UNUSED_PARAM, cha
+@@ -872,7 +872,7 @@ int wget_main(int argc UNUSED_PARAM, cha
/* Ignored: */
// "tries\0" Required_argument "t"
/* Ignored (we always use PASV): */
diff --git a/package/busybox/patches/200-etc_crontabs.patch b/package/busybox/patches/200-etc_crontabs.patch
index f83ac02a9d..ebf2990502 100644
--- a/package/busybox/patches/200-etc_crontabs.patch
+++ b/package/busybox/patches/200-etc_crontabs.patch
@@ -1,6 +1,6 @@
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
-@@ -24,7 +24,7 @@
+@@ -37,7 +37,7 @@
#define TMPDIR CONFIG_FEATURE_CROND_DIR
@@ -11,7 +11,7 @@
#endif
--- a/miscutils/crontab.c
+++ b/miscutils/crontab.c
-@@ -12,7 +12,7 @@
+@@ -22,7 +22,7 @@
#include "libbb.h"
diff --git a/package/busybox/patches/240-udhcpc_retries.patch b/package/busybox/patches/240-udhcpc_retries.patch
index 73240aa801..a9f4f3d1eb 100644
--- a/package/busybox/patches/240-udhcpc_retries.patch
+++ b/package/busybox/patches/240-udhcpc_retries.patch
@@ -1,6 +1,6 @@
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
-@@ -1196,7 +1196,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1257,7 +1257,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
switch (state) {
case INIT_SELECTING:
@@ -9,7 +9,7 @@
if (packet_num == 0)
xid = random_xid();
/* broadcast */
-@@ -1225,7 +1225,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1286,7 +1286,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
packet_num = 0;
continue;
case REQUESTING:
diff --git a/package/busybox/patches/241-udhcpc-oversized_packets.patch b/package/busybox/patches/241-udhcpc-oversized_packets.patch
index 56f4e93127..471d704a71 100644
--- a/package/busybox/patches/241-udhcpc-oversized_packets.patch
+++ b/package/busybox/patches/241-udhcpc-oversized_packets.patch
@@ -1,6 +1,6 @@
--- a/networking/udhcp/packet.c
+++ b/networking/udhcp/packet.c
-@@ -165,6 +165,11 @@ uint16_t FAST_FUNC udhcp_checksum(void *
+@@ -158,6 +158,11 @@ uint16_t FAST_FUNC udhcp_checksum(void *
return ~sum;
}
@@ -12,7 +12,7 @@
/* Construct a ip/udp header for a packet, send packet */
int FAST_FUNC udhcp_send_raw_packet(struct dhcp_packet *dhcp_pkt,
uint32_t source_nip, int source_port,
-@@ -173,10 +178,10 @@ int FAST_FUNC udhcp_send_raw_packet(stru
+@@ -166,10 +171,10 @@ int FAST_FUNC udhcp_send_raw_packet(stru
{
struct sockaddr_ll dest_sll;
struct ip_udp_dhcp_packet packet;
@@ -24,7 +24,7 @@
fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
if (fd < 0) {
-@@ -185,8 +190,8 @@ int FAST_FUNC udhcp_send_raw_packet(stru
+@@ -178,8 +183,8 @@ int FAST_FUNC udhcp_send_raw_packet(stru
}
memset(&dest_sll, 0, sizeof(dest_sll));
@@ -35,7 +35,7 @@
dest_sll.sll_family = AF_PACKET;
dest_sll.sll_protocol = htons(ETH_P_IP);
-@@ -199,36 +204,24 @@ int FAST_FUNC udhcp_send_raw_packet(stru
+@@ -192,36 +197,24 @@ int FAST_FUNC udhcp_send_raw_packet(stru
goto ret_close;
}
@@ -78,7 +78,7 @@
(struct sockaddr *) &dest_sll, sizeof(dest_sll));
msg = "sendto";
ret_close:
-@@ -246,7 +239,6 @@ int FAST_FUNC udhcp_send_kernel_packet(s
+@@ -239,7 +232,6 @@ int FAST_FUNC udhcp_send_kernel_packet(s
uint32_t dest_nip, int dest_port)
{
struct sockaddr_in client;
@@ -86,7 +86,7 @@
int fd;
int result = -1;
const char *msg;
-@@ -277,9 +269,7 @@ int FAST_FUNC udhcp_send_kernel_packet(s
+@@ -270,9 +262,7 @@ int FAST_FUNC udhcp_send_kernel_packet(s
}
udhcp_dump_packet(dhcp_pkt);
diff --git a/package/busybox/patches/242-udhcpc_msgs.patch b/package/busybox/patches/242-udhcpc_msgs.patch
index 7d390f1667..998e3b664b 100644
--- a/package/busybox/patches/242-udhcpc_msgs.patch
+++ b/package/busybox/patches/242-udhcpc_msgs.patch
@@ -1,6 +1,6 @@
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
-@@ -436,6 +436,7 @@ static int raw_bcast_from_client_config_
+@@ -540,6 +540,7 @@ static int raw_bcast_from_client_config_
static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
{
struct dhcp_packet packet;
@@ -8,7 +8,7 @@
/* Fill in: op, htype, hlen, cookie, chaddr fields,
* random xid field (we override it below),
-@@ -453,6 +454,7 @@ static NOINLINE int send_discover(uint32
+@@ -557,6 +558,7 @@ static NOINLINE int send_discover(uint32
*/
add_client_options(&packet);
diff --git a/package/busybox/patches/243-udhcpc_changed_ifindex.patch b/package/busybox/patches/243-udhcpc_changed_ifindex.patch
index 71bfe01933..4b28166bc2 100644
--- a/package/busybox/patches/243-udhcpc_changed_ifindex.patch
+++ b/package/busybox/patches/243-udhcpc_changed_ifindex.patch
@@ -1,6 +1,6 @@
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
-@@ -1144,6 +1144,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
+@@ -1205,6 +1205,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
/* silence "uninitialized!" warning */
unsigned timestamp_before_wait = timestamp_before_wait;
diff --git a/package/busybox/patches/244-udhcpc_add_6rd_option.patch b/package/busybox/patches/244-udhcpc_add_6rd_option.patch
index 21107ae26c..84891d3cdb 100644
--- a/package/busybox/patches/244-udhcpc_add_6rd_option.patch
+++ b/package/busybox/patches/244-udhcpc_add_6rd_option.patch
@@ -1,24 +1,24 @@
--- a/networking/udhcp/common.c
+++ b/networking/udhcp/common.c
-@@ -56,6 +56,8 @@ const struct dhcp_optflag dhcp_optflags[
+@@ -60,6 +60,8 @@ const struct dhcp_optflag dhcp_optflags[
+ { OPTION_U8 , 0x85 }, /* DHCP_VLAN_PRIORITY */
#endif
- { OPTION_STATIC_ROUTES , 0x79 }, /* DHCP_STATIC_ROUTES */
{ OPTION_STATIC_ROUTES , 0xf9 }, /* DHCP_MS_STATIC_ROUTES */
+ { OPTION_6RD , 0xd4 }, /* DHCP_6RD (RFC) */
+ { OPTION_6RD , 0x96 }, /* DHCP_6RD (Comcast) */
{ OPTION_STRING , 0xfc }, /* DHCP_WPAD */
/* Options below have no match in dhcp_option_strings[],
-@@ -119,6 +121,8 @@ const char dhcp_option_strings[] ALIGN1
- // is not handled yet by "string->option" conversion code:
- "staticroutes" "\0"/* DHCP_STATIC_ROUTES */
+@@ -127,6 +129,8 @@ const char dhcp_option_strings[] ALIGN1
+ "vlanpriority" "\0"/* DHCP_VLAN_PRIORITY */
+ #endif
"msstaticroutes""\0"/* DHCP_MS_STATIC_ROUTES */
+ "ip6rd" "\0" /* DHCP_6RD (RFC) */
+ "ip6rd" "\0" /* DHCP_6RD (Comcast) */
"wpad" "\0" /* DHCP_WPAD */
;
-@@ -146,6 +150,7 @@ const uint8_t dhcp_option_lengths[] ALIG
+@@ -154,6 +158,7 @@ const uint8_t dhcp_option_lengths[] ALIG
[OPTION_S32] = 4,
/* Just like OPTION_STRING, we use minimum length here */
[OPTION_STATIC_ROUTES] = 5,
@@ -38,7 +38,7 @@
OPTION_SIP_SERVERS,
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
-@@ -45,6 +45,7 @@ static const uint8_t len_of_option_as_st
+@@ -100,6 +100,7 @@ static const uint8_t len_of_option_as_st
[OPTION_IP ] = sizeof("255.255.255.255 "),
[OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2,
[OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
@@ -46,7 +46,7 @@
[OPTION_STRING ] = 1,
#if ENABLE_FEATURE_UDHCP_RFC3397
[OPTION_DNS_STRING ] = 1, /* unused */
-@@ -68,6 +69,23 @@ static int sprint_nip(char *dest, const
+@@ -123,6 +124,23 @@ static int sprint_nip(char *dest, const
return sprintf(dest, "%s%u.%u.%u.%u", pre, ip[0], ip[1], ip[2], ip[3]);
}
@@ -70,7 +70,7 @@
/* really simple implementation, just count the bits */
static int mton(uint32_t mask)
{
-@@ -177,6 +195,70 @@ static NOINLINE char *xmalloc_optname_op
+@@ -232,6 +250,70 @@ static NOINLINE char *xmalloc_optname_op
return ret;
}
diff --git a/package/busybox/patches/250-ash_export-n.patch b/package/busybox/patches/250-ash_export-n.patch
index 1c34b2cd7b..048c236b85 100644
--- a/package/busybox/patches/250-ash_export-n.patch
+++ b/package/busybox/patches/250-ash_export-n.patch
@@ -1,6 +1,6 @@
--- a/shell/ash.c
+++ b/shell/ash.c
-@@ -12532,8 +12532,17 @@ exportcmd(int argc UNUSED_PARAM, char **
+@@ -12611,8 +12611,17 @@ exportcmd(int argc UNUSED_PARAM, char **
const char *p;
char **aptr;
int flag = argv[0][0] == 'r' ? VREADONLY : VEXPORT;
@@ -19,7 +19,7 @@
aptr = argptr;
name = *aptr;
if (name) {
-@@ -12545,10 +12554,12 @@ exportcmd(int argc UNUSED_PARAM, char **
+@@ -12624,10 +12633,12 @@ exportcmd(int argc UNUSED_PARAM, char **
vp = *findvar(hashvar(name), name);
if (vp) {
vp->flags |= flag;
diff --git a/package/busybox/patches/300-netmsg.patch b/package/busybox/patches/300-netmsg.patch
index 795ebb3623..e8b2513eb3 100644
--- a/package/busybox/patches/300-netmsg.patch
+++ b/package/busybox/patches/300-netmsg.patch
@@ -1,35 +1,18 @@
--- a/include/applets.src.h
+++ b/include/applets.src.h
-@@ -256,6 +256,7 @@ IF_MT(APPLET(mt, _BB_DIR_BIN, _BB_SUID_D
- 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))
-+IF_NETMSG(APPLET(netmsg, _BB_DIR_BIN, _BB_SUID_REQUIRE))
- IF_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_DROP))
- IF_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_DROP))
- IF_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_DROP))
---- a/include/usage.src.h
-+++ b/include/usage.src.h
-@@ -1,3 +1,4 @@
-+
- /* vi: set sw=8 ts=8: */
- /*
- * This file suffers from chronically incorrect tabification
-@@ -2706,6 +2707,9 @@ INSERT
- " or\n" \
- "$ nameif -c /etc/my_mactab_file\n" \
-
-+#define netmsg_trivial_usage NOUSAGE_STR
-+#define netmsg_full_usage ""
-+
- #define nmeter_trivial_usage \
- "format_string"
- #define nmeter_full_usage "\n\n" \
+@@ -266,6 +266,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))
++IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE))
+ IF_NETSTAT(APPLET(netstat, BB_DIR_BIN, BB_SUID_DROP))
+ IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP))
+ IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP))
--- a/networking/Config.src
+++ b/networking/Config.src
-@@ -640,6 +640,12 @@ config FEATURE_NAMEIF_EXTENDED
- new_interface_name mac=00:80:C8:38:91:B5
- new_interface_name 00:80:C8:38:91:B5
+@@ -612,6 +612,12 @@ config FEATURE_IPCALC_LONG_OPTIONS
+ help
+ Support long options for the ipcalc applet.
+config NETMSG
+ bool "netmsg"
@@ -52,7 +35,7 @@
lib-$(CONFIG_NTPD) += ntpd.o
--- /dev/null
+++ b/networking/netmsg.c
-@@ -0,0 +1,63 @@
+@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
+ *
@@ -67,6 +50,8 @@
+#include <string.h>
+#include "busybox.h"
+
++//usage:#define netmsg_trivial_usage NOUSAGE_STR
++//usage:#define netmsg_full_usage ""
+
+#ifndef CONFIG_NETMSG
+int main(int argc, char **argv)
diff --git a/package/busybox/patches/310-passwd_access.patch b/package/busybox/patches/310-passwd_access.patch
index a8581db728..6d0affd165 100644
--- a/package/busybox/patches/310-passwd_access.patch
+++ b/package/busybox/patches/310-passwd_access.patch
@@ -3,7 +3,7 @@
--- a/networking/httpd.c
+++ b/networking/httpd.c
-@@ -1742,21 +1742,32 @@ static int check_user_passwd(const char
+@@ -1772,21 +1772,32 @@ static int check_user_passwd(const char
if (ENABLE_FEATURE_HTTPD_AUTH_MD5) {
char *md5_passwd;
diff --git a/package/busybox/patches/340-lock_util.patch b/package/busybox/patches/340-lock_util.patch
index 568391298e..fd657b698c 100644
--- a/package/busybox/patches/340-lock_util.patch
+++ b/package/busybox/patches/340-lock_util.patch
@@ -1,28 +1,16 @@
--- a/include/applets.src.h
+++ b/include/applets.src.h
-@@ -213,6 +213,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))
- IF_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_REQUIRE))
- IF_LOGNAME(APPLET_NOFORK(logname, logname, _BB_DIR_USR_BIN, _BB_SUID_DROP, logname))
---- a/include/usage.src.h
-+++ b/include/usage.src.h
-@@ -2089,6 +2089,9 @@ INSERT
- #define loadkmap_example_usage \
- "$ loadkmap < /etc/i18n/lang-keymap\n"
-
-+#define lock_trivial_usage NOUSAGE_STR
-+#define lock_full_usage ""
-+
- #define logger_trivial_usage \
- "[OPTIONS] [MESSAGE]"
- #define logger_full_usage "\n\n" \
+@@ -218,6 +218,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))
--- a/miscutils/Config.src
+++ b/miscutils/Config.src
-@@ -485,6 +485,11 @@ config FEATURE_HDPARM_HDIO_GETSET_DMA
+@@ -419,6 +419,11 @@ config FEATURE_HDPARM_HDIO_GETSET_DMA
help
Enables the 'hdparm -d' option to get/set using_dma flag.
@@ -46,7 +34,7 @@
lib-$(CONFIG_MICROCOM) += microcom.o
--- /dev/null
+++ b/miscutils/lock.c
-@@ -0,0 +1,132 @@
+@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
+ *
@@ -61,6 +49,9 @@
+#include <stdio.h>
+#include "busybox.h"
+
++//usage:#define lock_trivial_usage NOUSAGE_STR
++//usage:#define lock_full_usage ""
++
+static int unlock = 0;
+static int shared = 0;
+static int waitonly = 0;
diff --git a/package/busybox/patches/350-httpd_redir.patch b/package/busybox/patches/350-httpd_redir.patch
index 3fae94a096..d5f64e332a 100644
--- a/package/busybox/patches/350-httpd_redir.patch
+++ b/package/busybox/patches/350-httpd_redir.patch
@@ -1,27 +1,23 @@
---- a/include/usage.src.h
-+++ b/include/usage.src.h
-@@ -1623,7 +1623,8 @@ INSERT
- IF_FEATURE_HTTPD_SETUID(" [-u USER[:GRP]]") \
- IF_FEATURE_HTTPD_BASIC_AUTH(" [-r REALM]") \
- " [-h HOME]\n" \
-- "or httpd -d/-e" IF_FEATURE_HTTPD_AUTH_MD5("/-m") " STRING"
-+ "or httpd -d/-e" IF_FEATURE_HTTPD_AUTH_MD5("/-m") " STRING" \
-+ " [-R <path> [-H <host>]]"
- #define httpd_full_usage "\n\n" \
- "Listen for incoming HTTP requests\n" \
- "\nOptions:" \
-@@ -1641,6 +1642,8 @@ INSERT
- "\n -m STRING MD5 crypt STRING") \
- "\n -e STRING HTML encode STRING" \
- "\n -d STRING URL decode STRING" \
-+ "\n -R PATH Redirect target path" \
-+ "\n -H HOST Redirect target host" \
-
- #define hwclock_trivial_usage \
- IF_FEATURE_HWCLOCK_LONG_OPTIONS( \
--- a/networking/httpd.c
+++ b/networking/httpd.c
-@@ -243,6 +243,8 @@ struct globals {
+@@ -105,6 +105,7 @@
+ //usage: IF_FEATURE_HTTPD_BASIC_AUTH(" [-r REALM]")
+ //usage: " [-h HOME]\n"
+ //usage: "or httpd -d/-e" IF_FEATURE_HTTPD_AUTH_MD5("/-m") " STRING"
++//usage: " [-R <path> [-H <host>]]"
+ //usage:#define httpd_full_usage "\n\n"
+ //usage: "Listen for incoming HTTP requests\n"
+ //usage: "\n -i Inetd mode"
+@@ -121,6 +122,8 @@
+ //usage: "\n -m STRING MD5 crypt STRING")
+ //usage: "\n -e STRING HTML encode STRING"
+ //usage: "\n -d STRING URL decode STRING"
++//usage: "\n -R PATH Redirect target path"
++//usage: "\n -H HOST Redirect target host"
+
+ #include "libbb.h"
+ #if ENABLE_FEATURE_HTTPD_USE_SENDFILE
+@@ -272,6 +275,8 @@ struct globals {
const char *found_mime_type;
const char *found_moved_temporarily;
@@ -30,7 +26,7 @@
Htaccess_IP *ip_a_d; /* config allow/deny lines */
IF_FEATURE_HTTPD_BASIC_AUTH(const char *g_realm;)
-@@ -293,6 +295,8 @@ struct globals {
+@@ -322,6 +327,8 @@ struct globals {
#define index_page (G.index_page )
#define found_mime_type (G.found_mime_type )
#define found_moved_temporarily (G.found_moved_temporarily)
@@ -39,7 +35,7 @@
#define last_mod (G.last_mod )
#define ip_a_d (G.ip_a_d )
#define g_realm (G.g_realm )
-@@ -999,8 +1003,11 @@ static void send_headers(int responseNum
+@@ -1028,8 +1035,11 @@ static void send_headers(int responseNum
}
#endif
if (responseNum == HTTP_MOVED_TEMPORARILY) {
@@ -52,7 +48,7 @@
(g_query ? "?" : ""),
(g_query ? g_query : ""));
}
-@@ -1967,8 +1974,12 @@ static void handle_incoming_and_exit(con
+@@ -1997,8 +2007,12 @@ static void handle_incoming_and_exit(con
} while (*++tptr);
*++urlp = '\0'; /* terminate after last character */
@@ -66,7 +62,7 @@
if (is_directory(urlcopy + 1, 1, NULL)) {
found_moved_temporarily = urlcopy;
}
-@@ -2325,7 +2336,9 @@ static void sighup_handler(int sig UNUSE
+@@ -2355,7 +2369,9 @@ static void sighup_handler(int sig UNUSE
}
enum {
@@ -77,7 +73,7 @@
d_opt_decode_url,
h_opt_home_httpd,
IF_FEATURE_HTTPD_ENCODE_URL_STR(e_opt_encode_url,)
-@@ -2374,12 +2387,13 @@ int httpd_main(int argc UNUSED_PARAM, ch
+@@ -2404,12 +2420,13 @@ int httpd_main(int argc UNUSED_PARAM, ch
/* We do not "absolutize" path given by -h (home) opt.
* If user gives relative path in -h,
* $SCRIPT_FILENAME will not be set. */
diff --git a/package/busybox/patches/410-httpd_cgi_headers.patch b/package/busybox/patches/410-httpd_cgi_headers.patch
index 19e1f94142..7cc4f936ad 100644
--- a/package/busybox/patches/410-httpd_cgi_headers.patch
+++ b/package/busybox/patches/410-httpd_cgi_headers.patch
@@ -1,6 +1,6 @@
--- a/networking/httpd.c
+++ b/networking/httpd.c
-@@ -1261,10 +1261,10 @@ static NOINLINE void cgi_io_loop_and_exi
+@@ -1294,10 +1294,10 @@ static NOINLINE void cgi_io_loop_and_exi
if (full_write(STDOUT_FILENO, HTTP_200, sizeof(HTTP_200)-1) != sizeof(HTTP_200)-1)
break;
}
diff --git a/package/busybox/patches/440-httpd_chdir.patch b/package/busybox/patches/440-httpd_chdir.patch
index 66e41b55f2..da069f6fff 100644
--- a/package/busybox/patches/440-httpd_chdir.patch
+++ b/package/busybox/patches/440-httpd_chdir.patch
@@ -1,6 +1,6 @@
--- a/networking/httpd.c
+++ b/networking/httpd.c
-@@ -1853,6 +1853,7 @@ static void handle_incoming_and_exit(con
+@@ -1886,6 +1886,7 @@ static void handle_incoming_and_exit(con
char *header_ptr = header_ptr;
Htaccess_Proxy *proxy_entry;
#endif
diff --git a/package/busybox/patches/470-insmod_search.patch b/package/busybox/patches/470-insmod_search.patch
index b5314e3f0d..7f0188fc82 100644
--- a/package/busybox/patches/470-insmod_search.patch
+++ b/package/busybox/patches/470-insmod_search.patch
@@ -1,3 +1,14 @@
+--- a/modutils/Config.src
++++ b/modutils/Config.src
+@@ -247,7 +247,7 @@ config FEATURE_MODUTILS_SYMBOLS
+ config DEFAULT_MODULES_DIR
+ string "Default directory containing modules"
+ default "/lib/modules"
+- depends on DEPMOD || MODPROBE || MODPROBE_SMALL || MODINFO
++ depends on DEPMOD || INSMOD || MODPROBE || MODPROBE_SMALL || MODINFO
+ help
+ Directory that contains kernel modules.
+ Defaults to "/lib/modules"
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -11,6 +11,106 @@
@@ -107,16 +118,16 @@
/* 2.6 style insmod has no options and required filename
* (not module name - .ko can't be omitted) */
-@@ -59,9 +159,15 @@ int insmod_main(int argc UNUSED_PARAM, c
+@@ -58,9 +158,15 @@ int insmod_main(int argc UNUSED_PARAM, c
if (!filename)
bb_show_usage();
-- rc = bb_init_module(filename, parse_cmdline_module_options(argv));
+- rc = bb_init_module(filename, parse_cmdline_module_options(argv, /*quote_spaces:*/ 0));
+ rc = find_module(filename);
+ if (rc || (g_filename == NULL))
-+ goto done;
++ goto done;
+
-+ rc = bb_init_module(g_filename, parse_cmdline_module_options(argv));
++ rc = bb_init_module(g_filename, parse_cmdline_module_options(argv, /*quote_spaces:*/ 0));
if (rc)
bb_error_msg("can't insert '%s': %s", filename, moderror(rc));
+ free (g_filename);
@@ -124,14 +135,3 @@
+done:
return rc;
}
---- a/modutils/Config.src
-+++ b/modutils/Config.src
-@@ -229,7 +229,7 @@ config FEATURE_MODUTILS_SYMBOLS
- config DEFAULT_MODULES_DIR
- string "Default directory containing modules"
- default "/lib/modules"
-- depends on DEPMOD || MODPROBE || MODPROBE_SMALL || MODINFO
-+ depends on DEPMOD || INSMOD || MODPROBE || MODPROBE_SMALL || MODINFO
- help
- Directory that contains kernel modules.
- Defaults to "/lib/modules"
diff --git a/package/busybox/patches/480-mount_union.patch b/package/busybox/patches/480-mount_union.patch
index b9eee8cb63..2f236a1528 100644
--- a/package/busybox/patches/480-mount_union.patch
+++ b/package/busybox/patches/480-mount_union.patch
@@ -1,6 +1,6 @@
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
-@@ -77,6 +77,10 @@
+@@ -136,6 +136,10 @@
# include <rpc/pmap_clnt.h>
#endif
@@ -11,19 +11,19 @@
#if defined(__dietlibc__)
// 16.12.2006, Sampo Kellomaki (sampo@iki.fi)
-@@ -194,6 +198,7 @@ static const int32_t mount_options[] = {
+@@ -254,6 +258,7 @@ static const int32_t mount_options[] = {
/* "rslave" */ MS_SLAVE|MS_RECURSIVE,
- /* "rprivate" */ MS_SLAVE|MS_RECURSIVE,
+ /* "rprivate" */ MS_PRIVATE|MS_RECURSIVE,
/* "runbindable" */ MS_UNBINDABLE|MS_RECURSIVE,
+ /* "union" */ MS_UNION,
)
// Always understood.
-@@ -249,6 +254,7 @@ static const char mount_option_str[] =
- "rslave\0"
- "rprivate\0"
- "runbindable\0"
-+ "union" "\0"
+@@ -310,6 +315,7 @@ static const char mount_option_str[] =
+ "make-rslave\0"
+ "make-rprivate\0"
+ "make-runbindable\0"
++ "make-union\0"
)
// Always understood.
diff --git a/package/busybox/patches/490-mount_disable_check.patch b/package/busybox/patches/490-mount_disable_check.patch
index 513405fcf7..2fcb7f7fc2 100644
--- a/package/busybox/patches/490-mount_disable_check.patch
+++ b/package/busybox/patches/490-mount_disable_check.patch
@@ -1,6 +1,6 @@
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
-@@ -69,9 +69,6 @@
+@@ -128,9 +128,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/busybox/patches/510-awk_include.patch b/package/busybox/patches/510-awk_include.patch
index 9465cdad83..9f525acf86 100644
--- a/package/busybox/patches/510-awk_include.patch
+++ b/package/busybox/patches/510-awk_include.patch
@@ -5,7 +5,7 @@
/* vi: set sw=4 ts=4: */
/*
* awk implementation for busybox
-@@ -74,9 +75,14 @@ typedef struct chain_s {
+@@ -81,9 +82,14 @@ typedef struct chain_s {
} chain;
/* Function */
@@ -20,7 +20,7 @@
} func;
/* I/O stream */
-@@ -1466,7 +1472,8 @@ static void parse_program(char *p)
+@@ -1473,7 +1479,8 @@ static void parse_program(char *p)
next_token(TC_FUNCTION);
g_pos++;
f = newfunc(t_string);
@@ -30,7 +30,7 @@
f->nargs = 0;
while (next_token(TC_VARIABLE | TC_SEQTERM) & TC_VARIABLE) {
v = findvar(ahash, t_string);
-@@ -1475,7 +1482,7 @@ static void parse_program(char *p)
+@@ -1482,7 +1489,7 @@ static void parse_program(char *p)
if (next_token(TC_COMMA | TC_SEQTERM) & TC_SEQTERM)
break;
}
@@ -39,7 +39,7 @@
chain_group();
clear_array(ahash);
-@@ -2573,7 +2580,8 @@ static var *evaluate(node *op, var *res)
+@@ -2580,7 +2587,8 @@ static var *evaluate(node *op, var *res)
var *vbeg, *v;
const char *sv_progname;
@@ -49,7 +49,7 @@
syntax_error(EMSG_UNDEF_FUNC);
vbeg = v = nvalloc(op->r.f->nargs + 1);
-@@ -2590,7 +2598,10 @@ static var *evaluate(node *op, var *res)
+@@ -2597,7 +2605,10 @@ static var *evaluate(node *op, var *res)
fnargs = vbeg;
sv_progname = g_progname;
@@ -61,7 +61,7 @@
g_progname = sv_progname;
nvfree(fnargs);
-@@ -2984,6 +2995,143 @@ static rstream *next_input_file(void)
+@@ -2991,6 +3002,143 @@ static rstream *next_input_file(void)
#undef files_happen
}
@@ -205,7 +205,7 @@
int awk_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int awk_main(int argc, char **argv)
{
-@@ -3049,6 +3197,9 @@ int awk_main(int argc, char **argv)
+@@ -3056,6 +3204,9 @@ int awk_main(int argc, char **argv)
*s1 = '=';
}
}
diff --git a/package/busybox/patches/524-udhcpc_renew.patch b/package/busybox/patches/524-udhcpc_renew.patch
index 64b075a593..01edda3a57 100644
--- a/package/busybox/patches/524-udhcpc_renew.patch
+++ b/package/busybox/patches/524-udhcpc_renew.patch
@@ -1,6 +1,6 @@
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
-@@ -874,7 +874,6 @@ static void perform_renew(void)
+@@ -983,7 +983,6 @@ static void perform_renew(void)
state = RENEW_REQUESTED;
break;
case RENEW_REQUESTED: /* impatient are we? fine, square 1 */
diff --git a/package/busybox/patches/802-brctl_linux24.patch b/package/busybox/patches/802-brctl_linux24.patch
index 09ee8be1ee..8cc19779a2 100644
--- a/package/busybox/patches/802-brctl_linux24.patch
+++ b/package/busybox/patches/802-brctl_linux24.patch
@@ -1,6 +1,6 @@
--- a/networking/brctl.c
+++ b/networking/brctl.c
-@@ -32,7 +32,7 @@
+@@ -56,7 +56,7 @@
/* Maximum number of ports supported per bridge interface. */
#ifndef MAX_PORTS
@@ -9,7 +9,7 @@
#endif
/* Use internal number parsing and not the "exact" conversion. */
-@@ -169,6 +169,7 @@ int brctl_main(int argc UNUSED_PARAM, ch
+@@ -193,6 +193,7 @@ int brctl_main(int argc UNUSED_PARAM, ch
printf(bi.stp_enabled ? "\tyes" : "\tno");
/* print interface list */
@@ -17,7 +17,7 @@
arm_ioctl(args, BRCTL_GET_PORT_LIST,
(unsigned long) ifidx, MAX_PORTS);
xioctl(fd, SIOCDEVPRIVATE, &ifr);
-@@ -197,9 +198,19 @@ int brctl_main(int argc UNUSED_PARAM, ch
+@@ -221,9 +222,19 @@ int brctl_main(int argc UNUSED_PARAM, ch
br = *argv++;
if (key == ARG_addbr || key == ARG_delbr) { /* addbr or delbr */
@@ -40,7 +40,7 @@
goto done;
}
-@@ -208,14 +219,27 @@ int brctl_main(int argc UNUSED_PARAM, ch
+@@ -232,14 +243,27 @@ int brctl_main(int argc UNUSED_PARAM, ch
strncpy_IFNAMSIZ(ifr.ifr_name, br);
if (key == ARG_addif || key == ARG_delif) { /* addif or delif */
diff --git a/package/busybox/patches/803-id_getgrouplist.patch b/package/busybox/patches/803-id_getgrouplist.patch
index 04d8dc4067..66c184959f 100644
--- a/package/busybox/patches/803-id_getgrouplist.patch
+++ b/package/busybox/patches/803-id_getgrouplist.patch
@@ -5,7 +5,7 @@ Signed-off-by: Nicolas Thill <nico@openwrt.org>
--- a/coreutils/id.c
+++ b/coreutils/id.c
-@@ -19,10 +19,12 @@
+@@ -63,10 +63,12 @@
/* This is a NOEXEC applet. Be very careful! */
@@ -19,7 +19,7 @@ Signed-off-by: Nicolas Thill <nico@openwrt.org>
#endif
#endif
#endif
-@@ -84,7 +86,11 @@ static int get_groups(const char *userna
+@@ -128,7 +130,11 @@ static int get_groups(const char *userna
/* If the user is a member of more than
* *n groups, then -1 is returned. Otherwise >= 0.
* (and no defined way of detecting errors?!) */
@@ -30,8 +30,8 @@ Signed-off-by: Nicolas Thill <nico@openwrt.org>
+#endif
/* I guess *n < 0 might indicate error. Anyway,
* malloc'ing -1 bytes won't be good, so: */
- //if (*n < 0)
-@@ -156,6 +162,7 @@ int id_main(int argc UNUSED_PARAM, char
+ if (*n < 0)
+@@ -210,6 +216,7 @@ int id_main(int argc UNUSED_PARAM, char
if (egid != rgid)
status |= print_group(egid, " ");
}
@@ -39,7 +39,7 @@ Signed-off-by: Nicolas Thill <nico@openwrt.org>
/* We are supplying largish buffer, trying
* to not run get_groups() twice. That might be slow
* ("user database in remote SQL server" case) */
-@@ -183,6 +190,7 @@ int id_main(int argc UNUSED_PARAM, char
+@@ -236,6 +243,7 @@ int id_main(int argc UNUSED_PARAM, char
}
if (ENABLE_FEATURE_CLEAN_UP)
free(groups);
diff --git a/package/busybox/patches/902-telnetd_intr.patch b/package/busybox/patches/902-telnetd_intr.patch
index c5c25dc84e..862ece055d 100644
--- a/package/busybox/patches/902-telnetd_intr.patch
+++ b/package/busybox/patches/902-telnetd_intr.patch
@@ -1,10 +1,10 @@
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
-@@ -313,6 +313,7 @@ make_new_session(
+@@ -330,6 +330,7 @@ make_new_session(
/* Restore default signal handling ASAP */
bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL);
+ signal(SIGINT, SIG_DFL);
- if (ENABLE_FEATURE_UTMP) {
- len_and_sockaddr *lsa = get_peer_lsa(sock);
+ pid = getpid();
+
diff --git a/package/busybox/patches/910-insmod-q-flag.patch b/package/busybox/patches/910-insmod-q-flag.patch
index 596fe910de..6002f20f1b 100644
--- a/package/busybox/patches/910-insmod-q-flag.patch
+++ b/package/busybox/patches/910-insmod-q-flag.patch
@@ -1,6 +1,6 @@
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
-@@ -133,7 +133,7 @@ int insmod_main(int argc, char **argv) M
+@@ -139,7 +139,7 @@ int insmod_main(int argc, char **argv) M
int insmod_main(int argc UNUSED_PARAM, char **argv)
{
char *filename;
@@ -9,7 +9,7 @@
/* Compat note:
* 2.6 style insmod has no options and required filename
-@@ -143,10 +143,8 @@ int insmod_main(int argc UNUSED_PARAM, c
+@@ -149,10 +149,8 @@ int insmod_main(int argc UNUSED_PARAM, c
* or in $MODPATH.
*/
@@ -22,10 +22,10 @@
filename = *++argv;
if (!filename)
-@@ -157,7 +155,7 @@ int insmod_main(int argc UNUSED_PARAM, c
- goto done;
+@@ -163,7 +161,7 @@ int insmod_main(int argc UNUSED_PARAM, c
+ goto done;
- rc = bb_init_module(g_filename, parse_cmdline_module_options(argv));
+ rc = bb_init_module(g_filename, parse_cmdline_module_options(argv, /*quote_spaces:*/ 0));
- if (rc)
+ if (rc && !(opt & INSMOD_OPT_SILENT))
bb_error_msg("can't insert '%s': %s", filename, moderror(rc));