busybox Digest, Vol 45, Issue 14
Denys Vlasenko
vda.linux at googlemail.com
Sun Apr 12 15:56:58 UTC 2009
On Sunday 12 April 2009 17:12, Guenter wrote:
> >> --- util-linux/mount.c.orig 2009-02-26 12:47:43.000000000 +0100
> >> +++ util-linux/mount.c 2009-04-10 07:41:52.000000000 +0200
> >> @@ -421,12 +421,12 @@
> >> int errno_save = errno;
> >> args[0] = xasprintf("mount.%s", mp->mnt_type);
> >> rc = 1;
> >> + args[rc++] = mp->mnt_fsname;
> >> + args[rc++] = mp->mnt_dir;
> >> if (filteropts) {
> >> args[rc++] = (char *)"-o";
> >> args[rc++] = filteropts;
> >> }
> >> - args[rc++] = mp->mnt_fsname;
> >> - args[rc++] = mp->mnt_dir;
> >> args[rc] = NULL;
> >> rc = wait4pid(spawn(args));
> >> free(args[0]);
> >> @@ -1622,6 +1622,7 @@
> >> rc = 1;
> >> // Replace '/' with '\' and verify that unc points to "//server/share".
> >>
> >> +/*
> >> for (s = mp->mnt_fsname; *s; ++s)
> >> if (*s == '/') *s = '\\';
> >>
> >> @@ -1639,11 +1640,11 @@
> >> dotted = xmalloc_sockaddr2dotted_noport(&lsa->u.sa);
> >> ip = xasprintf("ip=%s", dotted);
> >> parse_mount_options(ip, &filteropts);
> >> -
> >> // compose new unc '\\server-ip\share'
> >> // (s => slash after hostname)
> >>
> >> mp->mnt_fsname = xasprintf("\\\\%s%s", dotted, s);
> >> +*/
> >>
> >> sorry for not attaching the patch (was just a c&p from terminal), but
> >> its anyway only a test hack FTM;
> >> will investigate a bit further later ...
> >
> > Applied, thanks!
> uhmm, you really took my crude approach .... :)
> well, I would more tend to the attached patch which only removes the
> offending ip param + now converts \ to / (just the other way as we did
> before); this way we keep the name resolving intact in case its needed.
But it should not be needed - mount.cifs does that ok.
Basically, now we only have a detection of //server.... and \\server...
as cifs mounts + mysterious vfsflags |= MS_MANDLOCK.
This seems to be a minimal _and_ working solution.
--
vda
More information about the busybox
mailing list