diff options
author | kaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-04-02 15:16:27 +0000 |
---|---|---|
committer | kaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-04-02 15:16:27 +0000 |
commit | 2fe852f5c07ba65b7187648179a14de23f7c08fc (patch) | |
tree | dd27b4d967b2bf3751f22472f5299840a49bf0f7 /package/busybox | |
parent | f75ae26ce6e74bb4096194e114d84537213a7ee7 (diff) |
upgrade busybox to v1.1.1
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3578 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/busybox')
-rw-r--r-- | package/busybox/Makefile | 4 | ||||
-rw-r--r-- | package/busybox/patches/100-killall5.patch | 52 | ||||
-rw-r--r-- | package/busybox/patches/150-udhcp-release.patch | 40 | ||||
-rw-r--r-- | package/busybox/patches/300-netmsg.patch | 46 | ||||
-rw-r--r-- | package/busybox/patches/320-httpd_address_binding.patch | 87 | ||||
-rw-r--r-- | package/busybox/patches/330-httpd_user_agent.patch | 17 | ||||
-rw-r--r-- | package/busybox/patches/500-hotfixes.patch | 212 |
7 files changed, 337 insertions, 121 deletions
diff --git a/package/busybox/Makefile b/package/busybox/Makefile index 50faa275dc..0cc3a1bcbc 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -13,11 +13,11 @@ PKG_SOURCE:=$(PKG_NAME)-snapshot.tar.bz2 PKG_SOURCE_URL:=http://www.busybox.net/downloads/snapshots PKG_MD5SUM:=x else -PKG_VERSION:=1.1.0 +PKG_VERSION:=1.1.1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.busybox.net/downloads -PKG_MD5SUM:=855e12c7c9dc90e16b014a788925e4cb +PKG_MD5SUM:=ff1ade47255c643b68c9113c267ce712 endif PKG_CAT:=bzcat diff --git a/package/busybox/patches/100-killall5.patch b/package/busybox/patches/100-killall5.patch index 161b7e6f25..6f1585d0d4 100644 --- a/package/busybox/patches/100-killall5.patch +++ b/package/busybox/patches/100-killall5.patch @@ -1,20 +1,18 @@ -diff -urN busybox-dist/include/applets.h busybox/include/applets.h ---- busybox-dist/include/applets.h 2004-03-13 02:33:09.000000000 -0600 -+++ busybox/include/applets.h 2004-03-16 09:45:29.000000000 -0600 -@@ -313,6 +313,9 @@ - #ifdef CONFIG_KILLALL - APPLET(killall, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) - #endif -+#ifdef CONFIG_KILLALL5 -+ APPLET(killall5, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) -+#endif - #ifdef CONFIG_KLOGD - APPLET(klogd, klogd_main, _BB_DIR_SBIN, _BB_SUID_NEVER) - #endif -diff -urN busybox-dist/include/usage.h busybox/include/usage.h ---- busybox-dist/include/usage.h 2004-03-13 02:33:09.000000000 -0600 -+++ busybox/include/usage.h 2004-03-16 09:45:29.000000000 -0600 -@@ -1389,6 +1389,13 @@ +diff -Nur busybox-1.1.1/include/applets.h busybox-1.1.1-owrt/include/applets.h +--- busybox-1.1.1/include/applets.h 2006-03-22 22:16:24.000000000 +0100 ++++ busybox-1.1.1-owrt/include/applets.h 2006-04-01 18:23:43.000000000 +0200 +@@ -154,6 +154,7 @@ + USE_IPTUNNEL(APPLET(iptunnel, iptunnel_main, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_KILL(APPLET(kill, kill_main, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_KILLALL(APPLET(killall, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) ++USE_KILLALL5(APPLET(killall5, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_KLOGD(APPLET(klogd, klogd_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) + USE_LASH(APPLET(lash, lash_main, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_LAST(APPLET(last, last_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) +diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h +--- busybox-1.1.1/include/usage.h 2006-03-22 22:16:24.000000000 +0100 ++++ busybox-1.1.1-owrt/include/usage.h 2006-04-01 18:22:53.000000000 +0200 +@@ -1598,6 +1598,13 @@ #define killall_example_usage \ "$ killall apache\n" @@ -28,10 +26,10 @@ diff -urN busybox-dist/include/usage.h busybox/include/usage.h #define klogd_trivial_usage \ "[-c n] [-n]" #define klogd_full_usage \ -diff -urN busybox-dist/procps/Config.in busybox/procps/Config.in ---- busybox-dist/procps/Config.in 2003-12-24 00:02:11.000000000 -0600 -+++ busybox/procps/Config.in 2004-03-16 09:45:29.000000000 -0600 -@@ -30,6 +30,11 @@ +diff -Nur busybox-1.1.1/procps/Config.in busybox-1.1.1-owrt/procps/Config.in +--- busybox-1.1.1/procps/Config.in 2006-03-22 22:16:25.000000000 +0100 ++++ busybox-1.1.1-owrt/procps/Config.in 2006-04-01 18:22:53.000000000 +0200 +@@ -38,6 +38,11 @@ specified commands. If no signal name is specified, SIGTERM is sent. @@ -43,18 +41,18 @@ diff -urN busybox-dist/procps/Config.in busybox/procps/Config.in config CONFIG_PIDOF bool "pidof" default n -diff -urN busybox-dist/procps/kill.c busybox/procps/kill.c ---- busybox-dist/procps/kill.c 2004-03-15 02:29:03.000000000 -0600 -+++ busybox/procps/kill.c 2004-03-16 09:45:29.000000000 -0600 +diff -Nur busybox-1.1.1/procps/kill.c busybox-1.1.1-owrt/procps/kill.c +--- busybox-1.1.1/procps/kill.c 2006-03-22 22:16:25.000000000 +0100 ++++ busybox-1.1.1-owrt/procps/kill.c 2006-04-01 18:22:53.000000000 +0200 @@ -34,6 +34,7 @@ #define KILL 0 #define KILLALL 1 +#define KILLALL5 2 - extern int kill_main(int argc, char **argv) + int kill_main(int argc, char **argv) { -@@ -47,6 +48,9 @@ +@@ -48,6 +49,9 @@ #else whichApp = KILL; #endif @@ -64,7 +62,7 @@ diff -urN busybox-dist/procps/kill.c busybox/procps/kill.c /* Parse any options */ if (argc < 2) -@@ -119,6 +123,20 @@ +@@ -126,6 +130,20 @@ } } diff --git a/package/busybox/patches/150-udhcp-release.patch b/package/busybox/patches/150-udhcp-release.patch index 8f9665f8e8..6420ae6a6a 100644 --- a/package/busybox/patches/150-udhcp-release.patch +++ b/package/busybox/patches/150-udhcp-release.patch @@ -1,18 +1,18 @@ -diff -Nur busybox-1.1.0-pre1/include/usage.h busybox-1.1.0-pre1.openwrt/include/usage.h ---- busybox-1.1.0-pre1/include/usage.h 2005-11-01 00:55:34.000000000 +0100 -+++ busybox-1.1.0-pre1.openwrt/include/usage.h 2005-11-30 11:10:24.000000000 +0100 -@@ -3119,6 +3119,7 @@ +diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h +--- busybox-1.1.1/include/usage.h 2006-04-01 18:26:21.000000000 +0200 ++++ busybox-1.1.1-owrt/include/usage.h 2006-04-01 18:27:45.000000000 +0200 +@@ -3268,6 +3268,7 @@ "\t-n,\t--now\tExit with failure if lease cannot be immediately negotiated\n" \ "\t-p,\t--pidfile=file\tStore process ID of daemon in file\n" \ "\t-q,\t--quit\tQuit after obtaining lease\n" \ + "\t-R,\t--release\tRelease IP on quit\n" \ "\t-r,\t--request=IP\tIP address to request (default: none)\n" \ "\t-s,\t--script=file\tRun file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \ - "\t-v,\t--version\tDisplay version" -diff -Nur busybox-1.1.0-pre1/networking/udhcp/dhcpc.c busybox-1.1.0-pre1.openwrt/networking/udhcp/dhcpc.c ---- busybox-1.1.0-pre1/networking/udhcp/dhcpc.c 2005-11-01 00:55:15.000000000 +0100 -+++ busybox-1.1.0-pre1.openwrt/networking/udhcp/dhcpc.c 2005-11-30 11:17:22.000000000 +0100 -@@ -61,6 +61,7 @@ + "\t-t,\t--retries=NUM\tSend up to NUM request packets\n"\ +diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/udhcp/dhcpc.c +--- busybox-1.1.1/networking/udhcp/dhcpc.c 2006-03-22 22:16:19.000000000 +0100 ++++ busybox-1.1.1-owrt/networking/udhcp/dhcpc.c 2006-04-01 18:28:19.000000000 +0200 +@@ -49,6 +49,7 @@ .abort_if_no_lease = 0, .foreground = 0, .quit_after_lease = 0, @@ -20,7 +20,7 @@ diff -Nur busybox-1.1.0-pre1/networking/udhcp/dhcpc.c busybox-1.1.0-pre1.openwrt .background_if_no_lease = 0, .interface = "eth0", .pidfile = NULL, -@@ -92,6 +93,7 @@ +@@ -82,6 +83,7 @@ " immediately negotiated.\n" " -p, --pidfile=file Store process ID of daemon in file\n" " -q, --quit Quit after obtaining lease\n" @@ -28,24 +28,24 @@ diff -Nur busybox-1.1.0-pre1/networking/udhcp/dhcpc.c busybox-1.1.0-pre1.openwrt " -r, --request=IP IP address to request (default: none)\n" " -s, --script=file Run file at dhcp events (default:\n" " " DEFAULT_SCRIPT ")\n" -@@ -211,6 +213,7 @@ - {"now", no_argument, 0, 'n'}, +@@ -203,6 +205,7 @@ + {"now", no_argument, 0, 'n'}, {"pidfile", required_argument, 0, 'p'}, {"quit", no_argument, 0, 'q'}, + {"release", no_argument, 0, 'R'}, {"request", required_argument, 0, 'r'}, {"script", required_argument, 0, 's'}, - {"version", no_argument, 0, 'v'}, -@@ -220,7 +223,7 @@ + {"timeout", required_argument, 0, 'T'}, +@@ -214,7 +217,7 @@ /* get options */ while (1) { int option_index = 0; -- c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qr:s:v", arg_options, &option_index); -+ c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:v", arg_options, &option_index); +- c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qr:s:T:t:v", arg_options, &option_index); ++ c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:v", arg_options, &option_index); if (c == -1) break; switch (c) { -@@ -290,6 +293,9 @@ +@@ -284,6 +287,9 @@ case 'q': client_config.quit_after_lease = 1; break; @@ -85,9 +85,9 @@ diff -Nur busybox-1.1.0-pre1/networking/udhcp/dhcpc.c busybox-1.1.0-pre1.openwrt } } else if (retval == -1 && errno == EINTR) { /* a signal was caught */ -diff -Nur busybox-1.1.0-pre1/networking/udhcp/dhcpc.h busybox-1.1.0-pre1.openwrt/networking/udhcp/dhcpc.h ---- busybox-1.1.0-pre1/networking/udhcp/dhcpc.h 2005-11-01 00:55:15.000000000 +0100 -+++ busybox-1.1.0-pre1.openwrt/networking/udhcp/dhcpc.h 2005-11-30 11:18:00.000000000 +0100 +diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.h busybox-1.1.1-owrt/networking/udhcp/dhcpc.h +--- busybox-1.1.1/networking/udhcp/dhcpc.h 2006-03-22 22:16:19.000000000 +0100 ++++ busybox-1.1.1-owrt/networking/udhcp/dhcpc.h 2006-04-01 18:27:45.000000000 +0200 @@ -19,6 +19,7 @@ struct client_config_t { char foreground; /* Do not fork */ diff --git a/package/busybox/patches/300-netmsg.patch b/package/busybox/patches/300-netmsg.patch index 22ca172c5c..efc4c337c2 100644 --- a/package/busybox/patches/300-netmsg.patch +++ b/package/busybox/patches/300-netmsg.patch @@ -1,20 +1,18 @@ -diff -urN busybox.old/include/applets.h busybox.dev/include/applets.h ---- busybox.old/include/applets.h 2006-01-11 01:32:47.302791000 +0100 -+++ busybox.dev/include/applets.h 2006-01-11 01:33:18.744756250 +0100 -@@ -475,6 +475,9 @@ - #ifdef CONFIG_NC - APPLET(nc, nc_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) - #endif -+#ifdef CONFIG_NETMSG -+ APPLET_NOUSAGE("netmsg", netmsg_main, _BB_DIR_BIN, _BB_SUID_ALWAYS) -+#endif - #ifdef CONFIG_NETSTAT - APPLET(netstat, netstat_main, _BB_DIR_BIN, _BB_SUID_NEVER) - #endif -diff -urN busybox.old/networking/Config.in busybox.dev/networking/Config.in ---- busybox.old/networking/Config.in 2005-11-01 00:55:15.000000000 +0100 -+++ busybox.dev/networking/Config.in 2006-01-11 01:33:18.744756250 +0100 -@@ -435,6 +435,12 @@ +diff -Nur busybox-1.1.1/include/applets.h busybox-1.1.1-owrt/include/applets.h +--- busybox-1.1.1/include/applets.h 2006-04-01 18:26:21.000000000 +0200 ++++ busybox-1.1.1-owrt/include/applets.h 2006-04-01 18:36:28.000000000 +0200 +@@ -197,6 +197,7 @@ + USE_MV(APPLET(mv, mv_main, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_NAMEIF(APPLET(nameif, nameif_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) + USE_NC(APPLET(nc, nc_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) ++USE_NETMSG(APPLET_NOUSAGE("netmsg", netmsg_main, _BB_DIR_BIN, _BB_SUID_ALWAYS)) + USE_NETSTAT(APPLET(netstat, netstat_main, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_NICE(APPLET(nice, nice_main, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_NOHUP(APPLET(nohup, nohup_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) +diff -Nur busybox-1.1.1/networking/Config.in busybox-1.1.1-owrt/networking/Config.in +--- busybox-1.1.1/networking/Config.in 2006-03-22 22:16:19.000000000 +0100 ++++ busybox-1.1.1-owrt/networking/Config.in 2006-04-01 18:35:32.000000000 +0200 +@@ -451,6 +451,12 @@ help A simple Unix utility which reads and writes data across network connections. @@ -27,10 +25,10 @@ diff -urN busybox.old/networking/Config.in busybox.dev/networking/Config.in config CONFIG_NC_GAPING_SECURITY_HOLE bool "gaping security hole" -diff -urN busybox.old/networking/Makefile.in busybox.dev/networking/Makefile.in ---- busybox.old/networking/Makefile.in 2005-11-01 00:55:15.000000000 +0100 -+++ busybox.dev/networking/Makefile.in 2006-01-11 01:34:02.939518250 +0100 -@@ -28,6 +28,7 @@ +diff -Nur busybox-1.1.1/networking/Makefile.in busybox-1.1.1-owrt/networking/Makefile.in +--- busybox-1.1.1/networking/Makefile.in 2006-03-22 22:16:19.000000000 +0100 ++++ busybox-1.1.1-owrt/networking/Makefile.in 2006-04-01 18:35:32.000000000 +0200 +@@ -30,6 +30,7 @@ NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o NETWORKING-$(CONFIG_NAMEIF) += nameif.o NETWORKING-$(CONFIG_NC) += nc.o @@ -38,9 +36,9 @@ diff -urN busybox.old/networking/Makefile.in busybox.dev/networking/Makefile.in NETWORKING-$(CONFIG_NETSTAT) += netstat.o NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o NETWORKING-$(CONFIG_PING) += ping.o -diff -urN busybox.old/networking/netmsg.c busybox.dev/networking/netmsg.c ---- busybox.old/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100 -+++ busybox.dev/networking/netmsg.c 2006-01-11 01:33:18.748756500 +0100 +diff -Nur busybox-1.1.1/networking/netmsg.c busybox-1.1.1-owrt/networking/netmsg.c +--- busybox-1.1.1/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox-1.1.1-owrt/networking/netmsg.c 2006-04-01 18:35:32.000000000 +0200 @@ -0,0 +1,58 @@ +#include <sys/types.h> +#include <sys/socket.h> diff --git a/package/busybox/patches/320-httpd_address_binding.patch b/package/busybox/patches/320-httpd_address_binding.patch index 2c2d517c60..288900b91f 100644 --- a/package/busybox/patches/320-httpd_address_binding.patch +++ b/package/busybox/patches/320-httpd_address_binding.patch @@ -1,14 +1,14 @@ ---- busybox-1.1.0.orig/networking/httpd.c 2006-02-06 16:02:30.000000000 +0100 -+++ busybox-1.1.0/networking/httpd.c 2006-02-06 16:25:34.000000000 +0100 -@@ -109,6 +109,7 @@ +--- busybox-1.1.1/networking/httpd.c 2006-03-22 22:16:19.000000000 +0100 ++++ busybox-1.1.1.new/networking/httpd.c 2006-04-01 19:41:42.150744624 +0200 +@@ -110,6 +110,7 @@ #include <sys/types.h> #include <sys/socket.h> /* for connect and socket*/ #include <netinet/in.h> /* for sockaddr_in */ -+#include <arpa/inet.h> /* for inet_aton */ ++#include <arpa/inet.h> #include <sys/time.h> #include <sys/stat.h> #include <sys/wait.h> -@@ -201,8 +202,8 @@ +@@ -204,8 +205,8 @@ void bb_show_usage(void) { @@ -19,15 +19,15 @@ exit(1); } #endif -@@ -256,6 +257,7 @@ +@@ -255,6 +256,7 @@ #endif unsigned port; /* server initial port and for set env REMOTE_PORT */ -+ char *address; /* server initial address */ ++ char *address; union HTTPD_FOUND { const char *found_mime_type; const char *found_moved_temporarily; -@@ -942,7 +944,10 @@ +@@ -958,7 +960,10 @@ /* inet_addr() returns a value that is already in network order */ memset(&lsocket, 0, sizeof(lsocket)); lsocket.sin_family = AF_INET; @@ -39,34 +39,41 @@ lsocket.sin_port = htons(config->port) ; fd = socket(AF_INET, SOCK_STREAM, 0); if (fd >= 0) { -@@ -1985,7 +1990,7 @@ - #define OPT_INC_3 ENABLE_FEATURE_HTTPD_AUTH_MD5 +@@ -1996,6 +2001,7 @@ + USE_FEATURE_HTTPD_AUTH_MD5(m_opt_md5,) + USE_FEATURE_HTTPD_SETUID(u_opt_setuid,) + SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(p_opt_port,) ++ SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(l_opt_addr,) + }; - #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY -- "p:" -+ "p:l:" - #endif - #ifdef CONFIG_FEATURE_HTTPD_SETUID - "u:" -@@ -1999,7 +2004,8 @@ - #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_SETUID (1<<(4+OPT_INC_1+OPT_INC_2+OPT_INC_3)) /* u */ -+#define OPT_ADDRESS (1<<(4+OPT_INC_1+OPT_INC_2+OPT_INC_3)) /* l */ -+#define OPT_SETUID (1<<(5+OPT_INC_1+OPT_INC_2+OPT_INC_3)) /* u */ + static const char httpd_opts[]="c:d:h:" +@@ -2003,7 +2009,7 @@ + USE_FEATURE_HTTPD_BASIC_AUTH("r:") + USE_FEATURE_HTTPD_AUTH_MD5("m:") + USE_FEATURE_HTTPD_SETUID("u:") +- SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY("p:"); ++ SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY("p:l:"); + #define OPT_CONFIG_FILE (1<<c_opt_config_file) + #define OPT_DECODE_URL (1<<d_opt_decode_url) +@@ -2024,6 +2030,8 @@ + #define OPT_PORT SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY((1<<p_opt_port)) \ + USE_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(0) + ++#define OPT_ADDRESS SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY((1<<l_opt_addr)) \ ++ USE_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(0) #ifdef HTTPD_STANDALONE -@@ -2016,6 +2022,7 @@ - #endif - #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY - const char *s_port; -+ const char *s_addr; - int server; - #endif + int main(int argc, char *argv[]) +@@ -2036,6 +2044,7 @@ + char *url_for_decode; + USE_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;) + SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(const char *s_port;) ++ SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(const char *s_addr;) + SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(int server;) -@@ -2035,6 +2042,7 @@ + USE_FEATURE_HTTPD_SETUID(const char *s_uid;) +@@ -2050,6 +2059,7 @@ #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY config->port = 80; @@ -74,15 +81,15 @@ #endif config->ContentLength = -1; -@@ -2052,6 +2060,7 @@ - #endif - #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY - , &s_port -+ , &s_addr - #endif - #ifdef CONFIG_FEATURE_HTTPD_SETUID - , &s_uid -@@ -2077,6 +2086,8 @@ +@@ -2061,6 +2071,7 @@ + USE_FEATURE_HTTPD_AUTH_MD5(, &pass) + USE_FEATURE_HTTPD_SETUID(, &s_uid) + SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(, &s_port) ++ SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(, &s_addr) + ); + + if(opt & OPT_DECODE_URL) { +@@ -2082,6 +2093,8 @@ #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY if(opt & OPT_PORT) config->port = bb_xgetlarg(s_port, 10, 1, 0xffff); diff --git a/package/busybox/patches/330-httpd_user_agent.patch b/package/busybox/patches/330-httpd_user_agent.patch index 7cf3f5337a..bbe01f7826 100644 --- a/package/busybox/patches/330-httpd_user_agent.patch +++ b/package/busybox/patches/330-httpd_user_agent.patch @@ -1,14 +1,15 @@ ---- busybox-1.1.0.orig/networking/httpd.c 2006-02-06 16:41:57.000000000 +0100 -+++ busybox-1.1.0/networking/httpd.c 2006-02-06 16:41:26.000000000 +0100 +diff -Nur busybox-1.1.1/networking/httpd.c busybox-1.1.1-owrt/networking/httpd.c +--- busybox-1.1.1/networking/httpd.c 2006-04-01 19:42:36.000000000 +0200 ++++ busybox-1.1.1-owrt/networking/httpd.c 2006-04-01 19:43:59.000000000 +0200 @@ -247,6 +247,7 @@ + const char *query; - #ifdef CONFIG_FEATURE_HTTPD_CGI - char *referer; -+ char *user_agent; - #endif + USE_FEATURE_HTTPD_CGI(char *referer;) ++ USE_FEATURE_HTTPD_CGI(char *user_agent;) const char *configFile; -@@ -1192,6 +1193,7 @@ + +@@ -1208,6 +1209,7 @@ addEnv("SERVER", "PROTOCOL", "HTTP/1.0"); addEnv("GATEWAY_INTERFACE", "", "CGI/1.1"); addEnv("REMOTE", "ADDR", config->rmt_ip_str); @@ -16,7 +17,7 @@ #ifdef CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV addEnvPort("REMOTE"); #endif -@@ -1737,6 +1739,10 @@ +@@ -1771,6 +1773,10 @@ for(test = buf + 8; isspace(*test); test++) ; config->referer = strdup(test); diff --git a/package/busybox/patches/500-hotfixes.patch b/package/busybox/patches/500-hotfixes.patch new file mode 100644 index 0000000000..f4451fdc78 --- /dev/null +++ b/package/busybox/patches/500-hotfixes.patch @@ -0,0 +1,212 @@ +diff -Nur busybox-1.1.1/findutils/find.c busybox-1.1.1-owrt/findutils/find.c +--- busybox-1.1.1/findutils/find.c 2006-03-22 22:16:25.000000000 +0100 ++++ busybox-1.1.1-owrt/findutils/find.c 2006-04-01 19:23:30.000000000 +0200 +@@ -79,6 +79,15 @@ + + static int fileAction(const char *fileName, struct stat *statbuf, void* junk) + { ++#ifdef CONFIG_FEATURE_FIND_XDEV ++ if (S_ISDIR(statbuf->st_mode) && xdev_count) { ++ int i; ++ for (i=0; i<xdev_count; i++) { ++ if (xdev_dev[i] != statbuf->st_dev) ++ return SKIP; ++ } ++ } ++#endif + if (pattern != NULL) { + const char *tmp = strrchr(fileName, '/'); + +@@ -125,21 +134,6 @@ + goto no_match; + } + #endif +-#ifdef CONFIG_FEATURE_FIND_XDEV +- if (xdev_count) { +- int i; +- for (i=0; i<xdev_count; i++) { +- if (xdev_dev[i] == statbuf-> st_dev) +- break; +- } +- if (i == xdev_count) { +- if(S_ISDIR(statbuf->st_mode)) +- return SKIP; +- else +- goto no_match; +- } +- } +-#endif + #ifdef CONFIG_FEATURE_FIND_NEWER + if (newer_mtime != 0) { + time_t file_age = newer_mtime - statbuf->st_mtime; +diff -Nur busybox-1.1.1/libbb/Makefile.in busybox-1.1.1-owrt/libbb/Makefile.in +--- busybox-1.1.1/libbb/Makefile.in 2006-03-22 22:16:22.000000000 +0100 ++++ busybox-1.1.1-owrt/libbb/Makefile.in 2006-04-01 19:23:30.000000000 +0200 +@@ -39,6 +39,7 @@ + # conditionally compiled objects: + LIBBB-$(CONFIG_FEATURE_SHADOWPASSWDS)+=pwd2spwd.c + LIBBB-$(CONFIG_FEATURE_MOUNT_LOOP)+= loop.c ++LIBBB-$(CONFIG_LOSETUP)+= loop.c + LIBBB-$(CONFIG_FEATURE_MTAB_SUPPORT)+= mtab.c + LIBBB-$(CONFIG_PASSWD)+= pw_encrypt.c + LIBBB-$(CONFIG_SULOGIN)+= pw_encrypt.c +diff -Nur busybox-1.1.1/modutils/insmod.c busybox-1.1.1-owrt/modutils/insmod.c +--- busybox-1.1.1/modutils/insmod.c 2006-03-22 22:16:20.000000000 +0100 ++++ busybox-1.1.1-owrt/modutils/insmod.c 2006-04-01 19:23:30.000000000 +0200 +@@ -516,12 +516,6 @@ + #include <elf.h> + #include <endian.h> + +-#if BB_LITTLE_ENDIAN +-# define ELFDATAM ELFDATA2LSB +-#else +-# define ELFDATAM ELFDATA2MSB +-#endif +- + #ifndef ElfW + # if ELFCLASSM == ELFCLASS32 + # define ElfW(x) Elf32_ ## x +@@ -3331,7 +3325,8 @@ + return NULL; + } + if (f->header.e_ident[EI_CLASS] != ELFCLASSM +- || f->header.e_ident[EI_DATA] != ELFDATAM ++ || f->header.e_ident[EI_DATA] != (BB_BIG_ENDIAN ++ ? ELFDATA2MSB : ELFDATA2LSB) + || f->header.e_ident[EI_VERSION] != EV_CURRENT + || !MATCH_MACHINE(f->header.e_machine)) { + bb_error_msg("ELF file not for this architecture"); +diff -Nur busybox-1.1.1/util-linux/Makefile.in busybox-1.1.1-owrt/util-linux/Makefile.in +--- busybox-1.1.1/util-linux/Makefile.in 2006-03-22 22:16:26.000000000 +0100 ++++ busybox-1.1.1-owrt/util-linux/Makefile.in 2006-04-01 19:23:30.000000000 +0200 +@@ -38,6 +38,8 @@ + UTILLINUX-$(CONFIG_SWITCH_ROOT) +=switch_root.o + UTILLINUX-$(CONFIG_UMOUNT) +=umount.o + ++UTILLINUX-y:=$(sort $(UTILLINUX-y)) ++ + ifneq ($(strip $(UTILLINUX-y)),) + libraries-y+=$(UTILLINUX_DIR)$(UTILLINUX_AR) + endif +diff -Nur busybox-1.1.1/util-linux/mount.c busybox-1.1.1-owrt/util-linux/mount.c +--- busybox-1.1.1/util-linux/mount.c 2006-03-22 22:16:26.000000000 +0100 ++++ busybox-1.1.1-owrt/util-linux/mount.c 2006-04-01 19:23:30.000000000 +0200 +@@ -184,6 +184,8 @@ + { + llist_free(fslist); + } ++#else ++void delete_block_backed_filesystems(void); + #endif + + #if ENABLE_FEATURE_MTAB_SUPPORT +@@ -196,12 +198,9 @@ + + // Perform actual mount of specific filesystem at specific location. + +-static int mount_it_now(struct mntent *mp, int vfsflags) ++static int mount_it_now(struct mntent *mp, int vfsflags, char *filteropts) + { + int rc; +- char *filteropts = 0; +- +- parse_mount_options(mp->mnt_opts, &filteropts); + + if (fakeIt) { return 0; } + +@@ -217,8 +216,6 @@ + vfsflags |= MS_RDONLY; + } + +- free(filteropts); +- + // Abort entirely if permission denied. + + if (rc && errno == EPERM) +@@ -266,11 +263,11 @@ + static int singlemount(struct mntent *mp) + { + int rc = 1, vfsflags; +- char *loopFile = 0; ++ char *loopFile = 0, *filteropts = 0; + llist_t *fl = 0; + struct stat st; + +- vfsflags = parse_mount_options(mp->mnt_opts, 0); ++ vfsflags = parse_mount_options(mp->mnt_opts, &filteropts); + + // Treat fstype "auto" as unspecified. + +@@ -282,16 +279,16 @@ + (!mp->mnt_type || !strcmp(mp->mnt_type,"nfs")) && + strchr(mp->mnt_fsname, ':') != NULL) + { +- char *options=0; +- parse_mount_options(mp->mnt_opts, &options); +- if (nfsmount(mp->mnt_fsname, mp->mnt_dir, &vfsflags, &options, 1)) { ++ if (nfsmount(mp->mnt_fsname, mp->mnt_dir, &vfsflags, &filteropts, 1)) { + bb_perror_msg("nfsmount failed"); + return 1; ++ } else { ++ // Strangely enough, nfsmount() doesn't actually mount() anything. ++ rc = mount_it_now(mp, vfsflags, filteropts); ++ if (ENABLE_FEATURE_CLEAN_UP) free(filteropts); ++ ++ return rc; + } +- +- // Strangely enough, nfsmount() doesn't actually mount() anything. +- +- else return mount_it_now(mp, vfsflags); + } + + // Look at the file. (Not found isn't a failure for remount.) +@@ -324,7 +321,7 @@ + * to the actual mount. */ + + if (mp->mnt_type || (vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE))) +- rc = mount_it_now(mp, vfsflags); ++ rc = mount_it_now(mp, vfsflags, filteropts); + + // Loop through filesystem types until mount succeeds or we run out + +@@ -336,25 +333,26 @@ + + if (!fslist) { + fslist = get_block_backed_filesystems(); +-#if ENABLE_FEATURE_CLEAN_UP + if (ENABLE_FEATURE_CLEAN_UP && fslist) + atexit(delete_block_backed_filesystems); +-#endif + } + + for (fl = fslist; fl; fl = fl->link) { + mp->mnt_type = fl->data; + +- if (!(rc = mount_it_now(mp,vfsflags))) break; ++ if (!(rc = mount_it_now(mp,vfsflags, filteropts))) break; + + mp->mnt_type = 0; + } + } + +- // Mount failed. Clean up ++ if (ENABLE_FEATURE_CLEAN_UP) free(filteropts); ++ ++ // If mount failed, clean up loop file (if any). ++ + if (rc && loopFile) { + del_loop(mp->mnt_fsname); +- if(ENABLE_FEATURE_CLEAN_UP) { ++ if (ENABLE_FEATURE_CLEAN_UP) { + free(loopFile); + free(mp->mnt_fsname); + } +@@ -548,7 +546,6 @@ + if (ENABLE_FEATURE_CLEAN_UP) { + free(storage_path); + free(cmdopts); +- free(fstype); + } + + if(rc) |