diff options
Diffstat (limited to 'package/busybox/patches')
-rw-r--r-- | package/busybox/patches/110-telnetd.patch | 50 | ||||
-rw-r--r-- | package/busybox/patches/130-hexdump.patch | 32 | ||||
-rw-r--r-- | package/busybox/patches/220-http_address_binding.patch | 47 |
3 files changed, 47 insertions, 82 deletions
diff --git a/package/busybox/patches/110-telnetd.patch b/package/busybox/patches/110-telnetd.patch index e95757ee4e..f14143aa62 100644 --- a/package/busybox/patches/110-telnetd.patch +++ b/package/busybox/patches/110-telnetd.patch @@ -1,17 +1,16 @@ -diff -urN busybox-1.00-pre8/networking/telnetd.c busybox-1.00-pre8-openwrt/networking/telnetd.c ---- busybox-1.00-pre8/networking/telnetd.c 2004-02-22 03:45:57.000000000 -0600 -+++ busybox-1.00-pre8-openwrt/networking/telnetd.c 2004-03-05 01:32:57.000000000 -0600 -@@ -44,6 +44,8 @@ +diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnetd.c +--- busybox-1.1.0/networking/telnetd.c 2006-01-11 06:43:51.000000000 +0100 ++++ busybox-1.1.0-owrt/networking/telnetd.c 2006-01-14 17:41:20.000000000 +0100 +@@ -45,6 +45,7 @@ #include <arpa/telnet.h> #include <ctype.h> #include <sys/syslog.h> +#include <net/if.h> -+ #include "busybox.h" -@@ -384,11 +386,13 @@ - int portnbr = 23; +@@ -394,11 +395,13 @@ + struct in_addr bind_addr = { .s_addr = 0x0 }; #endif /* CONFIG_FEATURE_TELNETD_INETD */ int c; + char *interface_name = NULL; @@ -19,34 +18,33 @@ diff -urN busybox-1.00-pre8/networking/telnetd.c busybox-1.00-pre8-openwrt/netwo static const char options[] = #ifdef CONFIG_FEATURE_TELNETD_INETD - "f:l:"; --#else /* CONFIG_EATURE_TELNETD_INETD */ -- "f:l:p:"; + "i:f:l:"; -+#else /* CONFIG_FEATURE_TELNETD_INETD */ -+ "i:f:l:p:"; + #else /* CONFIG_EATURE_TELNETD_INETD */ +- "f:l:p:b:"; ++ "i:f:l:p:b:"; #endif /* CONFIG_FEATURE_TELNETD_INETD */ int maxlen, w, r; -@@ -403,6 +407,9 @@ +@@ -413,6 +416,9 @@ case 'f': - issuefile = strdup (optarg); + issuefile = optarg; break; -+ case 'i': -+ interface_name = strdup(optarg); -+ break; ++ case 'i': ++ interface_name = strdup(optarg); ++ break; case 'l': - loginpath = strdup (optarg); + loginpath = optarg; break; -@@ -442,6 +449,13 @@ - sa.sin_family = AF_INET; - sa.sin_port = htons(portnbr); +@@ -465,6 +471,13 @@ + sa.sin_addr = bind_addr; + #endif -+ /* Set it to listen on the specified interface */ -+ if (interface_name) { -+ strncpy(interface.ifr_ifrn.ifrn_name, interface_name, IFNAMSIZ); -+ (void)setsockopt(master_fd, SOL_SOCKET, -+ SO_BINDTODEVICE, &interface, sizeof(interface)); -+ } ++ /* Set it to listen on the specified interface */ ++ if (interface_name) { ++ strncpy(interface.ifr_ifrn.ifrn_name, interface_name, IFNAMSIZ); ++ (void)setsockopt(master_fd, SOL_SOCKET, ++ SO_BINDTODEVICE, &interface, sizeof(interface)); ++ } + if (bind(master_fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) { bb_perror_msg_and_die("bind"); diff --git a/package/busybox/patches/130-hexdump.patch b/package/busybox/patches/130-hexdump.patch deleted file mode 100644 index 6da33d48ec..0000000000 --- a/package/busybox/patches/130-hexdump.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- busybox-1.00/include/usage.h 2005-03-08 01:10:55.885302128 -0500 -+++ busybox-1.00/include/usage.h 2005-03-08 01:10:39.226834600 -0500 -@@ -956,6 +956,7 @@ - "\t-b\t\tOne-byte octal display\n" \ - "\t-c\t\tOne-byte character display\n" \ - "\t-d\t\tTwo-byte decimal display\n" \ -+ "\t-C\t\tCanonical hex+ASCII display\n" \ - "\t-e FORMAT STRING\n" \ - "\t-f FORMAT FILE\n" \ - "\t-n LENGTH\tInterpret only length bytes of input\n" \ ---- busybox-1.00/util-linux/hexdump.c 2003-03-19 04:13:01.000000000 -0500 -+++ busybox-1.00/util-linux/hexdump.c 2005-03-08 01:02:42.509306680 -0500 -@@ -57,7 +57,7 @@ - - static const char add_first[] = "\"%07.7_Ax\n\""; - --static const char hexdump_opts[] = "bcdoxe:f:n:s:v"; -+static const char hexdump_opts[] = "bcdoxCe:f:n:s:v"; - - static const struct suffix_mult suffixes[] = { - {"b", 512 }, -@@ -82,6 +82,10 @@ - bb_dump_add(add_strings[(int)(p - hexdump_opts)]); - } else { - /* Sae a little bit of space below by omitting the 'else's. */ -+ if (ch == 'C') { -+ bb_dump_add("\"%08.8_ax \" 8/1 \"%02x \" \" \" 8/1 \"%02x \" "); -+ bb_dump_add("\" |\" 16/1 \"%_p\" \"|\\n\""); -+ } /* else */ - if (ch == 'e') { - bb_dump_add(optarg); - } /* else */ diff --git a/package/busybox/patches/220-http_address_binding.patch b/package/busybox/patches/220-http_address_binding.patch index b965cb8b6a..3958e2f6df 100644 --- a/package/busybox/patches/220-http_address_binding.patch +++ b/package/busybox/patches/220-http_address_binding.patch @@ -1,5 +1,6 @@ ---- busybox-1.1.0-pre1.orig/networking/httpd.c 2005-11-01 00:55:15.000000000 +0100 -+++ busybox-1.1.0-pre1/networking/httpd.c 2006-01-07 00:58:45.000000000 +0100 +diff -ur busybox-1.1.0/networking/httpd.c busybox-1.1.0-owrt/networking/httpd.c +--- busybox-1.1.0/networking/httpd.c 2006-01-11 06:43:51.000000000 +0100 ++++ busybox-1.1.0-owrt/networking/httpd.c 2006-01-14 17:56:53.000000000 +0100 @@ -150,6 +150,7 @@ /* You can use this server as standalone, require libbb.a for linking */ @@ -8,7 +9,7 @@ /* Config options, disable this for do very small module */ //#define CONFIG_FEATURE_HTTPD_CGI -@@ -184,7 +185,7 @@ +@@ -202,7 +203,7 @@ void bb_show_usage(void) { fprintf(stderr, "Usage: %s [-p <port>] [-c configFile] [-d/-e <string>] " @@ -17,7 +18,7 @@ exit(1); } #endif -@@ -234,6 +235,7 @@ +@@ -256,6 +257,7 @@ #endif unsigned port; /* server initial port and for set env REMOTE_PORT */ @@ -25,7 +26,7 @@ union HTTPD_FOUND { const char *found_mime_type; const char *found_moved_temporarily; -@@ -826,6 +828,13 @@ +@@ -858,6 +860,13 @@ sprintf(buf, "%u", config->port); addEnv(port_name, "PORT", buf); } @@ -39,7 +40,7 @@ #endif #endif /* CONFIG_FEATURE_HTTPD_CGI */ -@@ -910,7 +919,14 @@ +@@ -942,7 +951,14 @@ /* inet_addr() returns a value that is already in network order */ memset(&lsocket, 0, sizeof(lsocket)); lsocket.sin_family = AF_INET; @@ -55,32 +56,30 @@ lsocket.sin_port = htons(config->port) ; fd = socket(AF_INET, SOCK_STREAM, 0); if (fd >= 0) { -@@ -1943,7 +1959,7 @@ - #define OPT_INC_2 0 - #endif +@@ -1971,7 +1987,7 @@ + #define OPT_INC_3 ENABLE_FEATURE_HTTPD_AUTH_MD5 + #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY -- "p:v" -+ "p:v:l" +- "p:" ++ "p:l" + #endif #ifdef CONFIG_FEATURE_HTTPD_SETUID "u:" - #endif -@@ -1957,8 +1973,9 @@ - #define OPT_REALM (1<<(3+OPT_INC_1)) - #define OPT_MD5 (1<<(4+OPT_INC_1)) - #define OPT_PORT (1<<(3+OPT_INC_1+OPT_INC_2)) --#define OPT_DEBUG (1<<(4+OPT_INC_1+OPT_INC_2)) --#define OPT_SETUID (1<<(5+OPT_INC_1+OPT_INC_2)) -+#define OPT_ADDR (1<<(4+OPT_INC_1+OPT_INC_2)) -+#define OPT_DEBUG (1<<(5+OPT_INC_1+OPT_INC_2)) -+#define OPT_SETUID (1<<(6+OPT_INC_1+OPT_INC_2)) +@@ -1985,6 +2001,7 @@ + #define OPT_REALM (1<<(2+OPT_INC_1+OPT_INC_2)) /* r */ + #define OPT_MD5 (1<<(2+OPT_INC_1+OPT_INC_2+OPT_INC_3)) /* m */ + #define OPT_PORT (1<<(3+OPT_INC_1+OPT_INC_2+OPT_INC_3)) /* p */ ++#define OPT_ADDR (1<<(4+OPT_INC_1+OPT_INC_2+OPT_INC_3)) /* l */ + #define OPT_SETUID (1<<(4+OPT_INC_1+OPT_INC_2+OPT_INC_3)) /* u */ - #ifdef HTTPD_STANDALONE -@@ -2014,6 +2031,7 @@ +@@ -2038,6 +2055,7 @@ #endif #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY , &s_port + , &(config->addr) + #endif #ifdef CONFIG_FEATURE_HTTPD_SETUID , &s_uid - #endif +Only in busybox-1.1.0-owrt/networking: httpd.c.orig +Only in busybox-1.1.0-owrt/networking: httpd.c.rej |