diff options
author | Roberto Sassu <roberto.sassu@huawei.com> | 2021-06-01 10:23:38 +0200 |
---|---|---|
committer | Mimi Zohar <zohar@linux.ibm.com> | 2021-06-03 00:56:13 +0200 |
commit | 8314b6732ae4e600bb933e108f96ce0176acb09c (patch) | |
tree | 9fd2990b529a468a574454461ee8a92f763e23ff /include | |
parent | evm: Verify portable signatures against all protected xattrs (diff) | |
download | linux-8314b6732ae4e600bb933e108f96ce0176acb09c.tar.xz linux-8314b6732ae4e600bb933e108f96ce0176acb09c.zip |
ima: Define new template fields xattrnames, xattrlengths and xattrvalues
This patch defines the new template fields xattrnames, xattrlengths and
xattrvalues, which contain respectively a list of xattr names (strings,
separated by |), lengths (u32, hex) and values (hex). If an xattr is not
present, the name and length are not displayed in the measurement list.
Reported-by: kernel test robot <lkp@intel.com> (Missing prototype def)
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/evm.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/evm.h b/include/linux/evm.h index 5011a299c251..4c374be70247 100644 --- a/include/linux/evm.h +++ b/include/linux/evm.h @@ -39,6 +39,9 @@ extern int evm_inode_init_security(struct inode *inode, struct xattr *evm); extern bool evm_revalidate_status(const char *xattr_name); extern int evm_protected_xattr_if_enabled(const char *req_xattr_name); +extern int evm_read_protected_xattrs(struct dentry *dentry, u8 *buffer, + int buffer_size, char type, + bool canonical_fmt); #ifdef CONFIG_FS_POSIX_ACL extern int posix_xattr_acl(const char *xattrname); #else @@ -120,5 +123,12 @@ static inline int evm_protected_xattr_if_enabled(const char *req_xattr_name) return false; } +static inline int evm_read_protected_xattrs(struct dentry *dentry, u8 *buffer, + int buffer_size, char type, + bool canonical_fmt) +{ + return -EOPNOTSUPP; +} + #endif /* CONFIG_EVM */ #endif /* LINUX_EVM_H */ |