[libvirt] [PATCH] virsh: don't override connection URI from argv

Martin Kletzander mkletzan at redhat.com
Thu Apr 21 07:05:01 UTC 2016


On Thu, Apr 21, 2016 at 09:38:30AM +0300, Roman Bogorodskiy wrote:
>Currently, if a connection URI was specified on the command line by the
>'-c' switch, virsh connects to it, but after connecting overrides its
>value with the one it tries to obtain from the VIRSH_DEFAULT_CONNECT_URI
>environment variable.
>
>This makes virsh connecting to the wrong URI if it disconnects from the
>hypervisor and then tries to reconnect, and also leaks the original connname.
>
>Fix by calling virGetEnvBlockSUID() before virshParseArgv().
>---
> tools/virsh.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>

ACK.  To those wondering why tests didn't catch that, be on the lookout
for my tests amendment patch ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160421/e6e37dea/attachment-0001.sig>


More information about the libvir-list mailing list