mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 13:17:58 +03:00
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:
parent
a1092070d4
commit
724819a10a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user