mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-06 00:13:38 -04:00
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>
This commit is contained in:
parent
8c7a703ec9
commit
8314b6732a
6 changed files with 162 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue