summaryrefslogtreecommitdiffstats
path: root/include/linux/security.h
diff options
context:
space:
mode:
authorJohn Johansen2017-05-07 14:53:37 +0200
committerJohn Johansen2017-06-08 21:51:43 +0200
commit6623ec7c4dbe18a5a2878e2d888be70d08a91826 (patch)
treeb0276f0c66e05836c58eb57b04a545f1dfd06260 /include/linux/security.h
parentapparmor: Move path lookup to using preallocated buffers (diff)
downloadkernel-qcow2-linux-6623ec7c4dbe18a5a2878e2d888be70d08a91826.tar.gz
kernel-qcow2-linux-6623ec7c4dbe18a5a2878e2d888be70d08a91826.tar.xz
kernel-qcow2-linux-6623ec7c4dbe18a5a2878e2d888be70d08a91826.zip
securityfs: add the ability to support symlinks
Signed-off-by: John Johansen <john.johansen@canonical.com> Reviewed-by: Seth Arnold <seth.arnold@canonical.com> Acked-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'include/linux/security.h')
-rw-r--r--include/linux/security.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index af675b576645..caf8b64d8b5c 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -1651,6 +1651,10 @@ extern struct dentry *securityfs_create_file(const char *name, umode_t mode,
struct dentry *parent, void *data,
const struct file_operations *fops);
extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent);
+struct dentry *securityfs_create_symlink(const char *name,
+ struct dentry *parent,
+ const char *target,
+ const struct inode_operations *iops);
extern void securityfs_remove(struct dentry *dentry);
#else /* CONFIG_SECURITYFS */
@@ -1670,6 +1674,14 @@ static inline struct dentry *securityfs_create_file(const char *name,
return ERR_PTR(-ENODEV);
}
+static inline struct dentry *securityfs_create_symlink(const char *name,
+ struct dentry *parent,
+ const char *target,
+ const struct inode_operations *iops)
+{
+ return ERR_PTR(-ENODEV);
+}
+
static inline void securityfs_remove(struct dentry *dentry)
{}