summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/ubifs.h
diff options
context:
space:
mode:
authorHyunchul Lee <cheol.lee@lge.com>2017-03-03 16:44:03 +0900
committerRichard Weinberger <richard@nod.at>2017-05-08 20:48:23 +0200
commit8326c1eec2449f0e868f7b19a5fa7bfa0386ab48 (patch)
tree6e960532202962d3b1cda2ce0a8e6a0737518eb5 /fs/ubifs/ubifs.h
parent997d30cb7490eb1ac37a3fb02a222fabf1f25fa9 (diff)
downloadlinux-8326c1eec2449f0e868f7b19a5fa7bfa0386ab48.tar.bz2
ubifs: Add CONFIG_UBIFS_FS_SECURITY to disable/enable security labels
When write syscall is called, every time security label is searched to determine that file's privileges should be changed. If LSM(Linux Security Model) is not used, this is useless. So introduce CONFIG_UBIFS_SECURITY to disable security labels. it's default value is "y". Signed-off-by: Hyunchul Lee <cheol.lee@lge.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/ubifs.h')
-rw-r--r--fs/ubifs/ubifs.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 4d57e488038e..abdd11634ba4 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -1756,13 +1756,23 @@ int ubifs_check_dir_empty(struct inode *dir);
/* xattr.c */
extern const struct xattr_handler *ubifs_xattr_handlers[];
ssize_t ubifs_listxattr(struct dentry *dentry, char *buffer, size_t size);
-int ubifs_init_security(struct inode *dentry, struct inode *inode,
- const struct qstr *qstr);
int ubifs_xattr_set(struct inode *host, const char *name, const void *value,
size_t size, int flags);
ssize_t ubifs_xattr_get(struct inode *host, const char *name, void *buf,
size_t size);
+#ifdef CONFIG_UBIFS_FS_SECURITY
+extern int ubifs_init_security(struct inode *dentry, struct inode *inode,
+ const struct qstr *qstr);
+#else
+static inline int ubifs_init_security(struct inode *dentry,
+ struct inode *inode, const struct qstr *qstr)
+{
+ return 0;
+}
+#endif
+
+
/* super.c */
struct inode *ubifs_iget(struct super_block *sb, unsigned long inum);