1. 04 11月, 2017 1 次提交
  2. 23 10月, 2017 1 次提交
  3. 20 10月, 2017 1 次提交
  4. 19 10月, 2017 6 次提交
  5. 17 10月, 2017 2 次提交
  6. 16 10月, 2017 2 次提交
    • L
      hyperv: Escape WQL queries · 5ae2d9c2
      Ladi Prosek 提交于
      The code was vulnerable to SQL injection. Likely not a security issue due to
      WMI SQL and other constraints but still lame. For example:
      
        virsh # dominfo \"
        error: failed to get domain '"'
        error: internal error: SOAP fault during enumeration: code 's:Sender', subcode
        'n:CannotProcessFilter', reason 'The data source could not process the filter.
        The filter might be missing or it might be invalid. Change the filter and try
        the request again.  ', detail 'The WS-Management service cannot process the
        request. The WQL query is invalid. '
      
      This commit fixes the Hyper-V driver by escaping all WMI SQL string parameters.
      
      The same command with the fix:
      
        virsh # dominfo \"
        error: failed to get domain '"'
        error: Domain not found: No domain with name "
      Signed-off-by: NLadi Prosek <lprosek@redhat.com>
      5ae2d9c2
    • J
      conf: Introduce virDomainCapsCPUModelsGet · 20664ec7
      Jiri Denemark 提交于
      This internal API can be used to find a specific CPU model in
      virDomainCapsCPUModels list.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      20664ec7
  7. 10 10月, 2017 1 次提交
  8. 06 10月, 2017 1 次提交
  9. 05 10月, 2017 1 次提交
  10. 19 9月, 2017 4 次提交
    • J
      storage: Introduce APIs to search/scan storage pool volumes list · 5bf9b655
      John Ferlan 提交于
      Introduce virStoragePoolObjForEachVolume to scan each volume
      calling the passed callback function until all volumes have been
      processed in the storage pool volume list, unless the callback
      function returns an error.
      
      Introduce virStoragePoolObjSearchVolume to search each volume
      calling the passed callback function until it returns true
      indicating that the desired volume was found.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5bf9b655
    • J
      storage: Introduce storage volume add, delete, count APIs · 40630a8e
      John Ferlan 提交于
      Create/use virStoragePoolObjAddVol in order to add volumes onto list.
      
      Create/use virStoragePoolObjRemoveVol in order to remove volumes from list.
      
      Create/use virStoragePoolObjGetVolumesCount to get count of volumes on list.
      
      For the storage driver, the logic alters when the volumes.obj list grows
      to after we've fetched the volobj. This is an optimization of sorts, but
      also doesn't "needlessly" grow the volumes.objs list and then just decr
      the count if the virGetStorageVol fails.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      40630a8e
    • J
      storage: Introduce virStoragePoolObjNew · 407e6a36
      John Ferlan 提交于
      Create/use a helper to perform object allocation.
      
      Adjust storagevolxml2argvtest.c in order to use the allocator and
      setting of the obj->def.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      407e6a36
    • J
      storage: Create accessor API's for virStoragePoolObj · b3198286
      John Ferlan 提交于
      In preparation for making a private object, create accessor API's for
      consumer storage functions to use:
      
          virStoragePoolObjGetDef
          virStoragePoolObjSetDef
          virStoragePoolObjGetNewDef
          virStoragePoolObjDefUseNewDef
          virStoragePoolObjGetConfigFile
          virStoragePoolObjSetConfigFile
          virStoragePoolObjGetAutostartLink
          virStoragePoolObjIsActive
          virStoragePoolObjSetActive
          virStoragePoolObjIsAutostart
          virStoragePoolObjSetAutostart
          virStoragePoolObjGetAsyncjobs
          virStoragePoolObjIncrAsyncjobs
          virStoragePoolObjDecrAsyncjobs
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      b3198286
  11. 18 9月, 2017 3 次提交
  12. 15 9月, 2017 1 次提交
  13. 12 9月, 2017 1 次提交
  14. 28 8月, 2017 1 次提交
  15. 27 8月, 2017 1 次提交
  16. 18 8月, 2017 1 次提交
  17. 17 8月, 2017 11 次提交
  18. 15 8月, 2017 1 次提交
    • J
      util: Introduce and use virObjectRWUnlock · 045d712c
      John Ferlan 提交于
      Rather than overload virObjectUnlock as commit id '77f4593b' has
      done, create a separate virObjectRWUnlock API that will force the
      consumers to make the proper decision regarding unlocking the
      RWLock's. Similar to the RWLockRead and RWLockWrite, use the
      virObjectGetRWLockableObj helper. This restores the virObjectUnlock
      code to using the virObjectGetLockableObj.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      045d712c