diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/integrity/evm/evm_main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c index 9685af330de5..b392fe614738 100644 --- a/security/integrity/evm/evm_main.c +++ b/security/integrity/evm/evm_main.c | |||
@@ -162,9 +162,14 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry, | |||
162 | (const char *)xattr_data, xattr_len, | 162 | (const char *)xattr_data, xattr_len, |
163 | calc.digest, sizeof(calc.digest)); | 163 | calc.digest, sizeof(calc.digest)); |
164 | if (!rc) { | 164 | if (!rc) { |
165 | /* we probably want to replace rsa with hmac here */ | 165 | /* Replace RSA with HMAC if not mounted readonly and |
166 | evm_update_evmxattr(dentry, xattr_name, xattr_value, | 166 | * not immutable |
167 | xattr_value_len); | 167 | */ |
168 | if (!IS_RDONLY(dentry->d_inode) && | ||
169 | !IS_IMMUTABLE(dentry->d_inode)) | ||
170 | evm_update_evmxattr(dentry, xattr_name, | ||
171 | xattr_value, | ||
172 | xattr_value_len); | ||
168 | } | 173 | } |
169 | break; | 174 | break; |
170 | default: | 175 | default: |