1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-19 07:08:06 +02:00

upgrade busybox to v1.1.1

git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3578 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
kaloz 2006-04-02 15:16:27 +00:00
parent f75ae26ce6
commit 2fe852f5c0
7 changed files with 337 additions and 121 deletions

View File

@ -13,11 +13,11 @@ PKG_SOURCE:=$(PKG_NAME)-snapshot.tar.bz2
PKG_SOURCE_URL:=http://www.busybox.net/downloads/snapshots PKG_SOURCE_URL:=http://www.busybox.net/downloads/snapshots
PKG_MD5SUM:=x PKG_MD5SUM:=x
else else
PKG_VERSION:=1.1.0 PKG_VERSION:=1.1.1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.busybox.net/downloads PKG_SOURCE_URL:=http://www.busybox.net/downloads
PKG_MD5SUM:=855e12c7c9dc90e16b014a788925e4cb PKG_MD5SUM:=ff1ade47255c643b68c9113c267ce712
endif endif
PKG_CAT:=bzcat PKG_CAT:=bzcat

View File

@ -1,20 +1,18 @@
diff -urN busybox-dist/include/applets.h busybox/include/applets.h diff -Nur busybox-1.1.1/include/applets.h busybox-1.1.1-owrt/include/applets.h
--- busybox-dist/include/applets.h 2004-03-13 02:33:09.000000000 -0600 --- busybox-1.1.1/include/applets.h 2006-03-22 22:16:24.000000000 +0100
+++ busybox/include/applets.h 2004-03-16 09:45:29.000000000 -0600 +++ busybox-1.1.1-owrt/include/applets.h 2006-04-01 18:23:43.000000000 +0200
@@ -313,6 +313,9 @@ @@ -154,6 +154,7 @@
#ifdef CONFIG_KILLALL USE_IPTUNNEL(APPLET(iptunnel, iptunnel_main, _BB_DIR_BIN, _BB_SUID_NEVER))
APPLET(killall, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) USE_KILL(APPLET(kill, kill_main, _BB_DIR_BIN, _BB_SUID_NEVER))
#endif USE_KILLALL(APPLET(killall, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+#ifdef CONFIG_KILLALL5 +USE_KILLALL5(APPLET(killall5, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+ APPLET(killall5, kill_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) USE_KLOGD(APPLET(klogd, klogd_main, _BB_DIR_SBIN, _BB_SUID_NEVER))
+#endif USE_LASH(APPLET(lash, lash_main, _BB_DIR_BIN, _BB_SUID_NEVER))
#ifdef CONFIG_KLOGD USE_LAST(APPLET(last, last_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
APPLET(klogd, klogd_main, _BB_DIR_SBIN, _BB_SUID_NEVER) diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h
#endif --- busybox-1.1.1/include/usage.h 2006-03-22 22:16:24.000000000 +0100
diff -urN busybox-dist/include/usage.h busybox/include/usage.h +++ busybox-1.1.1-owrt/include/usage.h 2006-04-01 18:22:53.000000000 +0200
--- busybox-dist/include/usage.h 2004-03-13 02:33:09.000000000 -0600 @@ -1598,6 +1598,13 @@
+++ busybox/include/usage.h 2004-03-16 09:45:29.000000000 -0600
@@ -1389,6 +1389,13 @@
#define killall_example_usage \ #define killall_example_usage \
"$ killall apache\n" "$ killall apache\n"
@ -28,10 +26,10 @@ diff -urN busybox-dist/include/usage.h busybox/include/usage.h
#define klogd_trivial_usage \ #define klogd_trivial_usage \
"[-c n] [-n]" "[-c n] [-n]"
#define klogd_full_usage \ #define klogd_full_usage \
diff -urN busybox-dist/procps/Config.in busybox/procps/Config.in diff -Nur busybox-1.1.1/procps/Config.in busybox-1.1.1-owrt/procps/Config.in
--- busybox-dist/procps/Config.in 2003-12-24 00:02:11.000000000 -0600 --- busybox-1.1.1/procps/Config.in 2006-03-22 22:16:25.000000000 +0100
+++ busybox/procps/Config.in 2004-03-16 09:45:29.000000000 -0600 +++ busybox-1.1.1-owrt/procps/Config.in 2006-04-01 18:22:53.000000000 +0200
@@ -30,6 +30,11 @@ @@ -38,6 +38,11 @@
specified commands. If no signal name is specified, SIGTERM is specified commands. If no signal name is specified, SIGTERM is
sent. sent.
@ -43,18 +41,18 @@ diff -urN busybox-dist/procps/Config.in busybox/procps/Config.in
config CONFIG_PIDOF config CONFIG_PIDOF
bool "pidof" bool "pidof"
default n default n
diff -urN busybox-dist/procps/kill.c busybox/procps/kill.c diff -Nur busybox-1.1.1/procps/kill.c busybox-1.1.1-owrt/procps/kill.c
--- busybox-dist/procps/kill.c 2004-03-15 02:29:03.000000000 -0600 --- busybox-1.1.1/procps/kill.c 2006-03-22 22:16:25.000000000 +0100
+++ busybox/procps/kill.c 2004-03-16 09:45:29.000000000 -0600 +++ busybox-1.1.1-owrt/procps/kill.c 2006-04-01 18:22:53.000000000 +0200
@@ -34,6 +34,7 @@ @@ -34,6 +34,7 @@
#define KILL 0 #define KILL 0
#define KILLALL 1 #define KILLALL 1
+#define KILLALL5 2 +#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 #else
whichApp = KILL; whichApp = KILL;
#endif #endif
@ -64,7 +62,7 @@ diff -urN busybox-dist/procps/kill.c busybox/procps/kill.c
/* Parse any options */ /* Parse any options */
if (argc < 2) if (argc < 2)
@@ -119,6 +123,20 @@ @@ -126,6 +130,20 @@
} }
} }

View File

@ -1,18 +1,18 @@
diff -Nur busybox-1.1.0-pre1/include/usage.h busybox-1.1.0-pre1.openwrt/include/usage.h diff -Nur busybox-1.1.1/include/usage.h busybox-1.1.1-owrt/include/usage.h
--- busybox-1.1.0-pre1/include/usage.h 2005-11-01 00:55:34.000000000 +0100 --- busybox-1.1.1/include/usage.h 2006-04-01 18:26:21.000000000 +0200
+++ busybox-1.1.0-pre1.openwrt/include/usage.h 2005-11-30 11:10:24.000000000 +0100 +++ busybox-1.1.1-owrt/include/usage.h 2006-04-01 18:27:45.000000000 +0200
@@ -3119,6 +3119,7 @@ @@ -3268,6 +3268,7 @@
"\t-n,\t--now\tExit with failure if lease cannot be immediately negotiated\n" \ "\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-p,\t--pidfile=file\tStore process ID of daemon in file\n" \
"\t-q,\t--quit\tQuit after obtaining lease\n" \ "\t-q,\t--quit\tQuit after obtaining lease\n" \
+ "\t-R,\t--release\tRelease IP on quit\n" \ + "\t-R,\t--release\tRelease IP on quit\n" \
"\t-r,\t--request=IP\tIP address to request (default: none)\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-s,\t--script=file\tRun file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \
"\t-v,\t--version\tDisplay version" "\t-t,\t--retries=NUM\tSend up to NUM request packets\n"\
diff -Nur busybox-1.1.0-pre1/networking/udhcp/dhcpc.c busybox-1.1.0-pre1.openwrt/networking/udhcp/dhcpc.c diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.c busybox-1.1.1-owrt/networking/udhcp/dhcpc.c
--- busybox-1.1.0-pre1/networking/udhcp/dhcpc.c 2005-11-01 00:55:15.000000000 +0100 --- busybox-1.1.1/networking/udhcp/dhcpc.c 2006-03-22 22:16:19.000000000 +0100
+++ busybox-1.1.0-pre1.openwrt/networking/udhcp/dhcpc.c 2005-11-30 11:17:22.000000000 +0100 +++ busybox-1.1.1-owrt/networking/udhcp/dhcpc.c 2006-04-01 18:28:19.000000000 +0200
@@ -61,6 +61,7 @@ @@ -49,6 +49,7 @@
.abort_if_no_lease = 0, .abort_if_no_lease = 0,
.foreground = 0, .foreground = 0,
.quit_after_lease = 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, .background_if_no_lease = 0,
.interface = "eth0", .interface = "eth0",
.pidfile = NULL, .pidfile = NULL,
@@ -92,6 +93,7 @@ @@ -82,6 +83,7 @@
" immediately negotiated.\n" " immediately negotiated.\n"
" -p, --pidfile=file Store process ID of daemon in file\n" " -p, --pidfile=file Store process ID of daemon in file\n"
" -q, --quit Quit after obtaining lease\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" " -r, --request=IP IP address to request (default: none)\n"
" -s, --script=file Run file at dhcp events (default:\n" " -s, --script=file Run file at dhcp events (default:\n"
" " DEFAULT_SCRIPT ")\n" " " DEFAULT_SCRIPT ")\n"
@@ -211,6 +213,7 @@ @@ -203,6 +205,7 @@
{"now", no_argument, 0, 'n'}, {"now", no_argument, 0, 'n'},
{"pidfile", required_argument, 0, 'p'}, {"pidfile", required_argument, 0, 'p'},
{"quit", no_argument, 0, 'q'}, {"quit", no_argument, 0, 'q'},
+ {"release", no_argument, 0, 'R'}, + {"release", no_argument, 0, 'R'},
{"request", required_argument, 0, 'r'}, {"request", required_argument, 0, 'r'},
{"script", required_argument, 0, 's'}, {"script", required_argument, 0, 's'},
{"version", no_argument, 0, 'v'}, {"timeout", required_argument, 0, 'T'},
@@ -220,7 +223,7 @@ @@ -214,7 +217,7 @@
/* get options */ /* get options */
while (1) { while (1) {
int option_index = 0; 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:qr:s:T:t: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:qRr:s:T:t:v", arg_options, &option_index);
if (c == -1) break; if (c == -1) break;
switch (c) { switch (c) {
@@ -290,6 +293,9 @@ @@ -284,6 +287,9 @@
case 'q': case 'q':
client_config.quit_after_lease = 1; client_config.quit_after_lease = 1;
break; 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) { } else if (retval == -1 && errno == EINTR) {
/* a signal was caught */ /* 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 diff -Nur busybox-1.1.1/networking/udhcp/dhcpc.h busybox-1.1.1-owrt/networking/udhcp/dhcpc.h
--- busybox-1.1.0-pre1/networking/udhcp/dhcpc.h 2005-11-01 00:55:15.000000000 +0100 --- busybox-1.1.1/networking/udhcp/dhcpc.h 2006-03-22 22:16:19.000000000 +0100
+++ busybox-1.1.0-pre1.openwrt/networking/udhcp/dhcpc.h 2005-11-30 11:18:00.000000000 +0100 +++ busybox-1.1.1-owrt/networking/udhcp/dhcpc.h 2006-04-01 18:27:45.000000000 +0200
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
struct client_config_t { struct client_config_t {
char foreground; /* Do not fork */ char foreground; /* Do not fork */

View File

@ -1,20 +1,18 @@
diff -urN busybox.old/include/applets.h busybox.dev/include/applets.h diff -Nur busybox-1.1.1/include/applets.h busybox-1.1.1-owrt/include/applets.h
--- busybox.old/include/applets.h 2006-01-11 01:32:47.302791000 +0100 --- busybox-1.1.1/include/applets.h 2006-04-01 18:26:21.000000000 +0200
+++ busybox.dev/include/applets.h 2006-01-11 01:33:18.744756250 +0100 +++ busybox-1.1.1-owrt/include/applets.h 2006-04-01 18:36:28.000000000 +0200
@@ -475,6 +475,9 @@ @@ -197,6 +197,7 @@
#ifdef CONFIG_NC USE_MV(APPLET(mv, mv_main, _BB_DIR_BIN, _BB_SUID_NEVER))
APPLET(nc, nc_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) USE_NAMEIF(APPLET(nameif, nameif_main, _BB_DIR_SBIN, _BB_SUID_NEVER))
#endif USE_NC(APPLET(nc, nc_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+#ifdef CONFIG_NETMSG +USE_NETMSG(APPLET_NOUSAGE("netmsg", netmsg_main, _BB_DIR_BIN, _BB_SUID_ALWAYS))
+ APPLET_NOUSAGE("netmsg", netmsg_main, _BB_DIR_BIN, _BB_SUID_ALWAYS) USE_NETSTAT(APPLET(netstat, netstat_main, _BB_DIR_BIN, _BB_SUID_NEVER))
+#endif USE_NICE(APPLET(nice, nice_main, _BB_DIR_BIN, _BB_SUID_NEVER))
#ifdef CONFIG_NETSTAT USE_NOHUP(APPLET(nohup, nohup_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
APPLET(netstat, netstat_main, _BB_DIR_BIN, _BB_SUID_NEVER) diff -Nur busybox-1.1.1/networking/Config.in busybox-1.1.1-owrt/networking/Config.in
#endif --- busybox-1.1.1/networking/Config.in 2006-03-22 22:16:19.000000000 +0100
diff -urN busybox.old/networking/Config.in busybox.dev/networking/Config.in +++ busybox-1.1.1-owrt/networking/Config.in 2006-04-01 18:35:32.000000000 +0200
--- busybox.old/networking/Config.in 2005-11-01 00:55:15.000000000 +0100 @@ -451,6 +451,12 @@
+++ busybox.dev/networking/Config.in 2006-01-11 01:33:18.744756250 +0100
@@ -435,6 +435,12 @@
help help
A simple Unix utility which reads and writes data across network A simple Unix utility which reads and writes data across network
connections. connections.
@ -27,10 +25,10 @@ diff -urN busybox.old/networking/Config.in busybox.dev/networking/Config.in
config CONFIG_NC_GAPING_SECURITY_HOLE config CONFIG_NC_GAPING_SECURITY_HOLE
bool "gaping security hole" bool "gaping security hole"
diff -urN busybox.old/networking/Makefile.in busybox.dev/networking/Makefile.in diff -Nur busybox-1.1.1/networking/Makefile.in busybox-1.1.1-owrt/networking/Makefile.in
--- busybox.old/networking/Makefile.in 2005-11-01 00:55:15.000000000 +0100 --- busybox-1.1.1/networking/Makefile.in 2006-03-22 22:16:19.000000000 +0100
+++ busybox.dev/networking/Makefile.in 2006-01-11 01:34:02.939518250 +0100 +++ busybox-1.1.1-owrt/networking/Makefile.in 2006-04-01 18:35:32.000000000 +0200
@@ -28,6 +28,7 @@ @@ -30,6 +30,7 @@
NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o
NETWORKING-$(CONFIG_NAMEIF) += nameif.o NETWORKING-$(CONFIG_NAMEIF) += nameif.o
NETWORKING-$(CONFIG_NC) += nc.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_NETSTAT) += netstat.o
NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o
NETWORKING-$(CONFIG_PING) += ping.o NETWORKING-$(CONFIG_PING) += ping.o
diff -urN busybox.old/networking/netmsg.c busybox.dev/networking/netmsg.c diff -Nur busybox-1.1.1/networking/netmsg.c busybox-1.1.1-owrt/networking/netmsg.c
--- busybox.old/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100 --- busybox-1.1.1/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100
+++ busybox.dev/networking/netmsg.c 2006-01-11 01:33:18.748756500 +0100 +++ busybox-1.1.1-owrt/networking/netmsg.c 2006-04-01 18:35:32.000000000 +0200
@@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
+#include <sys/types.h> +#include <sys/types.h>
+#include <sys/socket.h> +#include <sys/socket.h>

View File

@ -1,14 +1,14 @@
--- busybox-1.1.0.orig/networking/httpd.c 2006-02-06 16:02:30.000000000 +0100 --- busybox-1.1.1/networking/httpd.c 2006-03-22 22:16:19.000000000 +0100
+++ busybox-1.1.0/networking/httpd.c 2006-02-06 16:25:34.000000000 +0100 +++ busybox-1.1.1.new/networking/httpd.c 2006-04-01 19:41:42.150744624 +0200
@@ -109,6 +109,7 @@ @@ -110,6 +110,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> /* for connect and socket*/ #include <sys/socket.h> /* for connect and socket*/
#include <netinet/in.h> /* for sockaddr_in */ #include <netinet/in.h> /* for sockaddr_in */
+#include <arpa/inet.h> /* for inet_aton */ +#include <arpa/inet.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h> #include <sys/wait.h>
@@ -201,8 +202,8 @@ @@ -204,8 +205,8 @@
void bb_show_usage(void) void bb_show_usage(void)
{ {
@ -19,15 +19,15 @@
exit(1); exit(1);
} }
#endif #endif
@@ -256,6 +257,7 @@ @@ -255,6 +256,7 @@
#endif #endif
unsigned port; /* server initial port and for unsigned port; /* server initial port and for
set env REMOTE_PORT */ set env REMOTE_PORT */
+ char *address; /* server initial address */ + char *address;
union HTTPD_FOUND { union HTTPD_FOUND {
const char *found_mime_type; const char *found_mime_type;
const char *found_moved_temporarily; const char *found_moved_temporarily;
@@ -942,7 +944,10 @@ @@ -958,7 +960,10 @@
/* inet_addr() returns a value that is already in network order */ /* inet_addr() returns a value that is already in network order */
memset(&lsocket, 0, sizeof(lsocket)); memset(&lsocket, 0, sizeof(lsocket));
lsocket.sin_family = AF_INET; lsocket.sin_family = AF_INET;
@ -39,34 +39,41 @@
lsocket.sin_port = htons(config->port) ; lsocket.sin_port = htons(config->port) ;
fd = socket(AF_INET, SOCK_STREAM, 0); fd = socket(AF_INET, SOCK_STREAM, 0);
if (fd >= 0) { if (fd >= 0) {
@@ -1985,7 +1990,7 @@ @@ -1996,6 +2001,7 @@
#define OPT_INC_3 ENABLE_FEATURE_HTTPD_AUTH_MD5 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 static const char httpd_opts[]="c:d:h:"
- "p:" @@ -2003,7 +2009,7 @@
+ "p:l:" USE_FEATURE_HTTPD_BASIC_AUTH("r:")
#endif USE_FEATURE_HTTPD_AUTH_MD5("m:")
#ifdef CONFIG_FEATURE_HTTPD_SETUID USE_FEATURE_HTTPD_SETUID("u:")
"u:" - SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY("p:");
@@ -1999,7 +2004,8 @@ + SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY("p:l:");
#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 */
#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 #ifdef HTTPD_STANDALONE
@@ -2016,6 +2022,7 @@ int main(int argc, char *argv[])
#endif @@ -2036,6 +2044,7 @@
#ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY char *url_for_decode;
const char *s_port; USE_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;)
+ const char *s_addr; SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(const char *s_port;)
int server; + SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(const char *s_addr;)
#endif 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 #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY
config->port = 80; config->port = 80;
@ -74,15 +81,15 @@
#endif #endif
config->ContentLength = -1; config->ContentLength = -1;
@@ -2052,6 +2060,7 @@ @@ -2061,6 +2071,7 @@
#endif USE_FEATURE_HTTPD_AUTH_MD5(, &pass)
#ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY USE_FEATURE_HTTPD_SETUID(, &s_uid)
, &s_port SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(, &s_port)
+ , &s_addr + SKIP_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY(, &s_addr)
#endif );
#ifdef CONFIG_FEATURE_HTTPD_SETUID
, &s_uid if(opt & OPT_DECODE_URL) {
@@ -2077,6 +2086,8 @@ @@ -2082,6 +2093,8 @@
#ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY
if(opt & OPT_PORT) if(opt & OPT_PORT)
config->port = bb_xgetlarg(s_port, 10, 1, 0xffff); config->port = bb_xgetlarg(s_port, 10, 1, 0xffff);

View File

@ -1,14 +1,15 @@
--- busybox-1.1.0.orig/networking/httpd.c 2006-02-06 16:41:57.000000000 +0100 diff -Nur busybox-1.1.1/networking/httpd.c busybox-1.1.1-owrt/networking/httpd.c
+++ busybox-1.1.0/networking/httpd.c 2006-02-06 16:41:26.000000000 +0100 --- 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 @@ @@ -247,6 +247,7 @@
const char *query;
#ifdef CONFIG_FEATURE_HTTPD_CGI USE_FEATURE_HTTPD_CGI(char *referer;)
char *referer; + USE_FEATURE_HTTPD_CGI(char *user_agent;)
+ char *user_agent;
#endif
const char *configFile; const char *configFile;
@@ -1192,6 +1193,7 @@
@@ -1208,6 +1209,7 @@
addEnv("SERVER", "PROTOCOL", "HTTP/1.0"); addEnv("SERVER", "PROTOCOL", "HTTP/1.0");
addEnv("GATEWAY_INTERFACE", "", "CGI/1.1"); addEnv("GATEWAY_INTERFACE", "", "CGI/1.1");
addEnv("REMOTE", "ADDR", config->rmt_ip_str); addEnv("REMOTE", "ADDR", config->rmt_ip_str);
@ -16,7 +17,7 @@
#ifdef CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV #ifdef CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
addEnvPort("REMOTE"); addEnvPort("REMOTE");
#endif #endif
@@ -1737,6 +1739,10 @@ @@ -1771,6 +1773,10 @@
for(test = buf + 8; isspace(*test); test++) for(test = buf + 8; isspace(*test); test++)
; ;
config->referer = strdup(test); config->referer = strdup(test);

View File

@ -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)