[patch] rm can have undesired side-effects

Jan Grant jan.grant at bristol.ac.uk
Thu Nov 2 10:52:37 UTC 2006


On Tue, 31 Oct 2006, Daniel Valencia wrote:

> if the file is not writable, return with error.
> if the file has multiple links, and option -f was not specified, 
> return with error.
> overwrite the file.
> optionally, unlink the file.
> 
> Additionally, -P should either be rm'ed from rm, or added as a
> backwards compatibility hack that calls "shred" and returns with error 
> every time the latter does.
> 
> These are my 1.99 cents.

You might as well just truncate the file before removing it.

--- Bakul Shah <bakul at bitblocks.com> wrote:

> If you are that concious about scrubbing why not add
> scrubbing as a mount option (suggested option: -o paranoid)
> then at least it will be handled consistently.

This is, I reckon, the only sensible suggestion thus far: if the FS 
doesn't help you then you are implicitly depending on the FS 
implementation to ensure you are writing over the original data blocks 
anyway.


-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
You see what happens when you have fun with a stranger in the Alps?


More information about the freebsd-hackers mailing list