diff options
-rw-r--r-- | security/integrity/ima/ima_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index f82cf9b8e92b..f7b85bf0eaf3 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c | |||
@@ -206,10 +206,8 @@ static int process_measurement(struct file *file, const char *filename, | |||
206 | } | 206 | } |
207 | 207 | ||
208 | template_desc = ima_template_desc_current(); | 208 | template_desc = ima_template_desc_current(); |
209 | if (strcmp(template_desc->name, IMA_TEMPLATE_IMA_NAME) == 0) { | 209 | if ((action & IMA_APPRAISE_SUBMASK) || |
210 | if (action & IMA_APPRAISE_SUBMASK) | 210 | strcmp(template_desc->name, IMA_TEMPLATE_IMA_NAME) != 0) |
211 | xattr_ptr = &xattr_value; | ||
212 | } else | ||
213 | xattr_ptr = &xattr_value; | 211 | xattr_ptr = &xattr_value; |
214 | 212 | ||
215 | rc = ima_collect_measurement(iint, file, xattr_ptr, &xattr_len); | 213 | rc = ima_collect_measurement(iint, file, xattr_ptr, &xattr_len); |