aboutsummaryrefslogtreecommitdiff
path: root/security/integrity/evm/evm_main.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-11-14 17:56:04 +0000
committerMark Brown <broonie@kernel.org>2014-11-14 17:56:04 +0000
commit8eb52971d4749c0192358e1942ca83d8dc7e686b (patch)
tree418db997d718e14be2d5d9436d50985a4616156d /security/integrity/evm/evm_main.c
parentd91fd220833b8a6250ff6abf86c7e66a75655ee7 (diff)
parentbe70188832b22a8f1a49d0e3a3eb2209f9cfdc8a (diff)
Merge tag 'v3.10.60' into linux-linaro-lsk
This is the 3.10.60 stable release
Diffstat (limited to 'security/integrity/evm/evm_main.c')
-rw-r--r--security/integrity/evm/evm_main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c
index b9b2bebeb350..b980a6ce5c79 100644
--- a/security/integrity/evm/evm_main.c
+++ b/security/integrity/evm/evm_main.c
@@ -286,9 +286,12 @@ int evm_inode_setxattr(struct dentry *dentry, const char *xattr_name,
{
const struct evm_ima_xattr_data *xattr_data = xattr_value;
- if ((strcmp(xattr_name, XATTR_NAME_EVM) == 0)
- && (xattr_data->type == EVM_XATTR_HMAC))
- return -EPERM;
+ if (strcmp(xattr_name, XATTR_NAME_EVM) == 0) {
+ if (!xattr_value_len)
+ return -EINVAL;
+ if (xattr_data->type != EVM_IMA_XATTR_DIGSIG)
+ return -EPERM;
+ }
return evm_protect_xattr(dentry, xattr_name, xattr_value,
xattr_value_len);
}