From: Ian Jackson Subject: Re: [OSSTEST PATCH 06/11] cri-getconfig: Provide get_psql_cmd and get_pgdump_cmd Date: Mon, 7 Dec 2015 14:59:52 +0000 Message-ID: <22117.40680.21255.43409@mariner.uk.xensource.com> References: <1449257734-26860-1-git-send-email-ian.jackson@eu.citrix.com> <1449257734-26860-7-git-send-email-ian.jackson@eu.citrix.com> <1449482266.29724.30.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a5xHJ-00036d-EU for xen-devel@lists.xenproject.org; Mon, 07 Dec 2015 15:00:37 +0000 In-Reply-To: <1449482266.29724.30.camel@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: Ian Campbell Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [OSSTEST PATCH 06/11] cri-getconfig: Provide get_= psql_cmd and get_pgdump_cmd"): > On Fri, 2015-12-04 at 19:35 +0000, Ian Jackson wrote: > > +get_psql_cmd () { > > + perl -we ' > > + use Osstest; > > + use Osstest::Executive; > > + use DBI; > > + csreadconfig(); > > + print "psql", > > + =A0=A0=A0=A0=A0" -d ", $dbh_tests->{pg_db}, > > + =A0=A0=A0=A0=A0" -h ", $dbh_tests->{pg_host}, > > + =A0=A0=A0=A0=A0" -p ", $dbh_tests->{pg_port}, > > + =A0=A0=A0=A0=A0" -U ", $dbh_tests->{pg_user}, > = > I suppose none of those can (or at least should) contain any weird quote- > requiring chars etc? Host and ports definitely can't. I think if someone makes database names and usernames with shell metacharacters in they deserve the resulting pile of debris. > > =A0# Good grief, handling background proceesses from shell is a pain. > = > I just spotted a typo here "proceesses". I'll fix that. Ian.