Commit e24f696b authored by Steve Langasek's avatar Steve Langasek
Browse files

Adjust parsing of device names so that network mounts pointing to the

server's root don't have the path mis-normalized to the empty string.
Thanks to Damien Churchill <damien.churchill@ukplc.net> for the initial
implementation.  LP: #809221.
parent fdfe28a0
mountall (2.39) UNRELEASED; urgency=low
* Adjust parsing of device names so that network mounts pointing to the
server's root don't have the path mis-normalized to the empty string.
Thanks to Damien Churchill <damien.churchill@ukplc.net> for the initial
implementation. LP: #809221.
-- Steve Langasek <steve.langasek@ubuntu.com> Mon, 20 Aug 2012 16:45:42 -0700
mountall (2.38) unstable; urgency=low
* Counterproductively document in debian/copyright the license of files in
......
......@@ -534,8 +534,20 @@ update_mount (Mount * mnt,
} else if (! strncmp (mnt->device, "LABEL=", 6)) {
dequote (mnt->device + 6);
} else {
char *colon;
dequote (mnt->device);
strip_slashes (mnt->device);
/* If our device name is in host:/path format, as is
* commonly used for network filesystems, don't strip
* trailing slashes if this is the entire path. We
* look for the colon starting from the end, so that
* we correctly handle IPv6 addresses for the host
* part.
*/
if ((colon = strrchr (mnt->device,':')) != NULL
&& colon[1] == '/')
strip_slashes (colon + 2);
else
strip_slashes (mnt->device);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment