Re: Secure deletion

Todd Larason (jtl@molehill.org)
Thu, 23 Jul 1998 10:32:15 -0700


On 980723, Richard B. Johnson wrote:
> Suppose you modified the 'C' runtime library so it could be recompiled with
> a switch that changes anything that 'removes' files to:
>
> stat the file (to get length);
> write the file with junk.
> close the file.
> sync the file-system.
> unlink the file.
> sync the file-system.

fd = open("file", O_RDONLY);
unlink("file");
while (line = get_line(fd))
handle_line(line);

is valid in Unix.

I don't think this can be solved in user space. Not as part of a wrapper
around unlink(), at least. It needs a hook into the file actually being
deallocated.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html