1. 12 7月, 2013 1 次提交
    • P
      remote: Improve libssh2 password authentication · 273745b4
      Peter Krempa 提交于
      This patch enables the password authentication in the libssh2 connection
      driver. There are a few benefits to this step:
      
      1) Hosts with challenge response authentication will now be supported
      with the libssh2 connection driver.
      
      2) Credential for hosts can now be stored in the authentication
      credential config file
      273745b4
  2. 08 5月, 2013 2 次提交
  3. 19 3月, 2013 1 次提交
  4. 14 1月, 2013 1 次提交
  5. 11 1月, 2013 1 次提交
  6. 09 1月, 2013 1 次提交
  7. 21 12月, 2012 2 次提交
  8. 16 10月, 2012 1 次提交
    • D
      Add JSON serialization of virNetSocketPtr objects for process re-exec() · c2981453
      Daniel P. Berrange 提交于
      Add two new APIs virNetSocketNewPostExecRestart and
      virNetSocketPreExecRestart which allow a virNetSocketPtr
      object to be created from a JSON object and saved to a
      JSON object, for the purpose of re-exec'ing a process.
      
      As well as saving the state in JSON format, the second
      method will disable the O_CLOEXEC flag so that the open
      file descriptors are preserved across the process re-exec()
      
      Since it is not possible to serialize SASL or TLS encryption
      state, an error will be raised if attempting to perform
      serialization on non-raw sockets
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      c2981453
  9. 21 9月, 2012 1 次提交
  10. 21 8月, 2012 1 次提交
    • P
      libssh2_transport: add ssh context support to virNetSocket · 637ea542
      Peter Krempa 提交于
      This patch enables virNetSocket to be used as an ssh client when
      properly configured.
      
      This patch adds function virNetSocketNewConnectLibSSH2() that takes all
      needed parameters and creates a libssh2 session and performs steps
      needed to open the connection and then create a virNetSocket that
      seamlesly encapsulates the communication.
      637ea542
  11. 20 8月, 2012 1 次提交
  12. 07 8月, 2012 1 次提交
  13. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  14. 19 1月, 2012 2 次提交
    • D
      Rename APIs for fetching UNIX socket credentials · 2f9dc36d
      Daniel P. Berrange 提交于
      To avoid a namespace clash with forthcoming identity APIs,
      rename the virNet*GetLocalIdentity() APIs to have the form
      virNet*GetUNIXIdentity()
      
      * daemon/remote.c, src/libvirt_private.syms: Update
        for renamed APIs
      * src/rpc/virnetserverclient.c, src/rpc/virnetserverclient.h,
        src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: s/LocalIdentity/UNIXIdentity/
      2f9dc36d
    • D
      Also retrieve GID from SO_PEERCRED · 59cf0398
      Daniel P. Berrange 提交于
      * daemon/remote.c, src/rpc/virnetserverclient.c,
        src/rpc/virnetserverclient.h, src/rpc/virnetsocket.c,
        src/rpc/virnetsocket.h: Add gid parameter
      59cf0398
  15. 16 11月, 2011 1 次提交
    • D
      Allow non-blocking message sending on virNetClient · ff465ad2
      Daniel P. Berrange 提交于
      Add a new virNetClientSendNonBlock which returns 2 on
      full send, 1 on partial send, 0 on no send, -1 on error
      
      If a partial send occurs, then a subsequent call to any
      of the virNetClientSend* APIs will finish any outstanding
      I/O.
      
      TODO: the virNetClientEvent event handler could be used
      to speed up completion of partial sends if an event loop
      is present.
      
      * src/rpc/virnetsocket.h, src/rpc/virnetsocket.c: Add new
        virNetSocketHasPendingData() API to test for cached
        data pending send.
      * src/rpc/virnetclient.c, src/rpc/virnetclient.h: Add new
        virNetClientSendNonBlock() API to send non-blocking API
      ff465ad2
  16. 15 11月, 2011 1 次提交
    • D
      Split src/util/network.{c,h} into 5 pieces · d3406045
      Daniel P. Berrange 提交于
      The src/util/network.c file is a dumping ground for many different
      APIs. Split it up into 5 pieces, along functional lines
      
       - src/util/virnetdevbandwidth.c: virNetDevBandwidth type & helper APIs
       - src/util/virnetdevvportprofile.c: virNetDevVPortProfile type & helper APIs
       - src/util/virsocketaddr.c: virSocketAddr and APIs
       - src/conf/netdev_bandwidth_conf.c: XML parsing / formatting
         for virNetDevBandwidth
       - src/conf/netdev_vport_profile_conf.c: XML parsing / formatting
         for virNetDevVPortProfile
      
      * src/util/network.c, src/util/network.h: Split into 5 pieces
      * src/conf/netdev_bandwidth_conf.c, src/conf/netdev_bandwidth_conf.h,
        src/conf/netdev_vport_profile_conf.c, src/conf/netdev_vport_profile_conf.h,
        src/util/virnetdevbandwidth.c, src/util/virnetdevbandwidth.h,
        src/util/virnetdevvportprofile.c, src/util/virnetdevvportprofile.h,
        src/util/virsocketaddr.c, src/util/virsocketaddr.h: New pieces
      * daemon/libvirtd.h, daemon/remote.c, src/conf/domain_conf.c,
        src/conf/domain_conf.h, src/conf/network_conf.c,
        src/conf/network_conf.h, src/conf/nwfilter_conf.h,
        src/esx/esx_util.h, src/network/bridge_driver.c,
        src/qemu/qemu_conf.c, src/rpc/virnetsocket.c,
        src/rpc/virnetsocket.h, src/util/dnsmasq.h, src/util/interface.h,
        src/util/iptables.h, src/util/macvtap.c, src/util/macvtap.h,
        src/util/virnetdev.h, src/util/virnetdevtap.c,
        tools/virsh.c: Update include files
      d3406045
  17. 07 11月, 2011 1 次提交
    • D
      Fix sending/receiving of FDs when stream returns EAGAIN · b2c62316
      Daniel P. Berrange 提交于
      The code calling sendfd/recvfd was mistakenly assuming those
      calls would never block. They can in fact return EAGAIN and
      this is causing us to drop the client connection when blocking
      ocurrs while sending/receiving FDs.
      
      Fixing this is a little hairy on the incoming side, since at
      the point where we see the EAGAIN, we already thought we had
      finished receiving all data for the packet. So we play a little
      trick to reset bufferOffset again and go back into polling for
      more data.
      
      * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Update
        virNetSocketSendFD/RecvFD to return 0 on EAGAIN, or 1
        on success
      * src/rpc/virnetclient.c: Move decoding of header & fds
        out of virNetClientCallDispatch and into virNetClientIOHandleInput.
        Handling blocking when sending/receiving FDs
      * src/rpc/virnetmessage.h: Add a 'donefds' field to track
        how many FDs we've sent / received
      * src/rpc/virnetserverclient.c: Handling blocking when
        sending/receiving FDs
      b2c62316
  18. 28 10月, 2011 1 次提交
  19. 11 10月, 2011 1 次提交
  20. 15 8月, 2011 3 次提交
  21. 04 8月, 2011 1 次提交
  22. 22 7月, 2011 1 次提交
  23. 19 7月, 2011 1 次提交
    • D
      Use a virFreeCallback on virNetSocket to ensure safe release · 7ea2ef4c
      Daniel P. Berrange 提交于
      When unregistering an I/O callback from a virNetSocket object,
      there is still a chance that an event may come in on the callback.
      In this case it is possible that the virNetSocket might have been
      freed already. Make use of a virFreeCallback when registering
      the I/O callbacks and hold a reference for the entire time the
      callback is set.
      
      * src/rpc/virnetsocket.c: Register a free function for the
        file handle watch
      * src/rpc/virnetsocket.h, src/rpc/virnetserverservice.c,
        src/rpc/virnetserverclient.c, src/rpc/virnetclient.c: Add
        a free function for the socket I/O watches
      7ea2ef4c
  24. 12 7月, 2011 1 次提交
    • O
      remote/ssh: support for no_verify. · 9a0e6a8f
      Oskari Saarenmaa 提交于
      Set StrictHostKeyChecking=no to auto-accept new ssh host keys if the
      no_verify extra parameter was specified.  This won't disable host key
      checking for already known hosts.  Includes a test and documentation.
      9a0e6a8f
  25. 24 6月, 2011 3 次提交
    • D
      Introduce generic RPC module for advertising via MDNS · e23ec81d
      Daniel P. Berrange 提交于
      Allow RPC servers to advertise themselves using MDNS,
      via Avahi
      
      * src/rpc/virnetserver.c, src/rpc/virnetserver.h: Allow
        registration of MDNS services via avahi
      * src/rpc/virnetserverservice.c, src/rpc/virnetserverservice.h: Add
        API to fetch the listen port number
      * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Add API to
        fetch the local port number
      * src/rpc/virnetservermdns.c, src/rpc/virnetservermdns.h: Represent
        an MDNS advertisement
      e23ec81d
    • D
      Integrate TLS/SASL directly into the socket APIs · f5fa167e
      Daniel P. Berrange 提交于
      This extends the basic virNetSocket APIs to allow them to have
      a handle to the TLS/SASL session objects, once established.
      This ensures that any data reads/writes are automagically
      passed through the TLS/SASL encryption layers if required.
      
      * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Wire up
        SASL/TLS encryption
      f5fa167e
    • D
      Introduce a generic object for using network sockets · 58b5b14e
      Daniel P. Berrange 提交于
      Introduces a simple wrapper around the raw POSIX sockets APIs
      and name resolution APIs. Allows for easy creation of client
      and server sockets with correct usage of name resolution APIs
      for protocol agnostic socket setup.
      
      It can listen for UNIX and TCP stream sockets.
      
      It can connect to UNIX, TCP streams directly, or indirectly
      to UNIX sockets via an SSH tunnel or external command
      
      * src/Makefile.am: Add to libvirt-net-rpc.la
      * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Generic
        sockets APIs
      * tests/Makefile.am: Add socket test
      * tests/virnetsockettest.c: New test case
      * tests/testutils.c: Avoid overriding LIBVIRT_DEBUG settings
      * tests/ssh.c: Dumb helper program for SSH tunnelling tests
      58b5b14e