On Mon, Feb 24, 2014 at 04:21:47PM +0100, Peter Krempa wrote:
The function removes multiple following slashes from paths. This is
okay
unless you try to sanitize a URI this way. Skip the protocol definition
until "://" and sanitize just the path part.
The sanitization function is used in virStorageVolLookupByPath as the
first step before passing the path to storage drivers. This breaks
lookup of gluster volumes.
---
src/util/virfile.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
This feels a rather dirty to me - we shouldn't be trying to second
guess whether a filename might be a URI.
I think we should not be passing URIs to the virFileSanitizePath in
the first place. Based on what you say about usage, it sounds like
the call to virFileSanitizePath needs to be pushed down into the
storage backend drivers themselves.
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|