f2fs: fix to do security initialization of encrypted inode with original filename
authorChao Yu <yuchao0@huawei.com>
Sun, 28 Aug 2016 10:57:55 +0000 (18:57 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 8 Sep 2016 00:27:35 +0000 (17:27 -0700)
commit9421d57051c534c7477f98d0576b876237fbbc4c
tree4cbc21720b249f1889f8f57c5bde9b6a59635699
parent7ea984b0604ac37e806ddc34baf950230bfdaadd
f2fs: fix to do security initialization of encrypted inode with original filename

When creating new inode, security_inode_init_security will be called for
initializing security info related to the inode, and filename is passed to
security module, it helps security module such as SElinux to know which
rule or label could be applied for the inode with specified name.

Previously, if new inode is created as an encrypted one, f2fs will transfer
encrypted filename to security module which may fail the check of security
policy belong to the inode. So in order to this issue, alter to transfer
original unencrypted filename instead.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/dir.c
fs/f2fs/f2fs.h
fs/f2fs/inline.c