selinux: Implement dentry_create_files_as() hook
authorVivek Goyal <vgoyal@redhat.com>
Wed, 13 Jul 2016 14:44:53 +0000 (10:44 -0400)
committerPaul Moore <paul@paul-moore.com>
Wed, 10 Aug 2016 12:25:22 +0000 (08:25 -0400)
commita518b0a5b0d7f3397e065acb956bca9635aa892d
treebba2a0bb0bc1a5569dab8371b43367f4c5c10618
parent2602625b7e46576b00db619ac788c508ba3bcb2c
selinux: Implement dentry_create_files_as() hook

Calculate what would be the label of newly created file and set that
secid in the passed creds.

Context of the task which is actually creating file is retrieved from
set of creds passed in. (old->security).

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>
security/selinux/hooks.c