Re: [PATCH] readlink missing nul-termination in pg_rewind

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Subject: Re: [PATCH] readlink missing nul-termination in pg_rewind
Date: 2015-05-29 01:04:05
Message-ID: CAB7nPqQiTjooZS=6ypLubae3JNcOc1b-HfxtcSoM5E_kb94zCA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 29, 2015 at 1:46 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com> writes:
>> P.S. Also in passing, I note that pg_rewind will follow links under any
>> directory anywhere named pg_tblspc (which probably doesn't matter), and
>> does not follow pg_xlog if it's a symlink (which probably does). If you
>> want, I can submit a trivial patch for the latter.
>
> As far as that goes, I think it does look at the whole parentpath, which
> means it would not be fooled by sub-subdirectories named pg_tblspc.
> A bigger problem is that whoever coded this forgot that parentpath could
> be null, which I blame on the lack of an API specification for the
> function.

Oh, thanks for pushing a fix for that. It was missed during the review...
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Flower 2015-05-29 01:22:27 Re: pg_upgrade resets timeline to 1
Previous Message Noah Misch 2015-05-29 00:59:11 Re: pg_upgrade resets timeline to 1