diff options
Diffstat (limited to 'security/integrity/evm')
| -rw-r--r-- | security/integrity/evm/evm_main.c | 4 | ||||
| -rw-r--r-- | security/integrity/evm/evm_posix_acl.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c index af9b6852f4e1..336b3ddfe63f 100644 --- a/security/integrity/evm/evm_main.c +++ b/security/integrity/evm/evm_main.c | |||
| @@ -123,7 +123,7 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry, | |||
| 123 | goto out; | 123 | goto out; |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | xattr_len = rc - 1; | 126 | xattr_len = rc; |
| 127 | 127 | ||
| 128 | /* check value type */ | 128 | /* check value type */ |
| 129 | switch (xattr_data->type) { | 129 | switch (xattr_data->type) { |
| @@ -143,7 +143,7 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry, | |||
| 143 | if (rc) | 143 | if (rc) |
| 144 | break; | 144 | break; |
| 145 | rc = integrity_digsig_verify(INTEGRITY_KEYRING_EVM, | 145 | rc = integrity_digsig_verify(INTEGRITY_KEYRING_EVM, |
| 146 | xattr_data->digest, xattr_len, | 146 | (const char *)xattr_data, xattr_len, |
| 147 | calc.digest, sizeof(calc.digest)); | 147 | calc.digest, sizeof(calc.digest)); |
| 148 | if (!rc) { | 148 | if (!rc) { |
| 149 | /* we probably want to replace rsa with hmac here */ | 149 | /* we probably want to replace rsa with hmac here */ |
diff --git a/security/integrity/evm/evm_posix_acl.c b/security/integrity/evm/evm_posix_acl.c index b1753e98bf9a..46408b9e62e8 100644 --- a/security/integrity/evm/evm_posix_acl.c +++ b/security/integrity/evm/evm_posix_acl.c | |||
| @@ -11,8 +11,9 @@ | |||
| 11 | 11 | ||
| 12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
| 13 | #include <linux/xattr.h> | 13 | #include <linux/xattr.h> |
| 14 | #include <linux/evm.h> | ||
| 14 | 15 | ||
| 15 | int posix_xattr_acl(char *xattr) | 16 | int posix_xattr_acl(const char *xattr) |
| 16 | { | 17 | { |
| 17 | int xattr_len = strlen(xattr); | 18 | int xattr_len = strlen(xattr); |
| 18 | 19 | ||
