summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Dronnikov2009-10-05 02:18:01 +0200
committerDenys Vlasenko2009-10-05 02:18:01 +0200
commitbe168b119750beacc0d0212607c6fa3ee87f238c (patch)
tree95240a7661366674fd9cdf2741e8ab1bfe823ba5
parent301f5ecb8d5fc1ed85942dd85d58f27a0c9a518a (diff)
downloadbusybox-be168b119750beacc0d0212607c6fa3ee87f238c.zip
busybox-be168b119750beacc0d0212607c6fa3ee87f238c.tar.gz
wget: fix for code 302; mount: support -o union
Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/wget.c5
-rw-r--r--util-linux/mount.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/networking/wget.c b/networking/wget.c
index b8cd549..0f99e8d 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -370,8 +370,10 @@ static void parse_url(char *src_url, struct host_info *h)
h->path = sp;
}
+ // We used to set h->user to NULL here, but this interferes
+ // with handling of code 302 ("object was moved")
+
sp = strrchr(h->host, '@');
- h->user = NULL;
if (sp != NULL) {
h->user = h->host;
*sp = '\0';
@@ -692,6 +694,7 @@ int wget_main(int argc UNUSED_PARAM, char **argv)
/* TODO: compat issue: should handle "wget URL1 URL2..." */
+ target.user = NULL;
parse_url(argv[optind], &target);
/* Use the proxy if necessary */
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 9f465f1..1c51373 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -19,6 +19,9 @@
#include <mntent.h>
#include <syslog.h>
#include <sys/mount.h>
+#ifndef MS_UNION
+# define MS_UNION (1 << 8)
+#endif
#ifndef MS_BIND
# define MS_BIND (1 << 12)
#endif
@@ -177,6 +180,7 @@ static const int32_t mount_options[] = {
/* "loud" */ ~MS_SILENT,
// action flags
+ /* "union" */ MS_UNION,
/* "bind" */ MS_BIND,
/* "move" */ MS_MOVE,
/* "shared" */ MS_SHARED,
@@ -231,6 +235,7 @@ static const char mount_option_str[] =
"loud\0"
// action flags
+ "union\0"
"bind\0"
"move\0"
"shared\0"