On 02/24/2014 08:26 AM, Daniel P. Berrange wrote: > 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. I agree that this feels dirty; I think it would be better to fix util/virstoragefile to not attempt to sanitize remote names (since right now, all use of URIs are treated as remote names). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list