summaryrefslogtreecommitdiffstats
path: root/include/linux/evm.h
diff options
context:
space:
mode:
authorMimi Zohar <zohar@linux.vnet.ibm.com>2011-05-13 12:53:38 -0400
committerMimi Zohar <zohar@linux.vnet.ibm.com>2011-07-18 12:29:50 -0400
commit817b54aa45db03437c6d09a7693fc6926eb8e822 (patch)
tree03d43f3abfbd8670e3a30a33ef868ec7705ef2c4 /include/linux/evm.h
parent7102ebcd65c1cdb5d5a87c7c5cf7a46f5afb0cac (diff)
downloadblackbird-op-linux-817b54aa45db03437c6d09a7693fc6926eb8e822.tar.gz
blackbird-op-linux-817b54aa45db03437c6d09a7693fc6926eb8e822.zip
evm: add evm_inode_setattr to prevent updating an invalid security.evm
Permit changing of security.evm only when valid, unless in fixmode. Reported-by: Roberto Sassu <roberto.sassu@polito.it> Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Diffstat (limited to 'include/linux/evm.h')
-rw-r--r--include/linux/evm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/evm.h b/include/linux/evm.h
index 6d4e89b020c5..db5556dcdd27 100644
--- a/include/linux/evm.h
+++ b/include/linux/evm.h
@@ -19,6 +19,7 @@ extern enum integrity_status evm_verifyxattr(struct dentry *dentry,
void *xattr_value,
size_t xattr_value_len,
struct integrity_iint_cache *iint);
+extern int evm_inode_setattr(struct dentry *dentry, struct iattr *attr);
extern void evm_inode_post_setattr(struct dentry *dentry, int ia_valid);
extern int evm_inode_setxattr(struct dentry *dentry, const char *name,
const void *value, size_t size);
@@ -44,6 +45,11 @@ static inline enum integrity_status evm_verifyxattr(struct dentry *dentry,
}
#endif
+static int evm_inode_setattr(struct dentry *dentry, struct iattr *attr)
+{
+ return 0;
+}
+
static inline void evm_inode_post_setattr(struct dentry *dentry, int ia_valid)
{
return;
OpenPOWER on IntegriCloud