Re: [PATCH v2 2/2] libssh_transport: add new libssh-based transport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 17, 2016 at 04:24:53PM +0200, Pino Toscano wrote:
> Implement a new libssh transport, which uses libssh to communicate with
> remote hosts, and use it in virNetSockets.
> 
> This new transport supports all the common ssh authentication methods,
> making use of libvirt's auth callbacks for interaction with the user.
> 
> Most of the functionalities and implementation are based on the libssh2
> transport.
> ---
>  config-post.h                 |    2 +
>  configure.ac                  |    3 +
>  include/libvirt/virterror.h   |    2 +
>  m4/virt-libssh.m4             |   26 +
>  src/Makefile.am               |   21 +-
>  src/libvirt_libssh.syms       |   22 +
>  src/remote/remote_driver.c    |   41 ++
>  src/rpc/virnetclient.c        |  123 ++++
>  src/rpc/virnetclient.h        |   13 +
>  src/rpc/virnetlibsshsession.c | 1424 +++++++++++++++++++++++++++++++++++++++++
>  src/rpc/virnetlibsshsession.h |   80 +++
>  src/rpc/virnetsocket.c        |  179 ++++++
>  src/rpc/virnetsocket.h        |   13 +
>  src/util/virerror.c           |    9 +-
>  14 files changed, 1955 insertions(+), 3 deletions(-)
>  create mode 100644 m4/virt-libssh.m4
>  create mode 100644 src/libvirt_libssh.syms
>  create mode 100644 src/rpc/virnetlibsshsession.c
>  create mode 100644 src/rpc/virnetlibsshsession.h

libvirt.spec.in and mingw-libvirt.spec.in need updating too, as well
as docs/remote.html.in


> +static virClassPtr virNetLibsshSessionClass;
> +static int
> +virNetLibsshSessionOnceInit(void)
> +{
> +    const char *dbgLevelStr;
> +
> +    if (!(virNetLibsshSessionClass = virClassNew(virClassForObjectLockable(),
> +                                                 "virNetLibsshSession",
> +                                                 sizeof(virNetLibsshSession),
> +                                                 virNetLibsshSessionDispose)))
> +        return -1;
> +
> +    if (ssh_init() < 0)
> +        return -1;

You need to report a libvirt error here.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]