]> git.baikalelectronics.ru Git - kernel.git/commit
eCryptfs: Regression in unencrypted filename symlinks
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>
Sat, 7 Feb 2009 00:06:51 +0000 (18:06 -0600)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 7 Feb 2009 02:36:40 +0000 (18:36 -0800)
commit4fe07ba29bb64776a6fa083946bdb18f03b8ac08
treeff8fc9b1c964debf18ba662558b26bf7bb7513cc
parenta3d7022aca28bb5c8979131376dcd6c16787a52b
eCryptfs: Regression in unencrypted filename symlinks

The addition of filename encryption caused a regression in unencrypted
filename symlink support.  ecryptfs_copy_filename() is used when dealing
with unencrypted filenames and it reported that the new, copied filename
was a character longer than it should have been.

This caused the return value of readlink() to count the NULL byte of the
symlink target.  Most applications don't care about the extra NULL byte,
but a version control system (bzr) helped in discovering the bug.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ecryptfs/crypto.c