diff options
author | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2011-03-09 14:40:44 -0500 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2011-07-18 12:29:45 -0400 |
commit | cb72318069d5e92eb74840118732c66eb38c812f (patch) | |
tree | eb4e9a6c923567e01ddd1340f9430eb3c43f4aeb /include/linux/evm.h | |
parent | 975d294373d8c1c913ad2bf4eb93966d4c7ca38f (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.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/evm.h b/include/linux/evm.h index 33a92471e463..7c10761916a2 100644 --- a/include/linux/evm.h +++ b/include/linux/evm.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #define _LINUX_EVM_H | 9 | #define _LINUX_EVM_H |
10 | 10 | ||
11 | #include <linux/integrity.h> | 11 | #include <linux/integrity.h> |
12 | #include <linux/xattr.h> | ||
12 | 13 | ||
13 | #ifdef CONFIG_EVM | 14 | #ifdef CONFIG_EVM |
14 | extern enum integrity_status evm_verifyxattr(struct dentry *dentry, | 15 | extern enum integrity_status evm_verifyxattr(struct dentry *dentry, |
@@ -25,6 +26,9 @@ extern void evm_inode_post_setxattr(struct dentry *dentry, | |||
25 | extern int evm_inode_removexattr(struct dentry *dentry, const char *xattr_name); | 26 | extern int evm_inode_removexattr(struct dentry *dentry, const char *xattr_name); |
26 | extern void evm_inode_post_removexattr(struct dentry *dentry, | 27 | extern void evm_inode_post_removexattr(struct dentry *dentry, |
27 | const char *xattr_name); | 28 | const char *xattr_name); |
29 | extern int evm_inode_init_security(struct inode *inode, | ||
30 | const struct xattr *xattr_array, | ||
31 | struct xattr *evm); | ||
28 | #else | 32 | #else |
29 | #ifdef CONFIG_INTEGRITY | 33 | #ifdef CONFIG_INTEGRITY |
30 | static inline enum integrity_status evm_verifyxattr(struct dentry *dentry, | 34 | static inline enum integrity_status evm_verifyxattr(struct dentry *dentry, |
@@ -67,5 +71,12 @@ static inline void evm_inode_post_removexattr(struct dentry *dentry, | |||
67 | return; | 71 | return; |
68 | } | 72 | } |
69 | 73 | ||
74 | static inline int evm_inode_init_security(struct inode *inode, | ||
75 | const struct xattr *xattr_array, | ||
76 | struct xattr *evm) | ||
77 | { | ||
78 | return -EOPNOTSUPP; | ||
79 | } | ||
80 | |||
70 | #endif /* CONFIG_EVM_H */ | 81 | #endif /* CONFIG_EVM_H */ |
71 | #endif /* LINUX_EVM_H */ | 82 | #endif /* LINUX_EVM_H */ |