summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2008-03-17 19:44:43 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2008-03-17 19:44:43 +0000
commitbe36fc319e0e0da9bbedc9a407e43a6ef121c644 (patch)
tree9e33884bd3524ba06700a2787f6797fb6069d822 /package
parent2e5685b3a85b91247de20310e3dae9ebf828ae34 (diff)
downloadbuildroot-novena-be36fc319e0e0da9bbedc9a407e43a6ef121c644.tar.gz
buildroot-novena-be36fc319e0e0da9bbedc9a407e43a6ef121c644.zip
busybox: additional 1.9.1 patches
Diffstat (limited to 'package')
-rw-r--r--package/busybox/busybox-1.9.1-httpd-POST.patch11
-rw-r--r--package/busybox/busybox-1.9.1-init.patch27
2 files changed, 38 insertions, 0 deletions
diff --git a/package/busybox/busybox-1.9.1-httpd-POST.patch b/package/busybox/busybox-1.9.1-httpd-POST.patch
new file mode 100644
index 000000000..6a70c8255
--- /dev/null
+++ b/package/busybox/busybox-1.9.1-httpd-POST.patch
@@ -0,0 +1,11 @@
+--- busybox-1.9.1/networking/httpd.c Tue Feb 12 17:03:01 2008
++++ busybox-1.9.1-httpd-POST/networking/httpd.c Mon Mar 17 13:58:09 2008
+@@ -1950,7 +1950,7 @@
+ if ((STRNCASECMP(iobuf, "Content-length:") == 0)) {
+ /* extra read only for POST */
+ if (prequest != request_GET) {
+- tptr = iobuf + sizeof("Content-length:") - 1;
++ tptr = tptr = skip_whitespace(iobuf + sizeof("Content-length:") - 1);
+ if (!tptr[0])
+ send_headers_and_exit(HTTP_BAD_REQUEST);
+ errno = 0;
diff --git a/package/busybox/busybox-1.9.1-init.patch b/package/busybox/busybox-1.9.1-init.patch
new file mode 100644
index 000000000..be86cbe2f
--- /dev/null
+++ b/package/busybox/busybox-1.9.1-init.patch
@@ -0,0 +1,27 @@
+--- busybox-1.9.1/init/init.c Tue Feb 12 17:03:12 2008
++++ busybox-1.9.1-init/init/init.c Mon Mar 17 14:19:41 2008
+@@ -225,8 +225,22 @@
+ }
+ messageD(L_LOG, "console='%s'", s);
+ } else {
+- /* Make sure fd 0,1,2 are not closed */
+- bb_sanitize_stdio();
++ /* Make sure fd 0,1,2 are not closed
++ * (so that they won't be used by future opens) */
++
++ /* bb_sanitize_stdio(); - WRONG.
++ * Fail if "/dev/null" doesnt exist, and for init
++ * this is a real possibility! Open code it instead. */
++
++ int fd = open(bb_dev_null, O_RDWR);
++ if (fd < 0) {
++ /* Give me _ANY_ open descriptor! */
++ fd = xopen("/", O_RDONLY); /* we don't believe this can fail */
++ }
++ while ((unsigned)fd < 2)
++ fd = dup(fd);
++ if (fd > 2)
++ close (fd);
+ }
+
+ s = getenv("TERM");