[libvirt] [PATCH 1/1] Skip file-based security checks for network disks

Eric Blake eblake at redhat.com
Tue Dec 21 14:35:42 UTC 2010


On 12/20/2010 07:30 PM, Josh Durgin wrote:
> Network disks are accessed by qemu directly, and have no
> associated file on the host, so checking for file ownership etc.
> is unnecessary.
> 
> Signed-off-by: Josh Durgin <joshd at hq.newdream.net>
> ---
>  src/conf/domain_conf.c           |    2 +-
>  src/qemu/qemu_security_dac.c     |    2 +-
>  src/security/security_apparmor.c |    2 +-
>  src/security/security_selinux.c  |    2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index d516fbe..c857a89 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -8353,7 +8353,7 @@ int virDomainDiskDefForeachPath(virDomainDiskDefPtr disk,
>      size_t depth = 0;
>      char *nextpath = NULL;
> 
> -    if (!disk->src)
> +    if (!disk->src || disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK)

ACK and pushed.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101221/7e79bf1a/attachment-0001.sig>


More information about the libvir-list mailing list