| From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
|---|---|
| To: | Greg Stark <stark(at)mit(dot)edu> |
| Cc: | MauMau <maumau307(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [patch] pg_copy - a command for reliable WAL archiving |
| Date: | 2014-08-20 14:18:28 |
| Message-ID: | 20140820141828.GD7648@eldon.alvh.no-ip.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Greg Stark wrote:
> On Wed, Aug 20, 2014 at 2:27 PM, Alvaro Herrera
> <alvherre(at)2ndquadrant(dot)com> wrote:
> > Hmm, the real trick here is linkat(... "/proc/self/foobar"), not the
> > O_TMPFILE: you can have an open file descriptor to an "invisible" file
> > simply by creating a normal file and unlinking it. I looked at linkat()
> > yesterday but the idea of using /proc/self didn't occur to me. Nasty
> > trick :-( It seems linkat() is quite a bit more portable than
> > O_TMPFILE, fortunately ...
>
> Supposedly linkat(2) on Linux refuses to create a link to a file that
> was opened normally and had its last link removed with unlink(2) due
> to concerns that this would create security holes.
Sigh.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2014-08-20 14:19:00 | Re: pg_basebackup vs. Windows and tablespaces |
| Previous Message | Andres Freund | 2014-08-20 14:14:09 | Re: [patch] pg_copy - a command for reliable WAL archiving |