aboutsummaryrefslogtreecommitdiffstats
path: root/security/integrity/ima/ima_queue_keys.c
diff options
context:
space:
mode:
authorRoberto Sassu <roberto.sassu@huawei.com>2021-07-23 10:53:04 +0200
committerMimi Zohar <zohar@linux.ibm.com>2021-07-23 09:27:02 -0400
commitca3c9bdb101d9b9eb3ed8a85cc0fe55915ba49de (patch)
tree46966a8fd69ed70c7223b0c044f5244fddaef4ce /security/integrity/ima/ima_queue_keys.c
parentima: Return int in the functions to measure a buffer (diff)
downloadlinux-dev-ca3c9bdb101d9b9eb3ed8a85cc0fe55915ba49de.tar.xz
linux-dev-ca3c9bdb101d9b9eb3ed8a85cc0fe55915ba49de.zip
ima: Add digest and digest_len params to the functions to measure a buffer
This patch performs the final modification necessary to pass the buffer measurement to callers, so that they provide a functionality similar to ima_file_hash(). It adds the 'digest' and 'digest_len' parameters to ima_measure_critical_data() and process_buffer_measurement(). These functions calculate the digest even if there is no suitable rule in the IMA policy and, in this case, they simply return 1 before generating a new measurement entry. Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Reviewed-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to '')
-rw-r--r--security/integrity/ima/ima_queue_keys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/ima/ima_queue_keys.c b/security/integrity/ima/ima_queue_keys.c
index 979ef6c71f3d..93056c03bf5a 100644
--- a/security/integrity/ima/ima_queue_keys.c
+++ b/security/integrity/ima/ima_queue_keys.c
@@ -165,7 +165,7 @@ void ima_process_queued_keys(void)
entry->keyring_name,
KEY_CHECK, 0,
entry->keyring_name,
- false);
+ false, NULL, 0);
list_del(&entry->list);
ima_free_key_entry(entry);
}