Re: PATCH - ext2fs privacy (i.e. secure deletion) patch

From: Pavel Machek
Date: Tue Feb 03 2004 - 19:24:18 EST


Hi!

> }
>
> +static inline void destroy_block(struct inode *inode, unsigned long block)
> +{
> +#ifdef CONFIG_EXT2_FS_PRIVACY
> + struct buffer_head * bh;
> +
> + bh = sb_getblk(inode->i_sb, block);
> +
> + memset(bh->b_data, 0x00, bh->b_size);
> +
> + mark_buffer_dirty(bh);
> + wait_on_buffer(bh);
> + brelse(bh);
> +
> + return;
> +#endif
> +}
> +

Perhaps this should still be controlled by (chattr(1)) [its already
documented, just not yet implemented].

When a file with the `s' attribute set is deleted, its blocks
are zeroed and written back to the disk.

...at which point config option is not really neccessary.

Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/