Skip to contentSkip to conversation

busybox: add/update 1.18.1 fixes for hush, mkswap, modprobe, tftp and procps

PATCH New Gustavo Zacarias 2 participants 8 messages Jan 10, 2011 – Jan 11, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 busybox: add/update 1.18.1 fixes for hush, mkswap, modprobe, tftp and procps

---
 .../busybox-1.18.1/busybox-1.18.1-hush.patch       |   28 ++++++--
 .../busybox-1.18.1/busybox-1.18.1-mkswap.patch     |   12 +++
 .../busybox-1.18.1-modprobe-small.patch            |   21 ++++++
 .../busybox-1.18.1/busybox-1.18.1-tftp.patch       |   72 ++++++++++++++++++++
 .../busybox-1.18.1/busybox-1.18.1-warning.patch    |   28 ++++++++
 5 files changed, 156 insertions(+), 5 deletions(-)
 create mode 100644 package/busybox/busybox-1.18.1/busybox-1.18.1-mkswap.patch
 create mode 100644 package/busybox/busybox-1.18.1/busybox-1.18.1-modprobe-small.patch
 create mode 100644 package/busybox/busybox-1.18.1/busybox-1.18.1-tftp.patch
 create mode 100644 package/busybox/busybox-1.18.1/busybox-1.18.1-warning.patch
package/busybox/busybox-1.18.1/busybox-1.18.1-hush.patch +23 -5
index 3e189a9..5281a52 100644
@@ -1,6 +1,6 @@
 diff -urpN busybox-1.18.1/shell/hush.c busybox-1.18.1-hush/shell/hush.c
 --- busybox-1.18.1/shell/hush.c	2010-12-21 05:31:04.000000000 +0100
-+++ busybox-1.18.1-hush/shell/hush.c	2010-12-21 21:20:02.493651813 +0100
++++ busybox-1.18.1-hush/shell/hush.c	2011-01-07 14:59:19.649956156 +0100
 @@ -913,7 +913,7 @@ static const struct built_in_command blt
   */
  #if HUSH_DEBUG
@@ -177,7 +177,25 @@ diff -urpN busybox-1.18.1/shell/hush.c busybox-1.18.1-hush/shell/hush.c
  			prn++;
  		}
  		pi = pi->next;
-@@ -7445,7 +7461,7 @@ int hush_main(int argc, char **argv)
+@@ -4106,7 +4122,16 @@ static struct pipe *parse_stream(char **
+ 				if (IS_NULL_CMD(ctx.command)
+ 				 && dest.length == 0 && !dest.has_quoted_part
+ 				) {
+-					continue;
++					/* This newline can be ignored. But...
++					 * without the below check, interactive shell
++					 * will ignore even lines with bare <newline>,
++					 * and show the continuation prompt:
++					 * ps1_prompt$ <enter>
++					 * ps2> _   <=== wrong prompt, should be ps1
++					 */
++					struct pipe *pi = ctx.list_head;
++					if (pi->num_cmds != 0)
++						continue;
+ 				}
+ 				/* Treat newline as a command separator. */
+ 				done_pipe(&ctx, PIPE_SEQ);
+@@ -7445,7 +7470,7 @@ int hush_main(int argc, char **argv)
  	unsigned builtin_argc;
  	char **e;
  	struct variable *cur_var;
@@ -186,7 +204,7 @@ diff -urpN busybox-1.18.1/shell/hush.c busybox-1.18.1-hush/shell/hush.c
  
  	INIT_G();
  	if (EXIT_SUCCESS) /* if EXIT_SUCCESS == 0, it is already done */
-@@ -7454,17 +7470,17 @@ int hush_main(int argc, char **argv)
+@@ -7454,17 +7479,17 @@ int hush_main(int argc, char **argv)
  	G.argv0_for_re_execing = argv[0];
  #endif
  	/* Deal with HUSH_VERSION */
@@ -209,7 +227,7 @@ diff -urpN busybox-1.18.1/shell/hush.c busybox-1.18.1-hush/shell/hush.c
  	cur_var = G.top_var;
  	e = environ;
  	if (e) while (*e) {
-@@ -7479,8 +7495,8 @@ int hush_main(int argc, char **argv)
+@@ -7479,8 +7504,8 @@ int hush_main(int argc, char **argv)
  		e++;
  	}
  	/* (Re)insert HUSH_VERSION into env (AFTER we scanned the env!) */
@@ -220,7 +238,7 @@ diff -urpN busybox-1.18.1/shell/hush.c busybox-1.18.1-hush/shell/hush.c
  
  	/* Export PWD */
  	set_pwd_var(/*exp:*/ 1);
-@@ -7840,18 +7856,6 @@ int hush_main(int argc, char **argv)
+@@ -7840,18 +7865,6 @@ int hush_main(int argc, char **argv)
  	parse_and_run_file(stdin);
  
   final_return:
package/busybox/busybox-1.18.1/busybox-1.18.1-mkswap.patch new file +12 -0
new file mode 100644
index 0000000..41dff57
@@ -0,0 +1,12 @@
+diff -urpN busybox-1.18.1/util-linux/mkswap.c busybox-1.18.1-mkswap/util-linux/mkswap.c
+--- busybox-1.18.1/util-linux/mkswap.c	2010-12-20 01:41:27.000000000 +0100
++++ busybox-1.18.1-mkswap/util-linux/mkswap.c	2011-01-05 11:41:24.455856773 +0100
+@@ -15,7 +15,7 @@ static void mkswap_selinux_setcontext(in
+ 	if (!is_selinux_enabled())
+ 		return;
+ 
+-	xfstat(fd, &stbuf, argv[0]);
++	xfstat(fd, &stbuf, path);
+ 	if (S_ISREG(stbuf.st_mode)) {
+ 		security_context_t newcon;
+ 		security_context_t oldcon = NULL;
package/busybox/busybox-1.18.1/busybox-1.18.1-modprobe-small.patch new file +21 -0
new file mode 100644
index 0000000..c1d5615
@@ -0,0 +1,21 @@
+diff -urpN busybox-1.18.1/modutils/modprobe-small.c busybox-1.18.1-modprobe-small/modutils/modprobe-small.c
+--- busybox-1.18.1/modutils/modprobe-small.c	2010-12-20 01:41:27.000000000 +0100
++++ busybox-1.18.1-modprobe-small/modutils/modprobe-small.c	2011-01-09 21:00:26.000000000 +0100
+@@ -844,13 +844,15 @@ int modprobe_main(int argc UNUSED_PARAM,
+ 		void *map;
+ 
+ 		len = MAXINT(ssize_t);
+-		map = xmalloc_xopen_read_close(*argv, &len);
++		map = xmalloc_open_zipped_read_close(*argv, &len);
+ 		if (init_module(map, len,
+ 			IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(options ? options : "")
+ 			IF_NOT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE("")
+-				) != 0)
++			) != 0
++		) {
+ 			bb_error_msg_and_die("can't insert '%s': %s",
+ 					*argv, moderror(errno));
++		}
+ 		return 0;
+ 	}
+ 
package/busybox/busybox-1.18.1/busybox-1.18.1-tftp.patch new file +72 -0

72 lines not on this page · raw message

package/busybox/busybox-1.18.1/busybox-1.18.1-warning.patch new file +28 -0
new file mode 100644
index 0000000..cda94bd
@@ -0,0 +1,28 @@
+diff -urpN busybox-1.18.1/libbb/procps.c busybox-1.18.1-warning/libbb/procps.c
+--- busybox-1.18.1/libbb/procps.c	2010-12-21 05:29:45.000000000 +0100
++++ busybox-1.18.1-warning/libbb/procps.c	2011-01-07 13:41:22.000000000 +0100
+@@ -154,6 +154,7 @@ static unsigned long fast_strtoul_10(cha
+ 	return n;
+ }
+ 
++# if ENABLE_FEATURE_FAST_TOP
+ static long fast_strtol_10(char **endptr)
+ {
+ 	if (**endptr != '-')
+@@ -162,6 +163,7 @@ static long fast_strtol_10(char **endptr
+ 	(*endptr)++;
+ 	return - (long)fast_strtoul_10(endptr);
+ }
++# endif
+ 
+ static char *skip_fields(char *str, int count)
+ {
+@@ -448,7 +450,7 @@ procps_status_t* FAST_FUNC procps_scan(p
+ //FIXME: is it safe to assume this field exists?
+ 			sp->last_seen_on_cpu = fast_strtoul_10(&cp);
+ # endif
+-#endif /* end of !ENABLE_FEATURE_TOP_SMP_PROCESS */
++#endif /* FEATURE_FAST_TOP */
+ 
+ #if ENABLE_FEATURE_PS_ADDITIONAL_COLUMNS
+ 			sp->niceness = tasknice;
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 2/4 webkit: security bump to version 1.2.6

Bump to version 1.2.6 which includes security fixes for:
CVE-2010-1791, CVE-2010-3812, CVE-2010-3813, CVE-2010-4197, CVE-2010-4198, CVE-2010-4204 and CVE-2010-4206.

---
 package/webkit/webkit.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
package/webkit/webkit.mk +1 -1
index 7a5429c..6ab609b 100644
@@ -4,7 +4,7 @@
 #
 #############################################################
 
-WEBKIT_VERSION = 1.2.5
+WEBKIT_VERSION = 1.2.6
 WEBKIT_SITE = http://www.webkitgtk.org
 WEBKIT_INSTALL_STAGING = YES
 WEBKIT_DEPENDENCIES = host-flex host-gperf icu libcurl libxml2 libxslt \
Signature · 1 line
1.7.3.4
#2 lore raw

PATCH 2/4 webkit: security bump to version 1.2.6

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> Bump to version 1.2.6 which includes security fixes for:
Gustavo> CVE-2010-1791, CVE-2010-3812, CVE-2010-3813, CVE-2010-4197, Gustavo> CVE-2010-4198, CVE-2010-4204 and CVE-2010-4206.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 3/4 iptables: install to staging

In reply to Gustavo Zacarias

Install iptables to staging so we can build iproute2 with filtering.

---
 package/iptables/iptables.mk |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
package/iptables/iptables.mk +3 -2
index 1ec2c85..b06ab71 100644
@@ -3,9 +3,12 @@
 # iptables
 #
 #############################################################
+
 IPTABLES_VERSION = 1.4.10
 IPTABLES_SOURCE = iptables-$(IPTABLES_VERSION).tar.bz2
 IPTABLES_SITE = http://ftp.netfilter.org/pub/iptables
+IPTABLES_INSTALL_STAGING = YES
+IPTABLES_AUTORECONF = YES
 IPTABLES_DEPENDENCIES = host-pkg-config
 
 IPTABLES_CONF_OPT = --libexecdir=/usr/lib --with-kernel=$(LINUX_HEADERS_DIR)
@@ -13,8 +16,6 @@ ifneq ($(BR2_INET_IPV6),y)
 IPTABLES_CONF_OPT += --disable-ipv6
 endif
 
-IPTABLES_AUTORECONF = YES
-
 define IPTABLES_TARGET_SYMLINK_CREATE
 	ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables
 	ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables-save
Signature · 1 line
1.7.3.4
#4 lore raw

PATCH 3/4 iptables: install to staging

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> Install iptables to staging so we can build iproute2 with filtering.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 4/4 iproute2: bump to version 2.6.37 + fixes

In reply to Gustavo Zacarias

Bump to version 2.6.37
Add iptables support when it's available.
ATM support requires linux-atm for which we don't have a package yet.

---
 package/iproute2/iproute2.mk |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)
package/iproute2/iproute2.mk +13 -3
index 0f99894..c3e9650 100644
@@ -4,19 +4,29 @@
 #
 #############################################################
 
-IPROUTE2_VERSION = 2.6.35
+IPROUTE2_VERSION = 2.6.37
 IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.bz2
 IPROUTE2_SITE = http://devresources.linuxfoundation.org/dev/iproute2/download
 IPROUTE2_TARGET_SBINS = ctstat genl ifstat ip lnstat nstat routef routel rtacct rtmon rtpr rtstat ss tc
 
+# If we've got iptables enable xtables support for tc
+ifeq ($(BR2_PACKAGE_IPTABLES),y)
+IPROUTE2_DEPENDENCIES += iptables
+define IPROUTE2_WITH_IPTABLES
+	# Makefile is busted so it never passes IPT_LIB_DIR properly
+	$(SED) "s/-DIPT/-DXT/" $(IPROUTE2_DIR)/tc/Makefile
+	echo "TC_CONFIG_XT:=y" >>$(IPROUTE2_DIR)/Config
+endef
+endif
+
 define IPROUTE2_CONFIGURE_CMDS
 	# Use kernel headers
 	rm -r $(IPROUTE2_DIR)/include/netinet
 	# arpd needs berkeleydb
 	$(SED) "/^TARGETS=/s: arpd : :" $(IPROUTE2_DIR)/misc/Makefile
 	$(SED) "s:-O2:$(TARGET_CFLAGS):" $(IPROUTE2_DIR)/Makefile
-	( cd $(@D); ./configure )
-	echo "IPT_LIB_DIR=/usr/lib/xtables" >>$(IPROUTE2_DIR)/Config
+	echo "IPT_LIB_DIR:=/usr/lib/xtables" >>$(IPROUTE2_DIR)/Config
+	$(IPROUTE2_WITH_IPTABLES)
 endef
 
 define IPROUTE2_BUILD_CMDS
Signature · 1 line
1.7.3.4
#6 lore raw

PATCH 4/4 iproute2: bump to version 2.6.37 + fixes

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> Bump to version 2.6.37
Gustavo> Add iptables support when it's available.
Gustavo> ATM support requires linux-atm for which we don't have a package yet.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard