diff options
author | Mark Brown <broonie@kernel.org> | 2014-11-03 10:13:33 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-03 10:13:33 -0500 |
commit | ebc01f593b58e1896150fc2e3cbdd0116323c52c (patch) | |
tree | 23e905a3fdbee3fc8a66ef760b9ed5ef5455e9dd /security/integrity/evm/evm_main.c | |
parent | 3f7256fe5fc64132a2dd19695255c990aa2188cf (diff) | |
parent | 0df1f2487d2f0d04703f142813d53615d62a1da4 (diff) |
Merge tag 'v3.18-rc3' into asoc-sgtl5000
Linux 3.18-rc3
Diffstat (limited to 'security/integrity/evm/evm_main.c')
-rw-r--r-- | security/integrity/evm/evm_main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c index 9685af330de5..c5ee1a7c5e8a 100644 --- a/security/integrity/evm/evm_main.c +++ b/security/integrity/evm/evm_main.c | |||
@@ -319,9 +319,12 @@ int evm_inode_setxattr(struct dentry *dentry, const char *xattr_name, | |||
319 | { | 319 | { |
320 | const struct evm_ima_xattr_data *xattr_data = xattr_value; | 320 | const struct evm_ima_xattr_data *xattr_data = xattr_value; |
321 | 321 | ||
322 | if ((strcmp(xattr_name, XATTR_NAME_EVM) == 0) | 322 | if (strcmp(xattr_name, XATTR_NAME_EVM) == 0) { |
323 | && (xattr_data->type == EVM_XATTR_HMAC)) | 323 | if (!xattr_value_len) |
324 | return -EPERM; | 324 | return -EINVAL; |
325 | if (xattr_data->type != EVM_IMA_XATTR_DIGSIG) | ||
326 | return -EPERM; | ||
327 | } | ||
325 | return evm_protect_xattr(dentry, xattr_name, xattr_value, | 328 | return evm_protect_xattr(dentry, xattr_name, xattr_value, |
326 | xattr_value_len); | 329 | xattr_value_len); |
327 | } | 330 | } |