summaryrefslogtreecommitdiffstats
path: root/include/linux/evm.h
diff options
context:
space:
mode:
authorMimi Zohar <zohar@linux.vnet.ibm.com>2011-03-09 14:40:44 -0500
committerMimi Zohar <zohar@linux.vnet.ibm.com>2011-07-18 12:29:45 -0400
commitcb72318069d5e92eb74840118732c66eb38c812f (patch)
treeeb4e9a6c923567e01ddd1340f9430eb3c43f4aeb /include/linux/evm.h
parent975d294373d8c1c913ad2bf4eb93966d4c7ca38f (diff)
evm: add evm_inode_init_security to initialize new files
Initialize 'security.evm' for new files. Changelog v7: - renamed evm_inode_post_init_security to evm_inode_init_security - moved struct xattr definition to earlier patch - allocate xattr name Changelog v6: - Use 'struct evm_ima_xattr_data' Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Diffstat (limited to 'include/linux/evm.h')
-rw-r--r--include/linux/evm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/evm.h b/include/linux/evm.h
index 33a92471e46..7c10761916a 100644
--- a/include/linux/evm.h
+++ b/include/linux/evm.h
@@ -9,6 +9,7 @@
#define _LINUX_EVM_H
#include <linux/integrity.h>
+#include <linux/xattr.h>
#ifdef CONFIG_EVM
extern enum integrity_status evm_verifyxattr(struct dentry *dentry,
@@ -25,6 +26,9 @@ extern void evm_inode_post_setxattr(struct dentry *dentry,
extern int evm_inode_removexattr(struct dentry *dentry, const char *xattr_name);
extern void evm_inode_post_removexattr(struct dentry *dentry,
const char *xattr_name);
+extern int evm_inode_init_security(struct inode *inode,
+ const struct xattr *xattr_array,
+ struct xattr *evm);
#else
#ifdef CONFIG_INTEGRITY
static inline enum integrity_status evm_verifyxattr(struct dentry *dentry,
@@ -67,5 +71,12 @@ static inline void evm_inode_post_removexattr(struct dentry *dentry,
return;
}
+static inline int evm_inode_init_security(struct inode *inode,
+ const struct xattr *xattr_array,
+ struct xattr *evm)
+{
+ return -EOPNOTSUPP;
+}
+
#endif /* CONFIG_EVM_H */
#endif /* LINUX_EVM_H */