1. 21 10月, 2019 2 次提交
  2. 16 10月, 2019 1 次提交
  3. 15 10月, 2019 5 次提交
  4. 14 10月, 2019 3 次提交
  5. 01 10月, 2019 1 次提交
    • D
      rpc: fix escaping of shell path for netcat binary · 76d31244
      Daniel P. Berrangé 提交于
      Consider having a nc binary in the path with a space in its name,
      for example '/tmp/fo o/nc'
      
      This results in libvirt running SSH with the following arg value
      
        "'if ''/tmp/fo o/nc'' -q 2>&1 | grep \"requires
          an argument\" >/dev/null 2>&1; then ARG=-q0;
          else ARG=;fi;''/tmp/fo o/nc'' $ARG -U
          /var/run/libvirt/libvirt-sock'"
      
      The use of the single quote escaping was introduced by
      
        commit 6ac6238d
        Author: Guido Günther <agx@sigxcpu.org>
        Date:   Thu Oct 13 21:49:01 2011 +0200
      
          Use virBufferEscapeShell in virNetSocketNewConnectSSH
      
          to escape the netcat command since it's passed to the shell. Adjust
          expected test case output accordingly.
      
      While the intention of this change was good, the result is broken as it
      is still underquoted.
      
      On the SSH server side, SSH itself runs the command via the shell.
      Our command is then invoking the shell again. Thus we see
      
      $ virsh -c qemu+ssh://root@domokun/system?netcat=%2Ftmp%2Ffo%20o%2Fnc list
      error: failed to connect to the hypervisor
      error: End of file while reading data: sh: /tmp/fo: No such file or directory: Input/output error
      
      With the second level of escaping added we can now successfully use a nc
      binary with a space in the path.
      
      The original test case added was misleading as it illustrated using a
      binary path of 'nc -4' which is not a path, it is a command with a
      separate argument, which is getting interpreted as a path.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      76d31244
  6. 16 9月, 2019 2 次提交
  7. 28 8月, 2019 1 次提交
  8. 14 8月, 2019 1 次提交
  9. 09 8月, 2019 1 次提交
  10. 07 8月, 2019 2 次提交
  11. 27 7月, 2019 1 次提交
  12. 19 7月, 2019 1 次提交
    • D
      remote: increase daemon shutdown timer to 2 minutes · 9d7fcdbf
      Daniel P. Berrangé 提交于
      Shutting down the daemon after 30 seconds of being idle is a little bit
      too aggressive. Especially when using 'virsh' in single-shot mode, as
      opposed to interactive shell mode, it would not be unusual to have
      more than 30 seconds between commands. This will lead to the daemon
      shutting down and starting up between a series of commands.
      
      Increasing the shutdown timer to 2 minutes will make it less likely that
      the daemon will shutdown while the user is in the middle of a series of
      commands.
      Reviewed-by: NJim Fehlig <jfehlig@suse.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      9d7fcdbf
  13. 12 7月, 2019 9 次提交
  14. 11 7月, 2019 2 次提交
    • D
      rpc: always pass "-T -e none" args to ssh · 1939bcd5
      Daniel P. Berrangé 提交于
      Way back in the past, the "no_tty=1" option was added for the remote
      driver to disable local password prompting by disabling use of the local
      tty:
      
        commit b32f4298
        Author: Daniel P. Berrange <berrange@redhat.com>
        Date:   Fri Sep 21 20:17:09 2007 +0000
      
          Added a no_tty param to remote URIs to stop SSH prompting for password
      
      This was done by adding "-T -o BatchMode=yes -e none" args to ssh. This
      achieved the desired results but is none the less semantically flawed
      because it is mixing up config parameters for the local tty vs the
      remote tty.
      
      The "-T" arg stops allocation of a TTY on the remote host. This is good
      for all libvirt SSH tunnels as we never require a TTY for our usage
      model, so we should have just passed this unconditionally.
      
      The "-e none" option disables the escape character for sessions with a
      TTY. If we pass "-T" this is not required, but it also not harmful to
      add it, so we should just pass it unconditionally too.
      
      Only the "-o BatchMode=yes" option is related to disabling local
      password prompts and thus needs control via the no_tty URI param.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      1939bcd5
    • D
  15. 08 7月, 2019 1 次提交
    • D
      rpc: ensure thread safe initialization of SASL library · 7722606b
      Daniel P. Berrangé 提交于
      Neither the sasl_client_init or sasl_server_init methods are even
      remotely threadsafe. They do a bunch of one-time initialization and
      merely use a simple integer counter to avoid repeated work, not even
      using atomic increment/reads on the counter. This can easily race in a
      threaded program. Protect the calls using a virOnce initializer function
      which is guaranteed threadsafe at least from libvirt's POV.
      
      If the application using libvirt also uses another library that makes
      use of SASL then the race still exists. It is impossible to fix that
      fully except in SASL code itself.
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      7722606b
  16. 01 7月, 2019 1 次提交
  17. 21 6月, 2019 3 次提交
    • D
      rpc: add $(SASL_CFLAGS) to libvirt_net_rpc_server_la_CFLAGS · c44022f6
      Daniel P. Berrangé 提交于
      The files for libvirt-net-rpc-server.la refernce the sasl/sasl.h
      system header but never used the $(SASL_CFLAGS) variable. This
      was never noticed previously because the $(AVAHI_CLFAGS) were
      set and these typically pulled in the same include directory.
      
      When mDNS/Avahi support was removed this exposed the bug which
      caused FreeBSD builds to break as /usr/local/include was no
      longer searched for headers.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      c44022f6
    • D
      remote: delete the avahi mDNS support · 5a148ce8
      Daniel P. Berrangé 提交于
      Libvirtd has long had integration with avahi for advertising libvirtd
      using mDNS when TCP/TLS listening is enabled. For a long time the
      virt-manager application had support for auto-detecting libvirtds
      on the local network using mDNS, but this was removed last year
      
        commit fc8f8d5d7e3ba80a0771df19cf20e84a05ed2422
        Author: Cole Robinson <crobinso@redhat.com>
        Date:   Sat Oct 6 20:55:31 2018 -0400
      
          connect: Drop avahi support
      
          Libvirtd can advertise itself over avahi. The feature is disabled by
          default though and in practice I hear of no one actually using it
          and frankly I don't think it's all that useful
      
          The 'Open Connection' wizard has a disproportionate amount of code
          devoted to this feature, but I don't think it's useful or worth
          maintaining, so let's drop it
      
      I've never heard of any other applications having support for using
      mDNS to detect libvirtd instances. Though it is theoretically possible
      something exists out there, it is clearly going to be a niche use case
      in the virt ecosystem as a whole.
      
      By removing avahi integration we can cut down the dependency chain for
      the basic libvirtd install and reduce our code maint burden.
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      5a148ce8
    • P
      rpc: virnetlibsshsession: update deprecated functions · e0ce339c
      Pavel Hrdina 提交于
      In libssh 0.9.0 functions ssh_is_server_known and ssh_write_knownhost
      are marked as deprecated.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1722735Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      e0ce339c
  18. 19 6月, 2019 1 次提交
  19. 17 6月, 2019 1 次提交
  20. 23 5月, 2019 1 次提交