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

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



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 ts-debian-hvm-install |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index 37eade2..3c557ef 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -152,10 +152,10 @@ sub prep () {
     target_putfilecontents_root_stash($ho, 10, preseed(),
                                       $preseed_file_path);
 
-    more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb,
-                          OnReboot => 'preserve',
-                          Bios => $r{bios},
-                          PostImageHook => sub {
+    my $cfg = more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb,
+                                   OnReboot => 'preserve',
+                                   Bios => $r{bios},
+                                   PostImageHook => sub {
         my $cmds = iso_copy_content_from_image($gho, $newiso);
         $cmds .= prepare_initrd($initrddir,$newiso,$preseed_file_path);
         target_cmd_root($ho, $cmds, $isotimeout);
@@ -167,6 +167,12 @@ sub prep () {
 
         iso_create_genisoimage($ho, $gho->{Rimage}, $newiso, $isotimeout, 
@isogen_opts);
     });
+
+    if ($r{enable_xsm} =~ m/y/) {
+       target_cmd_root($ho, <<"END");
+echo "seclabel='system_u:system_r:domU_t'" >> $cfg
+END
+    }
 }
 
 # If host has >8G free memory, create a guest with 4G memory to catch
-- 
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®.