ceph: set sec_context xattr on symlink creation
commit8953e8cb0d6a53f3d8877d1dd79b8db706651698
authorJeff Layton <jlayton@kernel.org>
Tue, 28 Jul 2020 14:34:20 +0000 (28 10:34 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:05:28 +0000 (21 13:05 +0200)
tree048df01565dffd0d68d92bdb300fd19cfd21baa9
parent12badd3824535c7266d3f31a7b6cc4fd7e913df4
ceph: set sec_context xattr on symlink creation

commit b748fc7a8763a5b3f8149f12c45711cd73ef8176 upstream.

Symlink inodes should have the security context set in their xattrs on
creation. We already set the context on creation, but we don't attach
the pagelist. The effect is that symlink inodes don't get an SELinux
context set on them at creation, so they end up unlabeled instead of
inheriting the proper context. Make it do so.

Cc: stable@vger.kernel.org
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/dir.c