Skip site navigation (1) Skip section navigation (2)

Re: is_absolute_path incorrect on Windows

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: is_absolute_path incorrect on Windows
Date: 2011-02-03 18:20:26
Message-ID: 201102031820.p13IKQL08390@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > I have reviewed is_absolute_path() and have implemented
> > path_is_relative_and_below_cwd() to cleanly handle cases like 'E:abc' on
> > Win32;  patch attached.
> 
> This patch appears to remove some security-critical restrictions.
> Why did you delete the path_contains_parent_reference calls?

They are now in path_is_relative_and_below_cwd(), and I assume we can
allow ".." for an absolute path in these cases, i.e. it has to match the
data or log path we defined, and I don't see a general reason to prevent
".." in absolute paths, only relative ones.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2011-02-03 18:20:48
Subject: Re: arrays as pl/perl input arguments [PATCH]
Previous:From: Greg SmithDate: 2011-02-03 18:17:08
Subject: Re: [HACKERS] Slow count(*) again...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group