summaryrefslogtreecommitdiff
path: root/include/linux/anon_inodes.h
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2021-02-02 03:22:44 +0300
committerPaul Moore <paul@paul-moore.com>2021-09-20 05:35:37 +0300
commit3a862cacf8670729b1ad8fc28e4f7e078f9c570c (patch)
tree9877beae385b4417b53face057d66d8b65ebfed1 /include/linux/anon_inodes.h
parent67daf270cebcf7aab4b3292b36f9adf357b23ddc (diff)
downloadlinux-3a862cacf8670729b1ad8fc28e4f7e078f9c570c.tar.xz
fs: add anon_inode_getfile_secure() similar to anon_inode_getfd_secure()
Extending the secure anonymous inode support to other subsystems requires that we have a secure anon_inode_getfile() variant in addition to the existing secure anon_inode_getfd() variant. Thankfully we can reuse the existing __anon_inode_getfile() function and just wrap it with the proper arguments. Acked-by: Mickaël Salaün <mic@linux.microsoft.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'include/linux/anon_inodes.h')
-rw-r--r--include/linux/anon_inodes.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/anon_inodes.h b/include/linux/anon_inodes.h
index 71881a2b6f78..5deaddbd7927 100644
--- a/include/linux/anon_inodes.h
+++ b/include/linux/anon_inodes.h
@@ -15,6 +15,10 @@ struct inode;
struct file *anon_inode_getfile(const char *name,
const struct file_operations *fops,
void *priv, int flags);
+struct file *anon_inode_getfile_secure(const char *name,
+ const struct file_operations *fops,
+ void *priv, int flags,
+ const struct inode *context_inode);
int anon_inode_getfd(const char *name, const struct file_operations *fops,
void *priv, int flags);
int anon_inode_getfd_secure(const char *name,