eCryptfs: Fix data corruption when using ecryptfs_passthrough
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>
Mon, 13 Apr 2009 20:29:27 +0000 (15:29 -0500)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Wed, 22 Apr 2009 08:54:13 +0000 (03:54 -0500)
ecryptfs_passthrough is a mount option that allows eCryptfs to allow
data to be written to non-eCryptfs files in the lower filesystem.  The
passthrough option was causing data corruption due to it not always
being treated as a non-eCryptfs file.

The first 8 bytes of an eCryptfs file contains the decrypted file size.
This value was being written to the non-eCryptfs files, too.  Also,
extra 0x00 characters were being written to make the file size a
multiple of PAGE_CACHE_SIZE.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>

No differences found