[Libvir] [PATCH] Remote 3/8: Client-side

Daniel P. Berrange berrange at redhat.com
Fri May 11 22:16:00 UTC 2007


On Sat, May 05, 2007 at 12:17:44PM +0100, Richard W.M. Jones wrote:
> Richard W.M. Jones wrote:
> >3 Client-side
> >-------------
> >
> >A src/remote_internal.c
> >A src/remote_internal.h
> >M src/driver.h
> >M src/libvirt.c

A small bug in there

 - If the TLS session fails to init, then we die with SEGV when calling
   gnutls_bye() on a NULL priv.session
 - In the remoteOpen() method the goto is in the wrong place

            if (priv.uses_tls) {
                priv.session =
                    negotiate_gnutls_on_connection
                      (conn, priv.sock, no_verify, server);
                if (!priv.session) {
                    close (priv.sock);
                    priv.sock = -1;
                    continue;
                }
                goto tcp_connected;
            }

   Noeeds to be

            if (priv.uses_tls) {
                priv.session =
                    negotiate_gnutls_on_connection
                      (conn, priv.sock, no_verify, server);
                if (!priv.session) {
                    close (priv.sock);
                    priv.sock = -1;
                    continue;
                }
            }
            goto tcp_connected;

  Otherwise tcp connections will never succceed.


Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the libvir-list mailing list