1. 26 11月, 2015 4 次提交
  2. 25 11月, 2015 17 次提交
  3. 24 11月, 2015 9 次提交
  4. 23 11月, 2015 4 次提交
  5. 21 11月, 2015 2 次提交
    • J
      storage: Change virStorageBackendVolOpen to use virFileOpenAs · 5e3ad0b7
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1282288
      
      Rather than using just open on the path, allow for the possibility that
      the path to be opened resides on an NFS root-squash target and was created
      under a different uid/gid.
      
      Without using virFileOpenAs an attempt to get the volume size data may fail
      if the current user doesn't have permissions to read the volume, such as
      would be the case if mode wasn't supplied in the volume XML and the default
      VIR_STORAGE_DEFAULT_VOL_PERM_MODE (e.g. 0600) was used. Under this scenario
      the owner/group is not root:root, thus this path run under root would fail
      to open/read the volume.
      
      NB: The virFileOpenAs code using OPEN_FORK will only work when the failure
      is not EACESS/EPERM and the path resolves to a shared file system.
      5e3ad0b7
    • J
      storage: Really fix setting mode for backend exec in NFS root-squash env · ce6506b0
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1282288
      
      Although commit id '77346f27' resolves part of the problem regarding creating
      a qemu-img image in an NFS root-squash environment, it really didn't fix the
      entire problem. Unfortunately it only masked the problem. It seems qemu-img
      must open/create the image using 0644, which if used by target.perms would
      result in the chmod not being called since the mode desired and set match.
      
      Although qemu-img could conceivably ignore the mode when creating, libvirt
      has more knowledge of the environment and can make the adjustment to the
      mode far more easily by using virFileOpenAs with VIR_FILE_OPEN_FORCE_MODE.
      If that's successful, then we know on return the file will have the right
      owner and mode, so we can declare success
      ce6506b0
  6. 20 11月, 2015 4 次提交