Re: Bug in canonicalize_path()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: William ZHANG <uniware(at)zedware(dot)org>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Bug in canonicalize_path()
Date: 2005-08-12 03:01:05
Message-ID: 21431.1123815665@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> And then you have this case:

> /usr/local/../bin/../..

AFAICS, the patch I just proposed handles this.

If I recall the code properly, we do not have to make canonicalize_path
remove embedded "." or ".." --- that is, we do not have to simplify

/usr/local/../bin

But we do have to get rid of every trailing "." or "..", else there are
failure cases when we replace the trailing component with an ordinary
file name.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-08-12 03:07:06 Re: Bug in canonicalize_path()
Previous Message Tom Lane 2005-08-12 02:49:16 Re: Bug in canonicalize_path()