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. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101231021723.ga9...@khazad-dum.debian.net