ceph: add selinux support
authorYan, Zheng <zyan@redhat.com>
Sun, 26 May 2019 08:27:56 +0000 (16:27 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 8 Jul 2019 12:01:42 +0000 (14:01 +0200)
commitac6713ccb5a6d13b59a2e3fda4fb049a2c4e0af2
treeb97e61e509a3771db80edf64c3b211079faf4cc7
parent5c31e92dffb94c955fff2867a56aac68e63c286d
ceph: add selinux support

When creating new file/directory, use security_dentry_init_security() to
prepare selinux context for the new inode, then send openc/mkdir request
to MDS, together with selinux xattr.

security_dentry_init_security() only supports single security module and
only selinux has dentry_init_security hook. So only selinux is supported
for now. We can add support for other security modules once kernel has a
generic version of dentry_init_security()

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/Kconfig
fs/ceph/caps.c
fs/ceph/dir.c
fs/ceph/file.c
fs/ceph/inode.c
fs/ceph/super.h
fs/ceph/xattr.c