From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: [OSSTEST PATCH v2 11/12] ts-debian-install: add in seclabel if XSM is enabled Date: Wed, 24 Sep 2014 22:04:36 +0100 Message-ID: <1411592677-2632-12-git-send-email-wei.liu2@citrix.com> References: <1411592677-2632-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1411592677-2632-1-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Wei Liu , dgdegra@tycho.nsa.gov, ian.jackson@eu.citrix.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org ... otherwise the guest cannot be created. Also changed cfg_xend to cfg while I was there. Signed-off-by: Wei Liu --- 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