
On Sat, 24 Mar 2012 01:56:05 pm Craig Sanders wrote:
BTW, the reason why you see NUL bytes in unflushed sectors after a crash is to avoid leaking data from whatever those sectors were used for before. e.g. say those sectors used to hold the data from /etc/shadow, or a script or config file containing passwords, or some other privacy/security-sensitive data....you wouldn't want that data exposed in, say, a user-owned file after a crash.
after a crash, those sectors may contain some or all of the data you wanted/expected it to, some or all of the data from any previous use, or (most likely) some combination of both. either way, you can't trust that the data is good.
I'm not seeing NUL bytes in the file. I am seeing files with size=0. The most common case is that after rebooting, my kmailrc file has size=0 so all of my e-mail accounts, folders, mailing list configuration etc have been deleted. I've taken to keeping kmail shut down most of the time to reduce the risk of this happening. The same has happened to some other kde configuration files. After each crash I have had to do a "find /home -size 0" to find destroyed files to be restored from backup. This doesn't find all of them though since some are restored to default values after reboot. On Friday I downloaded a zip file and unpacked it. I then spent some time browsing the HTML documentation in the unpacked directory. Hours later, after the crash, many or most of the HTML files I had read had size=0. -- Anthony Shipman Mamas don't let your babies als@iinet.net.au grow up to be outsourced.