diff options
author | Tyler Hicks <tyhicks@canonical.com> | 2012-06-11 15:42:32 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-26 11:34:55 -0800 |
commit | 34396c6b75ce93cf1ee38ddd492b542a6c8c63eb (patch) | |
tree | 3d8fa12cac9b04f09c19ca0a52f990729ebeadff /fs/efs | |
parent | 40ebcb89e6c84b5a5aca74d8df26705663a24598 (diff) | |
download | kernel_samsung_smdk4412-34396c6b75ce93cf1ee38ddd492b542a6c8c63eb.zip kernel_samsung_smdk4412-34396c6b75ce93cf1ee38ddd492b542a6c8c63eb.tar.gz kernel_samsung_smdk4412-34396c6b75ce93cf1ee38ddd492b542a6c8c63eb.tar.bz2 |
eCryptfs: Copy up POSIX ACL and read-only flags from lower mount
commit 069ddcda37b2cf5bb4b6031a944c0e9359213262 upstream.
When the eCryptfs mount options do not include '-o acl', but the lower
filesystem's mount options do include 'acl', the MS_POSIXACL flag is not
flipped on in the eCryptfs super block flags. This flag is what the VFS
checks in do_last() when deciding if the current umask should be applied
to a newly created inode's mode or not. When a default POSIX ACL mask is
set on a directory, the current umask is incorrectly applied to new
inodes created in the directory. This patch ignores the MS_POSIXACL flag
passed into ecryptfs_mount() and sets the flag on the eCryptfs super
block depending on the flag's presence on the lower super block.
Additionally, it is incorrect to allow a writeable eCryptfs mount on top
of a read-only lower mount. This missing check did not allow writes to
the read-only lower mount because permissions checks are still performed
on the lower filesystem's objects but it is best to simply not allow a
rw mount on top of ro mount. However, a ro eCryptfs mount on top of a rw
mount is valid and still allowed.
https://launchpad.net/bugs/1009207
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Stefan Beller <stefanbeller@googlemail.com>
Cc: John Johansen <john.johansen@canonical.com>
Cc: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/efs')
0 files changed, 0 insertions, 0 deletions