]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix SELinux security label test
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 19 Dec 2012 10:05:17 +0000 (10:05 +0000)
committerEric Blake <eblake@redhat.com>
Fri, 22 Feb 2013 16:25:41 +0000 (09:25 -0700)
If securityselinuxtest was run on a system with newer SELinux
policy it would fail, due to using svirt_tcg_t instead of
svirt_t. Fixing the domain type to be KVM avoids this issue.
(cherry picked from commit 32df483f1d5916f00e3ab15158f099234909e9c2)

tests/securityselinuxtest.c

index 8bcf3a1ce84bac41f334fbefad2bd4986b487e57..0fa70ba9a9ef349f7d47c15877c9347a2a5cd120 100644 (file)
@@ -77,6 +77,7 @@ testBuildDomainDef(bool dynamic,
     if (VIR_ALLOC(secdef) < 0)
         goto no_memory;
 
+    def->virtType = VIR_DOMAIN_VIRT_KVM;
     def->seclabels[0] = secdef;
     def->seclabels[0]->type = dynamic ? VIR_DOMAIN_SECLABEL_DYNAMIC : VIR_DOMAIN_SECLABEL_STATIC;