]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Don't chown files on NFS share if dynamic_ownership is off
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 7 Jul 2011 15:33:15 +0000 (17:33 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 8 Jul 2011 08:05:59 +0000 (10:05 +0200)
When dynamic ownership is disabled we don't want to chown any files,
not just local.

src/qemu/qemu_driver.c

index 4f12beba91ed0e1fb54cdd831d05fbfdda99c58d..a05a1ee992de52fc7cc7c7471b13b3d4e5cdb525 100644 (file)
@@ -2164,11 +2164,10 @@ static int qemudDomainSaveFlag(struct qemud_driver *driver, virDomainPtr dom,
         is_reg = true;
     } else {
         is_reg = !!S_ISREG(sb.st_mode);
-        /* If the path is regular local file which exists
+        /* If the path is regular file which exists
          * already and dynamic_ownership is off, we don't
          * want to change it's ownership, just open it as-is */
-        if (is_reg && !driver->dynamicOwnership &&
-            virStorageFileIsSharedFS(path) == 0) {
+        if (is_reg && !driver->dynamicOwnership) {
             uid=sb.st_uid;
             gid=sb.st_gid;
         }