From: Ian Campbell Subject: Re: [OSSTEST PATCH RFC v1 11/12] ts-debian-install: add in seclabel if XSM is enabled Date: Wed, 24 Sep 2014 12:01:35 +0100 Message-ID: <1411556495.26204.5.camel@kazak.uk.xensource.com> References: <1411395121-6528-1-git-send-email-wei.liu2@citrix.com> <1411395121-6528-12-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: <1411395121-6528-12-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: Wei Liu Cc: dgdegra@tycho.nsa.gov, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, 2014-09-22 at 15:12 +0100, Wei Liu wrote: > ... otherwise the guest cannot be created. is this setting harmful if xsm isn't on? > > 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"); > } >