Michael K. Edwards <medwards.linux@gmail.com> wrote:
This is a security risk.
----------------
other process:
unlink(secrest_file)
Thread 1:
write(fd, large)
(interrupted)
Thread 2:
fseek(fd, -n, relative)
read(fd, buf)
----------------
BTW: The best thing you can do to a program where two threads race for
writing one fd is to let it crash and burn in the most spectacular way
allowed without affecting the rest of the system, unless it happens to
be a pipe and the number of bytes written is less than PIPE_MAX.
--
The secret of the universe is #@*%! NO CARRIER
Friß, Spammer: dyIw3Rs@x.7eggert.dyndns.orgPLxmr@lv.7eggert.dyndns.orgHmiJuSaiuF@b.7eggert.dyndns.orgrKjmsxE@7eggert.dyndns.org
-