]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selinux: Implementation for inode_copy_up() hook
authorVivek Goyal <vgoyal@redhat.com>
Wed, 13 Jul 2016 14:44:48 +0000 (10:44 -0400)
committerAnand Jain <anand.jain@oracle.com>
Thu, 26 Oct 2017 08:15:29 +0000 (16:15 +0800)
commit12576c41441b5aa69eb9a1b432f865e3a9c517d1
tree1b0434417affc74e1a25aa73dbe227a618971620
parentdd6ed20027b8e3c33bbc8206aea456f68c7fd58c
selinux: Implementation for inode_copy_up() hook

A file is being copied up for overlay file system. Prepare a new set of
creds and set create_sid appropriately so that new file is created with
appropriate label.

Overlay inode has right label for both context and non-context mount
cases. In case of non-context mount, overlay inode will have the label
of lower file and in case of context mount, overlay inode will have
the label from context= mount option.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Orabug: 25684456

(backport upstream commit 56909eb3f559103196ecbf2c08c923e0804980fb)

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Acked-by: James Morris <james.l.morris@oracle.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
security/selinux/hooks.c