Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:hash_setup

Proto:static int __init hash_setup(char *str)

Type:int

Parameter:

TypeParameterName
char *str
48  template_desc = ima_template_desc_current()
51  If hash_setup_done Then Return 1
54  If strcmp(name, IMA_TEMPLATE_IMA_NAME) == 0 Then
55  If strncmp(str, "sha1", 4) == 0 Then ima_hash_algo = HASH_ALGO_SHA1
57  Else if strncmp(str, "md5", 3) == 0 Then ima_hash_algo = HASH_ALGO_MD5
59  Else Return 1
61  Go to out
64  i = match_string - matches given string in an array*@array: array of strings*@n: number of strings in the array or -1 for NULL terminated arrays*@string: string to match with* Return:* index of a @string in the @array if matches, or %-EINVAL otherwise.
65  If i < 0 Then Return 1
68  ima_hash_algo = i
69  out :
70  hash_setup_done = 1
71  Return 1
Caller
NameDescribe
init_ima