Re: Bug in canonicalize_path() - Mailing list pgsql-patches

From Tom Lane
Subject Re: Bug in canonicalize_path()
Date
Msg-id 21431.1123815665@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug in canonicalize_path()  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Bug in canonicalize_path()
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.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

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug in canonicalize_path()
Next
From: Bruce Momjian
Date:
Subject: Re: Bug in canonicalize_path()