1. 19 2月, 2016 2 次提交
    • E
      admin: Fix memory leak in remoteAdminConnectClose · e9e85655
      Erik Skultety 提交于
      When virt-admin is run with valgrind, this kind of output can be obtained:
      
      HEAP SUMMARY:
        in use at exit: 134,589 bytes in 1,031 blocks
        total heap usage: 2,667 allocs, 1,636 frees, 496,755 bytes allocated
      
      88 bytes in 1 blocks are definitely lost in loss record 82 of 128
       at 0x4C2A9C7: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
       by 0x52F6D1F: virAllocVar (viralloc.c:560)
       by 0x5350268: virObjectNew (virobject.c:193)
       by 0x53503E0: virObjectLockableNew (virobject.c:219)
       by 0x4E3BBCB: virAdmConnectNew (datatypes.c:832)
       by 0x4E38495: virAdmConnectOpen (libvirt-admin.c:209)
       by 0x10C541: vshAdmConnect (virt-admin.c:107)
       by 0x10C7B2: vshAdmReconnect (virt-admin.c:163)
       by 0x10CC7C: cmdConnect (virt-admin.c:298)
       by 0x110838: vshCommandRun (vsh.c:1224)
       by 0x10DFD8: main (virt-admin.c:862)
      
       LEAK SUMMARY:
          definitely lost: 88 bytes in 1 blocks
          indirectly lost: 0 bytes in 0 blocks
          possibly lost: 0 bytes in 0 blocks
          still reachable: 134,501 bytes in 1,030 blocks
          suppressed: 0 bytes in 0 blocks
      
      This is because virNetClientSetCloseCallback was being reinitialized
      incorrectly. By resetting the callbacks in a proper way, the leak is fixed.
      e9e85655
    • M
      esx: Avoid using vSphere SessionIsActive function · 647ac97a
      Matthias Bolte 提交于
      A login session with the vSphere API might expire after some idle time.
      The esxVI_EnsureSession function uses the SessionIsActive function to
      check if the current session has expired and a relogin needs to be done.
      
      But the SessionIsActive function needs the Sessions.ValidateSession
      privilege that is considered as an admin level privilege.
      
      Only vCenter actually provides the SessionIsActive function. This results
      in requiring an admin level privilege even for read-only operations on
      a vCenter server.
      
      ESX and VMware Server don't provide the SessionIsActive function and
      the code already works around that. Use the same workaround for vCenter
      again.
      
      This basically reverts commit 5699034b.
      647ac97a
  2. 18 2月, 2016 23 次提交
  3. 17 2月, 2016 15 次提交