1. 20 11月, 2014 1 次提交
  2. 17 9月, 2014 1 次提交
  3. 15 9月, 2014 1 次提交
  4. 09 9月, 2014 1 次提交
  5. 05 9月, 2014 1 次提交
    • E
      maint: use consistent if-else braces in remaining spots · d194d6e7
      Eric Blake 提交于
      I'm about to add a syntax check that enforces our documented
      HACKING style of always using matching {} on if-else statements.
      
      This patch focuses on all remaining problems, where there weren't
      enough issues to warrant splitting it further.
      
      * src/remote/remote_driver.c (doRemoteOpen): Correct use of {}.
      * src/security/virt-aa-helper.c (vah_add_path, valid_path, main):
      Likewise.
      * src/rpc/virnetsocket.c (virNetSocketNewConnectLibSSH2):
      Likewise.
      * src/esx/esx_vi_types.c (esxVI_Type_FromString): Likewise.
      * src/uml/uml_driver.c (umlDomainDetachDevice): Likewise.
      * src/util/viralloc.c (virShrinkN): Likewise.
      * src/util/virbuffer.c (virBufferURIEncodeString): Likewise.
      * src/util/virdbus.c (virDBusCall): Likewise.
      * src/util/virnetdev.c (virNetDevValidateConfig): Likewise.
      * src/util/virnetdevvportprofile.c
      (virNetDevVPortProfileGetNthParent): Likewise.
      * src/util/virpci.c (virPCIDeviceIterDevices)
      (virPCIDeviceWaitForCleanup)
      (virPCIDeviceIsBehindSwitchLackingACS): Likewise.
      * src/util/virsocketaddr.c (virSocketAddrGetNumNetmaskBits):
      Likewise.
      * src/util/viruri.c (virURIParseParams): Likewise.
      * daemon/stream.c (daemonStreamHandleAbort): Likewise.
      * tests/testutils.c (virtTestResult): Likewise.
      * tests/cputest.c (cpuTestBaseline): Likewise.
      * tools/virsh-domain.c (cmdDomPMSuspend): Likewise.
      * tools/virsh-host.c (cmdNodeSuspend): Likewise.
      * src/esx/esx_vi_generator.py (Type.generate_typefromstring):
      Tweak generated code.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d194d6e7
  6. 01 9月, 2014 1 次提交
    • C
      Fix connection to already running session libvirtd · 0f03ca6d
      Christophe Fergeau 提交于
      Since 1b807f92, connecting with virsh to an already running session
      libvirtd fails with:
      $ virsh list --all
      error: failed to connect to the hypervisor
      error: no valid connection
      error: Failed to connect socket to
      '/run/user/1000/libvirt/libvirt-sock': Transport endpoint is already
      connected
      
      This is caused by a logic error in virNetSocketNewConnectUnix: even if
      the connection to the daemon socket succeeded, we still try to spawn the
      daemon and then connect to it.
      This commit changes the logic to not try to spawn libvirtd if we
      successfully connected to its socket.
      
      Most of this commit is whitespace changes, use of -w is recommended to
      look at it.
      0f03ca6d
  7. 23 8月, 2014 1 次提交
    • J
      virnetsocket: Resolve Coverity RESOURCE_LEAK · cc1bbbbe
      John Ferlan 提交于
      Since '1b807f92' - Coverity complains that in the error paths of
      both virFork() and virProcessWait() that the 'passfd' will not be closed.
      Added the VIR_FORCE_CLOSE(passfd) and initialized it to -1.
      
      Also noted that variable 'buf' was never really used - so I removed it
      cc1bbbbe
  8. 22 8月, 2014 1 次提交
  9. 03 7月, 2014 1 次提交
    • J
      Use virBufferCheckError everywhere we report OOM error · 92a8e72f
      Ján Tomko 提交于
      Replace:
      if (virBufferError(&buf)) {
          virBufferFreeAndReset(&buf);
          virReportOOMError();
          ...
      }
      
      with:
      if (virBufferCheckError(&buf) < 0)
          ...
      
      This should not be a functional change (unless some callers
      misused the virBuffer APIs - a different error would be reported
      then)
      92a8e72f
  10. 02 6月, 2014 1 次提交
  11. 29 4月, 2014 1 次提交
  12. 25 3月, 2014 1 次提交
  13. 18 3月, 2014 2 次提交
  14. 04 11月, 2013 1 次提交
    • R
      virnetsocket: fix getsockopt on FreeBSD · 8079b0e0
      Ryota Ozaki 提交于
      aa0f0992 introduced a strict error checking for getsockopt and it
      revealed that getting a peer credential of a socket on FreeBSD
      didn't work. Libvirtd hits the error:
        error : virNetSocketGetUNIXIdentity:1198 : Failed to get valid
        client socket identity groups
      
      SOL_SOCKET (0xffff) was used as a level of getsockopt for
      LOCAL_PEERCRED, however, it was wrong. 0 is correct as well as
      Mac OS X.
      
      So for LOCAL_PEERCRED our options are SOL_LOCAL (if defined) or
      0 on Mac OS X and FreeBSD. According to the fact, the patch
      simplifies the code by removing ifdef __APPLE__.
      
      I tested the patch on FreeBSD 8.4, 9.2 and 10.0-BETA1.
      Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
      8079b0e0
  15. 22 10月, 2013 1 次提交
  16. 21 10月, 2013 1 次提交
  17. 17 10月, 2013 1 次提交
    • B
      better error checking for LOCAL_PEERCRED · aa0f0992
      Brian Candler 提交于
      This patch improves the error checking in the LOCAL_PEERCRED version
      of virNetSocketGetUNIXIdentity, used by FreeBSD and Mac OSX.
      
      1. The error return paths now correctly unlock the socket. This is
      implemented in exactly the same way as the SO_PEERCRED version,
      using "goto cleanup"
      
      2. cr.cr_ngroups is initialised to -1, and cr.cr_ngroups is checked
      for negative and overlarge values.
      
      This means that if the getsockopt() call returns success but doesn't
      actually update the xucred structure, this is now caught. This
      happened previously when getsockopt was called with SOL_SOCKET
      instead of SOL_LOCAL, prior to commit 5a468b38, and resulted in
      random uids being accepted.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      aa0f0992
  18. 11 10月, 2013 1 次提交
  19. 07 10月, 2013 1 次提交
    • R
      rpc: fix getsockopt for LOCAL_PEERCRED on Mac OS X · 5a468b38
      Ryota Ozaki 提交于
      This fixes the following error:
        error : virGetUserEnt:703 : Failed to find user record for uid '32654'
      
      '32654' (it's random and varies) comes from getsockopt with
      LOCAL_PEERCRED option. getsockopt returns w/o error but seems
      to not set any value to the buffer for uid.
      
      For Mac OS X, LOCAL_PEERCRED has to be used with SOL_LOCAL level.
      With SOL_LOCAL, getsockopt returns a correct uid.
      
      Note that SOL_LOCAL can be found in
      /System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/un.h.
      Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5a468b38
  20. 28 9月, 2013 2 次提交
  21. 24 9月, 2013 1 次提交
  22. 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
  23. 11 7月, 2013 1 次提交
  24. 10 7月, 2013 1 次提交
  25. 23 5月, 2013 1 次提交
  26. 21 5月, 2013 1 次提交
  27. 08 5月, 2013 2 次提交
  28. 03 5月, 2013 1 次提交
  29. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  30. 21 3月, 2013 1 次提交
    • G
      Don't fail if SELinux is diabled · 82eec793
      Guido Günther 提交于
      but libvirt is built with --with-selinux. In this case getpeercon
      returns ENOPROTOOPT so don't return an error in that case but simply
      don't set seccon.
      82eec793
  31. 20 3月, 2013 1 次提交
  32. 19 3月, 2013 1 次提交
  33. 14 3月, 2013 1 次提交
    • D
      Re-add DTrace probes on 'dispose' functions · ad9ea4a9
      Daniel P. Berrange 提交于
      When converting to virObject, the probes on the 'Free' functions
      were removed on the basis that there is a probe on virObjectFree
      that suffices. This puts a burden on people writing probe scripts
      to identify which object is being dispose. This adds back probes
      in the 'Dispose' functions and updates the rpc monitor systemtap
      example to use them
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ad9ea4a9
  34. 06 2月, 2013 1 次提交
  35. 16 1月, 2013 3 次提交