pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: wangsh.fnst@fujitsu.com <wangsh.fnst@fujitsu.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: andrew@dunslane.net <andrew@dunslane.net>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Subject: Re: drop tablespace failed when location contains .. on win32
Date: Mon, 31 Jan 2022 17:15:33 +0900
Message-ID: <YfeapcO2WECIhMQo@paquier.xyz> (raw)
In-Reply-To: <462031.1643579403@sss.pgh.pa.us>
References: <20210913.173629.689388354506122738.horikyota.ntt@gmail.com>
	<OS3PR01MB71599B537F68956616FCC4BAF2A69@OS3PR01MB7159.jpnprd01.prod.outlook.com>
	<1479474.1636584211@sss.pgh.pa.us>
	<YZdXYhqtGD0CxIz9@paquier.xyz>
	<20220117004038.fcywmknzj45kiulz@jrouhaud>
	<OS3PR01MB715911F089165E86CBB9D9DAF2589@OS3PR01MB7159.jpnprd01.prod.outlook.com>
	<YeYVpEk/+f5qpS7W@paquier.xyz>
	<OS3PR01MB7159F21067BE3DCC321340B0F25E9@OS3PR01MB7159.jpnprd01.prod.outlook.com>
	<Ye6Rkd1kLvhkTJa1@paquier.xyz>
	<462031.1643579403@sss.pgh.pa.us>

On Sun, Jan 30, 2022 at 04:50:03PM -0500, Tom Lane wrote:
> Here's a revised patch version that does it like that.  I also
> reviewed and simplified the canonicalize_path logic.  I think
> this is committable.

Thanks for the updated version.  The range of the tests looks fine
enough, and the CF bot does not complain.  The code is
straight-forward and pretty clear in terms of the handling of ".",
".." and the N-depth handling necessary.

Should we have tests for WIN32 (aka for driver letters and "//")?
This could be split into its own separate test file to limit the
damage with the alternate outputs, and the original complain was from
there.

> (I suspect that adminpack's checks for unsafe file names could
> now be simplified substantially, because many of the corner cases
> it worries about are no longer possible, as evidenced by the change
> in error message there.  I've not pursued that, however.)

Fine by me to let this part for later.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (23+ messages)  latest in thread

Message-ID: <YfeapcO2WECIhMQo@paquier.xyz>
Permalink:  ../YfeapcO2WECIhMQo@paquier.xyz/
Also on:    postgresql.org/message-id/YfeapcO2WECIhMQo@paquier.xyz

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, wangsh.fnst@fujitsu.com, rjuju123@gmail.com, horikyota.ntt@gmail.com, andrew@dunslane.net
  Subject: Re: drop tablespace failed when location contains .. on win32
  In-Reply-To: <YfeapcO2WECIhMQo@paquier.xyz>
  References: <20210913.173629.689388354506122738.horikyota.ntt@gmail.com> <OS3PR01MB71599B537F68956616FCC4BAF2A69@OS3PR01MB7159.jpnprd01.prod.outlook.com> <1479474.1636584211@sss.pgh.pa.us> <YZdXYhqtGD0CxIz9@paquier.xyz> <20220117004038.fcywmknzj45kiulz@jrouhaud> <OS3PR01MB715911F089165E86CBB9D9DAF2589@OS3PR01MB7159.jpnprd01.prod.outlook.com> <YeYVpEk/+f5qpS7W@paquier.xyz> <OS3PR01MB7159F21067BE3DCC321340B0F25E9@OS3PR01MB7159.jpnprd01.prod.outlook.com> <Ye6Rkd1kLvhkTJa1@paquier.xyz> <462031.1643579403@sss.pgh.pa.us> <YfeapcO2WECIhMQo@paquier.xyz>

* 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