]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Don't reset user/group/security label on shared filesystems during migrate
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 13 May 2010 15:49:22 +0000 (11:49 -0400)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 14 May 2010 13:21:24 +0000 (09:21 -0400)
commit02ddaddfa81cbd400bae14dfe1a8296d0c68f9f2
tree1dea0dceae1313b120606bb73c855f415f885d1b
parent117d04fb1d388df700cc37c4d2a68189fab280c0
Don't reset user/group/security label on shared filesystems during migrate

When QEMU runs with its disk on NFS, and as a non-root user, the
disk is chownd to that non-root user. When migration completes
the last step is shutting down the QEMU on the source host. THis
normally resets user/group/security label. This is bad when the
VM was just migrated because the file is still in use on the dest
host. It is thus neccessary to skip the reset step for any files
found to be on a shared filesystem

* src/libvirt_private.syms: Export virStorageFileIsSharedFS
* src/util/storage_file.c, src/util/storage_file.h: Add a new
  method virStorageFileIsSharedFS() to determine if a file is
  on a shared filesystem (NFS, GFS, OCFS2, etc)
* src/qemu/qemu_driver.c: Tell security driver not to reset
  disk labels on migration completion
* src/qemu/qemu_security_dac.c, src/qemu/qemu_security_stacked.c,
  src/security/security_selinux.c, src/security/security_driver.h,
  src/security/security_apparmor.c: Add ability to skip disk
  restore step for files on shared filesystems.
src/libvirt_private.syms
src/qemu/qemu_driver.c
src/qemu/qemu_security_dac.c
src/qemu/qemu_security_stacked.c
src/security/security_apparmor.c
src/security/security_driver.h
src/security/security_selinux.c
src/util/storage_file.c
src/util/storage_file.h