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

Roman Bogorodskiy bogorodskiy at gmail.com
Thu Apr 21 07:44:44 UTC 2016


  Martin Kletzander wrote:

> 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 ;)

Pushed, thanks!

Roman Bogorodskiy




More information about the libvir-list mailing list