pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Daniel Gustafsson <daniel@yesql.se>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pg_upgrade should truncate/remove its logs before running
Date: Wed, 19 Jan 2022 21:59:14 -0600
Message-ID: <20220120035914.GH23027@telsasoft.com> (raw)
In-Reply-To: <YejQiZVgWA1XH6cH@paquier.xyz>
References: <238201.1640184746@sss.pgh.pa.us>
	<20211222163611.GC17618@telsasoft.com>
	<20220108184857.GI14051@telsasoft.com>
	<Yd00xmV+rdffAQxf@paquier.xyz>
	<20220111200307.GA14051@telsasoft.com>
	<Yd5SOupY+FHbiXLD@paquier.xyz>
	<20220112040813.GD14051@telsasoft.com>
	<YefIHrNYTNH/PML4@paquier.xyz>
	<20220120000540.GG23027@telsasoft.com>
	<YejQiZVgWA1XH6cH@paquier.xyz>

On Thu, Jan 20, 2022 at 12:01:29PM +0900, Michael Paquier wrote:
> On Wed, Jan 19, 2022 at 06:05:40PM -0600, Justin Pryzby wrote:
> 
> > I'm not sure these restrictions are needed ?
> 
> This could lead to issues with rmtree() if we are not careful enough,
> no?  We'd had our deal of argument injections with pg_upgrade commands
> in the past (fcd15f1).

We require that the dir not exist, by testing if (mkdir()).
So it's okay if someone specifies ../whatever or $CWD.

-- 
Justin





view thread (53+ messages)  latest in thread

Message-ID: <20220120035914.GH23027@telsasoft.com>
Permalink:  ../20220120035914.GH23027@telsasoft.com/
Also on:    postgresql.org/message-id/20220120035914.GH23027@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, michael@paquier.xyz, tgl@sss.pgh.pa.us, daniel@yesql.se, peter.eisentraut@enterprisedb.com, andrew@dunslane.net, bruce@momjian.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: pg_upgrade should truncate/remove its logs before running
  In-Reply-To: <20220120035914.GH23027@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox