qemu: Don't chown files on NFS share if dynamic_ownership is off

When dynamic ownership is disabled we don't want to chown any files,
not just local.
This commit is contained in:
Michal Privoznik 2011-07-07 17:33:15 +02:00
parent a1092070d4
commit 724819a10a

View 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;
}