mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
975d294373
commit
cb72318069
4 changed files with 72 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue