]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
util: move detection of shared filesystems
authorEric Blake <eblake@redhat.com>
Sat, 29 Mar 2014 20:15:33 +0000 (14:15 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 1 Apr 2014 16:38:14 +0000 (10:38 -0600)
commit5160ab795ac0c2feb9ad60f981c6d93e6373cb5a
tree42e117e8b62d4e20c5b9f4d5c76bf932401b8eab
parent8a20e227f64422e99a17cb3e05ec33a4fde4674a
util: move detection of shared filesystems

The code in virstoragefile.c is getting more complex as I
consolidate backing chain handling code.  But for the setuid
virt-login-shell, we don't need to crawl backing chains.  It's
easier to audit things for setuid security if there are fewer
files involved, so this patch moves the one function that
virFileOpen() was actually relying on to also live in virfile.c.

* src/util/virstoragefile.c (virStorageFileIsSharedFS)
(virStorageFileIsSharedFSType): Move...
* src/util/virfile.c (virFileIsSharedFS, virFileIsSharedFSType):
...to here, and rename.
(virFileOpenAs): Update caller.
* src/security/security_selinux.c
(virSecuritySELinuxSetFileconHelper)
(virSecuritySELinuxSetSecurityAllLabel)
(virSecuritySELinuxRestoreSecurityImageLabelInt): Likewise.
* src/security/security_dac.c
(virSecurityDACRestoreSecurityImageLabelInt): Likewise.
* src/qemu/qemu_driver.c (qemuOpenFileAs): Likewise.
* src/qemu/qemu_migration.c (qemuMigrationIsSafe): Likewise.
* src/util/virstoragefile.h: Adjust declarations.
* src/util/virfile.h: Likewise.
* src/libvirt_private.syms (virfile.h, virstoragefile.h): Move
symbols as appropriate.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/libvirt_private.syms
src/qemu/qemu_driver.c
src/qemu/qemu_migration.c
src/security/security_dac.c
src/security/security_selinux.c
src/util/virfile.c
src/util/virfile.h
src/util/virstoragefile.c
src/util/virstoragefile.h