From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Bug in canonicalize_path() |
Date: | 2005-08-11 03:56:52 |
Message-ID: | 200508110356.j7B3uqR14136@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
I found that in port/path.c::canonicalize_path, that if the path was
supplied as "/usr/local/bin/../.." we would return /usr/local/bin. The
problem is then when we saw a trailing ".." we stripped it off and the
previous directory, but we never checked if the previous directory was
itself "..".
Patch applied to suppress trimming of ".." if ".." is above it. I tried
coding something that would handle "../.." but is started to look too
messy and not worth the effort.
I don't see a need to backpatch this, but it could produce errors with
weird supplied paths. Comments?
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 973 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-08-11 04:23:19 | Re: [HACKERS] For review: Server instrumentation patch |
Previous Message | Qingqing Zhou | 2005-08-11 02:00:10 | Re: Fix oversight in pts_error_callback() |