]> xenbits.xensource.com Git - libvirt.git/commit
conf: storage: also sanitize source dir
authorJán Tomko <jtomko@redhat.com>
Tue, 25 Jun 2019 11:37:16 +0000 (13:37 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 25 Jun 2019 15:11:56 +0000 (17:11 +0200)
commit738dc3f4adcde371d8c6c23d63ec688c1f3f1458
tree7a39974c83f35e22c8170db6d2d378c1f119585e
parent4fc84496914eedadd7020ce278f3e758c648e64f
conf: storage: also sanitize source dir

Commit a7fb2258 added sanitization of storage pool target paths,
however source dir paths were left unsanitized.

A netfs pool with:
<source>
  <host name='10.20.30.40'/>
  <dir path='/nfs/'/>
</source>
will not be correctly detected as mounted by
virStorageBackendFileSystemIsMounted, because it shows up in the
mount list without the trailing slash.

Sanitize the source dir as well.

https://bugzilla.redhat.com/show_bug.cgi?id=1723247

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
src/conf/storage_conf.c
tests/storagepoolxml2xmlin/pool-netfs-slash.xml [new file with mode: 0644]
tests/storagepoolxml2xmlout/pool-netfs-slash.xml [new file with mode: 0644]
tests/storagepoolxml2xmltest.c