Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_template_lib.c Create Date:2022-07-28 19:59:14
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:This function writes the digest of the file which is expected to match the* digest contained in the file's appended signature.

Proto:int ima_eventdigest_modsig_init(struct ima_event_data *event_data, struct ima_field_data *field_data)

Type:int

Parameter:

TypeParameterName
struct ima_event_data *event_data
struct ima_field_data *field_data
343  If Not modsig Then Return 0
346  If violation Then
348  hash_algo = HASH_ALGO_SHA1
349  cur_digest = NULL
350  cur_digestsize = 0
351  Else
354  rc = ima_get_modsig_digest(modsig, & hash_algo, & cur_digest, & cur_digestsize)
356  If rc Then Return rc
358  Else if hash_algo == HASH_ALGO__LAST || cur_digestsize == 0 Then Return -EINVAL
363  Return ima_eventdigest_init_common(cur_digest, cur_digestsize, hash_algo, field_data)