]> git.karo-electronics.de Git - karo-tx-linux.git/commit
eCryptfs: Decrypt symlink target for stat size
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>
Mon, 22 Mar 2010 05:41:35 +0000 (00:41 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:48:01 +0000 (07:48 -0700)
commit8371038fa54c8051c6624560f3777e629b9eef68
tree4519fc9e9c34b1d16a4db4e6dfd4c885cd33b211
parent0766ff5226c060424f7d5d6f9e5904b22879b389
eCryptfs: Decrypt symlink target for stat size

commit 3a60a1686f0d51c99bd0df8ac93050fb6dfce647 upstream.

Create a getattr handler for eCryptfs symlinks that is capable of
reading the lower target and decrypting its path.  Prior to this patch,
a stat's st_size field would represent the strlen of the encrypted path,
while readlink() would return the strlen of the decrypted path.  This
could lead to confusion in some userspace applications, since the two
values should be equal.

https://bugs.launchpad.net/bugs/524919

Reported-by: Loïc Minier <loic.minier@canonical.com>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ecryptfs/inode.c