summaryrefslogtreecommitdiffstats
path: root/security/apparmor/include/file.h
diff options
context:
space:
mode:
authorJohn Johansen2017-06-09 20:58:42 +0200
committerJohn Johansen2017-06-11 02:11:37 +0200
commit192ca6b55a866e838aee98d9cb6a0b5086467c03 (patch)
treeeba93d671a1476432f357fa68e6842f548e2cb2f /security/apparmor/include/file.h
parentapparmor: cleanup rename XXX_file_context() to XXX_file_ctx() (diff)
downloadkernel-qcow2-linux-192ca6b55a866e838aee98d9cb6a0b5086467c03.tar.gz
kernel-qcow2-linux-192ca6b55a866e838aee98d9cb6a0b5086467c03.tar.xz
kernel-qcow2-linux-192ca6b55a866e838aee98d9cb6a0b5086467c03.zip
apparmor: revalidate files during exec
Instead of running file revalidation lazily when read/write are called copy selinux and revalidate the file table on exec. This avoids extra mediation overhead in read/write and also prevents file handles being passed through to a grand child unchecked. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include/file.h')
-rw-r--r--security/apparmor/include/file.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/apparmor/include/file.h b/security/apparmor/include/file.h
index 19c483850770..df76c208473a 100644
--- a/security/apparmor/include/file.h
+++ b/security/apparmor/include/file.h
@@ -186,6 +186,8 @@ int aa_path_link(struct aa_profile *profile, struct dentry *old_dentry,
int aa_file_perm(const char *op, struct aa_profile *profile, struct file *file,
u32 request);
+void aa_inherit_files(const struct cred *cred, struct files_struct *files);
+
static inline void aa_free_file_rules(struct aa_file_rules *rules)
{
aa_put_dfa(rules->dfa);