[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Safe File Update (atomic)

On Fri, Dec 31, 2010 at 3:17 AM, Henrique de Moraes Holschuh
<hmh@debian.org> wrote:
> On Thu, 30 Dec 2010, Henrique de Moraes Holschuh wrote:
>> BTW: safely removing a file is also tricky.  AFAIK, one must open it RW,
>> in exclusive mode. stat it by fd and check whether it is what one
>> expects (regular file, ownership).  unlink it by fd.  close the fd.
> Eh, as it was pointed to me by private mail, this is obviously a load of
> crap :p  There is no unlink by fd.  Sorry about that.
> The attacks here are races by messing with intermediate path components,
> which are either not worth bothering with, or have to be avoided in a
> much more convoluted manner.

Ah, hehe. BTW, care to respond to the mail I send to you?

Reply to: