[libvirt] [PATCH 9/n] util: move detection of shared filesystems
Peter Krempa
pkrempa at redhat.com
Mon Mar 31 08:27:01 UTC 2014
On 03/29/14 21:46, Eric Blake wrote:
> 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 at redhat.com>
> ---
> src/libvirt_private.syms | 4 +-
> src/qemu/qemu_driver.c | 2 +-
> src/qemu/qemu_migration.c | 2 +-
> src/security/security_dac.c | 2 +-
> src/security/security_selinux.c | 8 +--
> src/util/virfile.c | 122 ++++++++++++++++++++++++++++++++++++++-
> src/util/virfile.h | 13 ++++-
> src/util/virstoragefile.c | 123 +---------------------------------------
> src/util/virstoragefile.h | 12 ----
> 9 files changed, 144 insertions(+), 144 deletions(-)
>
ACK,
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140331/78a4723b/attachment-0001.sig>
More information about the libvir-list
mailing list