[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH RFC v1 11/12] ts-debian-install: add in seclabel if XSM is enabled



... otherwise the guest cannot be created.

Also changed cfg_xend to cfg while I was there.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 ts-debian-install |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/ts-debian-install b/ts-debian-install
index 58ea743..c42ae09 100755
--- a/ts-debian-install
+++ b/ts-debian-install
@@ -89,8 +89,15 @@ END
             $initrd_opt \\
             $archarg
 END
-    my $cfg_xend= "/etc/xen/$gho->{Name}.cfg";
-    store_runvar("$gho->{Guest}_cfgpath", $cfg_xend);
+    my $cfg= "/etc/xen/$gho->{Name}.cfg";
+
+    if ($r{enable_xsm} =~ m/y/) {
+       target_cmd_root($ho, <<"END");
+echo "seclabel='system_u:system_r:domU_t'" >> $cfg
+END
+    }
+
+    store_runvar("$gho->{Guest}_cfgpath", $cfg);
     store_runvar("$gho->{Guest}_swap_lv", "$gho->{Name}-swap");
 }
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.