lkml.org 
[lkml]   [1998]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Secure deletion
> > 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.
> >
>
> For one thing, it isn't atomic. If the length of the file increases after the
> stat, the extra blocks won't be cleared. This could be detected by adding another
> stat after the clearing (and a loop if necessary), but the length of the file could
> temporarily increase, and then decrease. Only the kernel can do this atomically.

unless, you use fcntl to get an exclusive lock on file, which is what
my program (which i'm finishing up right now) does.

--
Tom Vier - 0x82B007A8 | Hate Micro$hit, AOLame, and Untel?
thomassr@erols.com | Then goto the Zero Page at:
Tortured Souls Software | http://www.erols.com/thomassr/zero/


-
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

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.096 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site